]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
inet: frags: remove the WARN_ON from inet_evict_bucket
authorNikolay Aleksandrov <nikolay@redhat.com>
Tue, 28 Oct 2014 09:44:01 +0000 (10:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Oct 2014 19:21:30 +0000 (15:21 -0400)
commitd70127e8a942364de8dd140fe73893efda363293
treec85675137acf128f9b646bca19e4914aa5ff4423
parent65ba1f1ec0eff1c25933468e1d238201c0c2cb29
inet: frags: remove the WARN_ON from inet_evict_bucket

The WARN_ON in inet_evict_bucket can be triggered by a valid case:
inet_frag_kill and inet_evict_bucket can be running in parallel on the
same queue which means that there has been at least one more ref added
by a previous inet_frag_find call, but inet_frag_kill can delete the
timer before inet_evict_bucket which will cause the WARN_ON() there to
trigger since we'll have refcnt!=1. Now, this case is valid because the
queue is being "killed" for some reason (removed from the chain list and
its timer deleted) so it will get destroyed in the end by one of the
inet_frag_put() calls which reaches 0 i.e. refcnt is still valid.

CC: Florian Westphal <fw@strlen.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Patrick McLean <chutzpah@gentoo.org>
Fixes: b13d3cbfb8e8 ("inet: frag: move eviction of queues to work queue")
Reported-by: Patrick McLean <chutzpah@gentoo.org>
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_fragment.c