]> git.baikalelectronics.ru Git - kernel.git/commit
mctp: perform route destruction under RCU read lock
authorJeremy Kerr <jk@codeconstruct.com.au>
Wed, 8 Sep 2021 04:13:10 +0000 (12:13 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Sep 2021 10:29:16 +0000 (11:29 +0100)
commit22c0c5bc4ea49c26c27f364648459524646eb1be
tree008fe6a555e92ab5c6ea9a568f8e728517a458d9
parentbcbbcfddde686182d410f97b3d5303d457f70032
mctp: perform route destruction under RCU read lock

The kernel test robot reports:

  [  843.509974][  T345] =============================
  [  843.524220][  T345] WARNING: suspicious RCU usage
  [  843.538791][  T345] 5.14.0-rc2-00606-g889b7da23abf #1 Not tainted
  [  843.553617][  T345] -----------------------------
  [  843.567412][  T345] net/mctp/route.c:310 RCU-list traversed in non-reader section!!

- we're missing the rcu read lock acquire around the destruction path.

This change adds the acquire/release - the path is already atomic, and
we're using the _rcu list iterators.

Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mctp/route.c