summaryrefslogtreecommitdiff
path: root/scripts/dummy-tools/python3
diff options
context:
space:
mode:
authorLinmao Li <lilinmao@kylinos.cn>2026-08-14 11:38:45 +0800
committerMartin K. Petersen (Oracle) <mkp@kernel.org>2026-08-23 21:51:43 -0400
commit00b7c8d4ce441aa9ac704840332ba4738e1c6d51 (patch)
tree3100d2c2cee9c8aee16d16cef14308c7e2d91bc2 /scripts/dummy-tools/python3
parent970f69b6bf71562df5afcefb89c77b4e971d68de (diff)
downloadlinux-next-00b7c8d4ce441aa9ac704840332ba4738e1c6d51.tar.gz
linux-next-00b7c8d4ce441aa9ac704840332ba4738e1c6d51.zip
scsi: leapraid: Serialize firmware log mmap with teardown
leapraid_fw_log_exit() waits for mmap_refcnt to reach zero before it frees the firmware log buffer. leapraid_fw_mmap() checks host_removing, but it does not increment mmap_refcnt until after dma_mmap_coherent() succeeds and the VMA open callback runs. Removal can set host_removing and observe a zero mmap_refcnt between the check and the VMA open. It can then free the coherent buffer while the mmap path is still establishing a userspace mapping of it. Claim a temporary mmap reference while looking up the adapter under leapraid_adapter_lock. Removal deletes the adapter from the same locked list after setting host_removing, so a mapping is either rejected or included in the count that removal waits for. Drop the temporary reference on the common exit path, after a successful VMA open has acquired the reference covering the VMA lifetime. Fixes: 5597088c9e79 ("scsi: leapraid: Add new SCSI driver") Signed-off-by: Linmao Li <lilinmao@kylinos.cn> Reviewed-by: Dongdong Hao <doubled@leap-io-kernel.com> Link: https://patch.msgid.link/20260814033845.2971706-3-lilinmao@kylinos.cn Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'scripts/dummy-tools/python3')
0 files changed, 0 insertions, 0 deletions