summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorNamjae Jeon <linkinjeon@kernel.org>2022-07-22 10:17:06 +0900
committerSteve French <stfrench@microsoft.com>2022-07-26 23:38:05 -0500
commit17ea92a9f6d0b9a97aaec5ab748e4591d70a562c (patch)
treedb256a2b76609de1e48b5b369559a12cc6a24291 /samples
parent8e06b31e348107c5d78e2c90bb7e69388cb97fb6 (diff)
downloadlinux-stable-17ea92a9f6d0b9a97aaec5ab748e4591d70a562c.tar.gz
linux-stable-17ea92a9f6d0b9a97aaec5ab748e4591d70a562c.tar.bz2
linux-stable-17ea92a9f6d0b9a97aaec5ab748e4591d70a562c.zip
ksmbd: fix kernel oops from idr_remove()
There is a report that kernel oops happen from idr_remove(). kernel: BUG: kernel NULL pointer dereference, address: 0000000000000010 kernel: RIP: 0010:idr_remove+0x1/0x20 kernel: __ksmbd_close_fd+0xb2/0x2d0 [ksmbd] kernel: ksmbd_vfs_read+0x91/0x190 [ksmbd] kernel: ksmbd_fd_put+0x29/0x40 [ksmbd] kernel: smb2_read+0x210/0x390 [ksmbd] kernel: __process_request+0xa4/0x180 [ksmbd] kernel: __handle_ksmbd_work+0xf0/0x290 [ksmbd] kernel: handle_ksmbd_work+0x2d/0x50 [ksmbd] kernel: process_one_work+0x21d/0x3f0 kernel: worker_thread+0x50/0x3d0 kernel: rescuer_thread+0x390/0x390 kernel: kthread+0xee/0x120 kthread_complete_and_exit+0x20/0x20 kernel: ret_from_fork+0x22/0x30 While accessing files, If connection is disconnected, windows send session setup request included previous session destroy. But while still processing requests on previous session, this request destroy file table, which mean file table idr will be freed and set to NULL. So kernel oops happen from ft->idr in __ksmbd_close_fd(). This patch don't directly destroy session in destroy_previous_session(). It just set to KSMBD_SESS_EXITING so that connection will be terminated after finishing the rest of requests. Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions