diff options
author | 2020-10-05 12:46:42 +0530 | |
---|---|---|
committer | 2020-10-06 06:01:35 -0700 | |
commit | 082bb94fe18e54cc64026a623d94ed6bc7242a5f (patch) | |
tree | 22d6c00b0b58982eeaf072fe968814cfcd873b10 /drivers/usb/cdns3/cdns3-debug.h | |
parent | Merge tag 'platform-drivers-x86-v5.9-2' of git://git.infradead.org/linux-platform-drivers-x86 (diff) | |
download | wireguard-linux-082bb94fe18e54cc64026a623d94ed6bc7242a5f.tar.xz wireguard-linux-082bb94fe18e54cc64026a623d94ed6bc7242a5f.zip |
net: qrtr: ns: Fix the incorrect usage of rcu_read_lock()
The rcu_read_lock() is not supposed to lock the kernel_sendmsg() API
since it has the lock_sock() in qrtr_sendmsg() which will sleep. Hence,
fix it by excluding the locking for kernel_sendmsg().
While at it, let's also use radix_tree_deref_retry() to confirm the
validity of the pointer returned by radix_tree_deref_slot() and use
radix_tree_iter_resume() to resume iterating the tree properly before
releasing the lock as suggested by Doug.
Fixes: a7809ff90ce6 ("net: qrtr: ns: Protect radix_tree_deref_slot() using rcu read locks")
Reported-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Alex Elder <elder@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions