android_kernel_xiaomi_sm7250/net
Patrick McHardy 544473c166 [NETFILTER]: {ip,ip6,arp}_tables: return EAGAIN for invalid SO_GET_ENTRIES size
Rule dumping is performed in two steps: first userspace gets the
ruleset size using getsockopt(SO_GET_INFO) and allocates memory,
then it calls getsockopt(SO_GET_ENTRIES) to actually dump the
ruleset. When another process changes the ruleset in between the
sizes from the first getsockopt call doesn't match anymore and
the kernel aborts. Unfortunately it returns EAGAIN, as for multiple
other possible errors, so userspace can't distinguish this case
from real errors.

Return EAGAIN so userspace can retry the operation.

Fixes (with current iptables SVN version) netfilter bugzilla #104.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-04-14 11:15:45 +02:00
..
9p Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-03 14:33:42 -07:00
802 [TR] net/802/tr.c: sysctl_tr_rif_timeout static 2008-01-31 19:28:31 -08:00
8021q Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-02 22:35:23 -07:00
appletalk [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
atm [ATM]: Use SEQ_START_TOKEN 2008-04-10 03:33:03 -07:00
ax25 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-03-27 18:48:56 -07:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-02 22:35:23 -07:00
bridge [NETFILTER]: bridge netfilter: use non-deprecated __RW_LOCK_UNLOCKED macro. 2008-04-14 09:56:03 +02:00
can [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
core [SKB]: __skb_append = __skb_queue_after 2008-04-14 00:05:09 -07:00
dccp [NETNS][DCCPV6]: Make per-net socket lookup. 2008-04-13 22:33:06 -07:00
decnet [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
econet [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
ethernet
ieee80211 the scheduled ieee80211 softmac removal 2008-03-13 16:02:31 -04:00
ipv4 [NETFILTER]: {ip,ip6,arp}_tables: return EAGAIN for invalid SO_GET_ENTRIES size 2008-04-14 11:15:45 +02:00
ipv6 [NETFILTER]: {ip,ip6,arp}_tables: return EAGAIN for invalid SO_GET_ENTRIES size 2008-04-14 11:15:45 +02:00
ipx [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
irda Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-03-27 18:48:56 -07:00
iucv iucv: Delay bus registration until core is ready. 2008-04-10 02:12:45 -07:00
key LSM: Make the Labeled IPsec hooks more stack friendly 2008-04-12 19:07:52 -07:00
lapb
llc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-02 22:35:23 -07:00
mac80211 mac80211: fix key debugfs default_key link 2008-04-08 16:46:36 -04:00
netfilter [NETFILTER]: nf_conntrack_sip: clear address in parse_addr() 2008-04-14 11:15:45 +02:00
netlabel [NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS. 2008-03-26 04:39:53 +09:00
netlink [NET] NETNS: Omit namespace comparision without CONFIG_NET_NS. 2008-03-26 04:40:00 +09:00
netrom [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
packet [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
rfkill PM: Introduce PM_EVENT_HIBERNATE callback state 2008-02-23 10:40:04 -08:00
rose Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-02 22:35:23 -07:00
rxrpc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-03 14:33:42 -07:00
sched Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-02 22:35:23 -07:00
sctp [SCTP]: Remove an unused parameter from sctp_cmd_hb_timer_update 2008-04-12 18:55:12 -07:00
sunrpc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-04-03 14:33:42 -07:00
tipc [TIPC]: Improve socket time conversions 2008-04-13 21:35:11 -07:00
unix [AF_UNIX]: Use SEQ_START_TOKEN 2008-04-12 19:04:38 -07:00
wanrouter [WANROUTER]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:15:56 -08:00
wireless cfg80211: default to regulatory max power for channel 2008-04-08 16:44:41 -04:00
x25 [NET] NETNS: Omit sock->sk_net without CONFIG_NET_NS. 2008-03-26 04:39:55 +09:00
xfrm LSM: Make the Labeled IPsec hooks more stack friendly 2008-04-12 19:07:52 -07:00
compat.c
Kconfig [IPV4]: Fix size description of CONFIG_INET. 2008-03-04 15:18:22 +09:00
Makefile
nonet.c
socket.c [NETNS]: Introduce a netns_core structure. 2008-03-31 19:41:14 -07:00
sysctl_net.c
TUNABLE