Skip to content
Commit 0278ccd9 authored by Chris Boot's avatar Chris Boot Committed by Stefan Richter
Browse files

firewire: sbp2: fix panic after rmmod with slow targets



If firewire-sbp2 starts a login to a target that doesn't complete ORBs
in a timely manner (and has to retry the login), and the module is
removed before the operation times out, you end up with a null-pointer
dereference and a kernel panic.

[SR:  This happens because sbp2_target_get/put() do not maintain
module references.  scsi_device_get/put() do, but at occasions like
Chris describes one, nobody holds a reference to an SBP-2 sdev.]

This patch cancels pending work for each unit in sbp2_remove(), which
hopefully means there are no extra references around that prevent us
from unloading. This fixes my crash.

Signed-off-by: default avatarChris Boot <bootc@bootc.net>
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent aaff1203
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment