]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Check if the xprt is connected before handling sysfs reads
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 28 Oct 2021 19:17:41 +0000 (15:17 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 4 Nov 2021 23:43:29 +0000 (19:43 -0400)
commit9f759263746a7640f3d52882b1b21e3ec32ff7f0
treea4ac765bef9792517d085726aff4dc2093b29ec0
parent83cac46f551ca5aa5597df41ee6fb8ffce62cd1a
SUNRPC: Check if the xprt is connected before handling sysfs reads

xprts don't immediately reconnect when changing the "dstaddr" property,
instead this gets handled the next time an operation uses the transport.
This could lead to NULL pointer dereferences when trying to read sysfs
files between the disconnect and reconnect operations. Fix this by
returning an error if the xprt is not connected.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/sysfs.c