kernel-ark/net
Wang Chen dad9b335c6 netdevice: Fix promiscuity and allmulti overflow
Max of promiscuity and allmulti plus positive @inc can cause overflow.
Fox example: when allmulti=0xFFFFFFFF, any caller give dev_set_allmulti() a
positive @inc will cause allmulti be off.
This is not what we want, though it's rare case.
The fix is that only negative @inc will cause allmulti or promiscuity be off
and when any caller makes the counters touch the roof, we return error.

Change of v2:
Change void function dev_set_promiscuity/allmulti to return int.
So callers can get the overflow error.
Caller's fix will be done later.

Change of v3:
1. Since we return error to caller, we don't need to print KERN_ERROR,
KERN_WARNING is enough.
2. In dev_set_promiscuity(), if __dev_set_promiscuity() failed, we
return at once.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-06-18 01:48:28 -07:00
..
9p 9p: fix error path during early mount 2008-05-14 19:23:27 -05:00
802
8021q vlan: Use bitmask of feature flags instead of seperate feature bits 2008-05-23 00:27:50 -07:00
appletalk
atm atm: use const where reasonable 2008-06-17 16:20:06 -07:00
ax25 ax25: Fix std timer socket destroy handling. 2008-06-17 21:26:37 -07:00
bluetooth net: remove CVS keywords 2008-06-11 21:00:38 -07:00
bridge bridge: fix IPV6=n build 2008-06-17 16:16:13 -07:00
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-05-08 19:03:26 -07:00
core netdevice: Fix promiscuity and allmulti overflow 2008-06-18 01:48:28 -07:00
dccp net: change proto destroy method to return void 2008-06-14 17:04:49 -07:00
decnet decnet: Remove SOCK_SLEEP_{PRE,POST} usage. 2008-06-17 01:06:01 -07:00
econet econet: Use sock_orphan() instead of open-coded (and buggy) variant. 2008-06-17 03:01:47 -07:00
ethernet
ieee80211 mac80211: use hardware flags for signal/noise units 2008-05-14 16:29:49 -04:00
ipv4 udp: sk_drops handling 2008-06-17 21:04:56 -07:00
ipv6 ipv6: minor cleanup in net/ipv6/tcp_ipv6.c [RESEND ]. 2008-06-18 00:51:09 -07:00
ipx
irda Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-10 02:22:26 -07:00
iucv af_iucv: exploit target message class support of IUCV 2008-06-09 15:51:03 -07:00
key Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-13 20:52:39 -07:00
lapb
llc llc: Use sock_graft() instead of by-hand version. 2008-06-17 01:21:03 -07:00
mac80211 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-16 18:25:48 -07:00
netfilter Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-13 20:52:39 -07:00
netlabel
netlink Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-10 02:22:26 -07:00
netrom netrom: Kill spurious NULL'ing of sk->sk_socket. 2008-06-17 03:19:58 -07:00
packet net: remove CVS keywords 2008-06-11 21:00:38 -07:00
rfkill
rose rose: improving AX25 routing frames via ROSE network 2008-06-17 17:08:32 -07:00
rxrpc
sched Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2008-06-16 18:25:48 -07:00
sctp sctp: fix error path in sctp_proc_init 2008-06-17 15:54:14 -07:00
sunrpc net: remove CVS keywords 2008-06-11 21:00:38 -07:00
tipc tipc: Message rejection rework preparatory changes 2008-06-04 17:54:48 -07:00
unix net: remove CVS keywords 2008-06-11 21:00:38 -07:00
wanrouter wanrouter: Push down BKL 2008-05-25 23:41:40 -07:00
wireless mac80211: implement EU regulatory domain 2008-06-14 12:18:03 -04:00
x25 x25: Use sock_orphan() instead of open-coded (and buggy) variant. 2008-06-17 03:05:13 -07:00
xfrm xfrm: xfrm_algo: correct usage of RIPEMD-160 2008-06-04 12:04:55 -07:00
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c net: remove CVS keywords 2008-06-11 21:00:38 -07:00
TUNABLE