ethtool: do not set some flags, if others failed
authorJeff Garzik <jeff@garzik.org>
Fri, 26 Feb 2010 21:43:38 +0000 (21:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 28 Feb 2010 09:40:30 +0000 (01:40 -0800)
commit9675478bbafed08848bf8d7e28400d5e46330b23
treee6657e754b88ddc7074aae790510b23d93180308
parent6c74651c3bce418d3b29edfdeb72664f9441509a
ethtool: do not set some flags, if others failed

NETIF_F_NTUPLE flag setting introduced a bug:  non-ntuple flags
like LRO may be successfully set, before ioctl(2) returns failure
to userspace.

The set-flags operation should be all-or-none, rather than leaving
things in an inconsistent state prior to reporting failure to
userspace.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/ethtool.c