aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-checker.c
diff options
context:
space:
mode:
authorJohn Evans <[email protected]>2025-08-28 04:40:08 +0000
committerMartin K. Petersen <[email protected]>2025-08-31 01:11:35 +0000
commit9dba9a45c348e8460da97c450cddf70b2056deb3 (patch)
tree51f1391e5ab1287a6f5cbf67dd26c5bc3682bee2 /fs/btrfs/tree-checker.c
parentscsi: ufs: ufs-qcom: Fix ESI null pointer dereference (diff)
downloadkernel-9dba9a45c348e8460da97c450cddf70b2056deb3.tar.gz
kernel-9dba9a45c348e8460da97c450cddf70b2056deb3.zip
scsi: lpfc: Fix buffer free/clear order in deferred receive path
Fix a use-after-free window by correcting the buffer release sequence in the deferred receive path. The code freed the RQ buffer first and only then cleared the context pointer under the lock. Concurrent paths (e.g., ABTS and the repost path) also inspect and release the same pointer under the lock, so the old order could lead to double-free/UAF. Note that the repost path already uses the correct pattern: detach the pointer under the lock, then free it after dropping the lock. The deferred path should do the same. Fixes: 472e146d1cf3 ("scsi: lpfc: Correct upcalling nvmet_fc transport during io done downcall") Cc: [email protected] Signed-off-by: John Evans <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Justin Tee <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'fs/btrfs/tree-checker.c')
0 files changed, 0 insertions, 0 deletions