diff options
author | David S. Miller <davem@davemloft.net> | 2014-12-16 11:19:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-16 11:19:49 -0500 |
commit | 772801ef7572f2b3e16bebceb707159ee3081ded (patch) | |
tree | 1b06c8e579574593753fc613550f00f28a22491a /drivers/net/phy/fixed_phy.c | |
parent | c286bbaf4f56958db2591146145e248c7b9021c5 (diff) | |
parent | 9c6ab1931fd6198eab61d9d59aff9a1014637ace (diff) | |
download | linux-772801ef7572f2b3e16bebceb707159ee3081ded.tar.bz2 |
Merge branch 'vnet_le'
Michael S. Tsirkin says:
====================
tun/macvtap: TUNSETIFF fixes
Dan Carpenter reported the following:
static checker warning:
drivers/net/tun.c:1694 tun_set_iff()
warn: 0x17100 is larger than 16 bits
drivers/net/tun.c
1692
1693 tun->flags = (tun->flags & ~TUN_FEATURES) |
1694 (ifr->ifr_flags & TUN_FEATURES);
1695
It's complaining because the "ifr->ifr_flags" variable is a short
(should it be unsigned?). The new define:
#define IFF_VNET_LE 0x10000
doesn't fit in two bytes. Other suspect looking code could be:
return __virtio16_to_cpu(q->flags & IFF_VNET_LE, val);
And that's true: we have run out of IFF flags in tun.
So let's not try to add more: add simple GET/SET ioctls
instead. Easy to test, leads to clear semantics.
Alternatively we'll have to revert the whole thing for 3.19,
but that seems more work as this has dependencies
in other places.
While here, I noticed that macvtap was actually reading
ifreq flags as a 32 bit field.
Fix that up as well.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/fixed_phy.c')
0 files changed, 0 insertions, 0 deletions