Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ksmbd: fix race condition from parallel smb2 lock requests
There is a race condtion issue between parallel smb2 lock request. Time + Thread A | Thread A smb2_lock | smb2_lock | insert smb_lock to lock_list | spin_unlock(&work->conn->llist_lock) | | | spin_lock(&conn->llist_lock); | kfree(cmp_lock); | // UAF! | list_add(&smb_lock->llist, &rollback_list) + This patch swaps the line for adding the smb lock to the rollback list and adding the lock list of connection to fix the race issue. Signed-off-by: Namjae Jeon <[email protected]>
- Loading branch information