]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ipv4: remove BUG_ON() from fib_compute_spec_dst
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Fri, 27 Jul 2018 16:15:46 +0000 (18:15 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:55 +0000 (14:20 +0100)
commit97cdaea71c303b00746d79fb2de8c6cfa17d8feb
tree8267574b26280e215722162b09ece6024d2142da
parent915831ec8b3f5200c8ab2b972d2ef8553d8a513a
ipv4: remove BUG_ON() from fib_compute_spec_dst

BugLink: http://bugs.launchpad.net/bugs/1815234
[ Upstream commit 9fc12023d6f51551d6ca9ed7e02ecc19d79caf17 ]

Remove BUG_ON() from fib_compute_spec_dst routine and check
in_dev pointer during flowi4 data structure initialization.
fib_compute_spec_dst routine can be run concurrently with device removal
where ip_ptr net_device pointer is set to NULL. This can happen
if userspace enables pkt info on UDP rx socket and the device
is removed while traffic is flowing

Fixes: 35ebf65e851c ("ipv4: Create and use fib_compute_spec_dst() helper")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/ipv4/fib_frontend.c