]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
xen-netback: don't populate the hash cache on XenBus disconnect
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Thu, 28 Feb 2019 14:11:26 +0000 (14:11 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit372487647c827c6025a6a891f210b32dc487b7d5
treeeef059829aef5a9a90d72f8beebf080c70cd90a2
parent1f47139b5d1a6a65172a0c4dae6037b330f731fc
xen-netback: don't populate the hash cache on XenBus disconnect

BugLink: https://bugs.launchpad.net/bugs/1837813
[ Upstream commit a2288d4e355992d369c50c45d017a85f6061ff71 ]

Occasionally, during the disconnection procedure on XenBus which
includes hash cache deinitialization there might be some packets
still in-flight on other processors. Handling of these packets includes
hashing and hash cache population that finally results in hash cache
data structure corruption.

In order to avoid this we prevent hashing of those packets if there
are no queues initialized. In that case RCU protection of queues guards
the hash cache as well.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.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: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/xen-netback/hash.c
drivers/net/xen-netback/interface.c