mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-18 19:12:56 +00:00
SUNRPC: lock against ->sock changing during sysfs read
[ Upstream commitb49ea673e1] ->sock can be set to NULL asynchronously unless ->recv_mutex is held. So it is important to hold that mutex. Otherwise a sysfs read can trigger an oops. Commit17f09d3f61("SUNRPC: Check if the xprt is connected before handling sysfs reads") appears to attempt to fix this problem, but it only narrows the race window. Fixes:17f09d3f61("SUNRPC: Check if the xprt is connected before handling sysfs reads") Fixes:a8482488a7("SUNRPC query transport's source port") Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Robert Garcia <rob_garcia@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c737047f46
commit
fdc42287ae
2 changed files with 10 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue