]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Feb 2019 20:50:37 +0000 (12:50 -0800)
commitf279613c9eaebda035ee38fdeb446f5bd18a3154
tree29c9e1a705304424084678266ea7fec916fe8c6a
parent153ea8c4e711f79b1798e690fd8b0e20239464e8
xen-netback: don't populate the hash cache on XenBus disconnect

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>
drivers/net/xen-netback/hash.c
drivers/net/xen-netback/interface.c