projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa58163
)
inet: fix ip_mc_drop_socket()
author
Eric Dumazet
<
[email protected]
>
Mon, 8 Nov 2010 11:15:54 +0000
(11:15 +0000)
committer
David S. Miller
<
[email protected]
>
Tue, 9 Nov 2010 16:26:42 +0000
(08:26 -0800)
commit
8723e1b4ad9be4444
(inet: RCU changes in inetdev_by_index())
forgot one call site in ip_mc_drop_socket()
We should not decrease idev refcount after inetdev_by_index() call,
since refcount is not increased anymore.
Reported-by: Markus Trippelsdorf <
[email protected]
>
Reported-by: Miles Lane <
[email protected]
>
Signed-off-by: Eric Dumazet <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/igmp.c
patch
|
blob
|
history
diff --git
a/net/ipv4/igmp.c
b/net/ipv4/igmp.c
index c8877c6c72164ccaee2af4def0025f8300bc7e80..3c53c2d89e3b47b3e42629bfe37086aeeeda7aa8 100644
(file)
--- a/
net/ipv4/igmp.c
+++ b/
net/ipv4/igmp.c
@@
-2306,10
+2306,8
@@
void ip_mc_drop_socket(struct sock *sk)
in_dev = inetdev_by_index(net, iml->multi.imr_ifindex);
(void) ip_mc_leave_src(sk, iml, in_dev);
- if (in_dev != NULL)
{
+ if (in_dev != NULL)
ip_mc_dec_group(in_dev, iml->multi.imr_multiaddr.s_addr);
- in_dev_put(in_dev);
- }
/* decrease mem now to avoid the memleak warning */
atomic_sub(sizeof(*iml), &sk->sk_omem_alloc);
call_rcu(&iml->rcu, ip_mc_socklist_reclaim);