From: Vu Pham Date: Thu, 10 Oct 2013 11:50:29 +0000 (+0200) Subject: IB/srp: Remove target from list before freeing Scsi_Host structure X-Git-Tag: v3.13-rc1~44^2^11~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65d7dd2f3479ef5aec1d9ddd1481cb7851c11af6;p=pandora-kernel.git IB/srp: Remove target from list before freeing Scsi_Host structure Remove an SRP target from the SRP target list before invoking the last scsi_host_put() call. This change is necessary because that last put frees the memory that holds the srp_target_port structure. This patch prevents the following kernel oops: RIP: 0010:[] __lock_acquire+0x500/0x1570 Call Trace: [] lock_acquire+0xa4/0x120 [] _spin_lock+0x36/0x70 [] srp_remove_work+0xef/0x180 [ib_srp] [] worker_thread+0x21c/0x3d0 [] kthread+0x96/0xa0 [] child_rip+0xa/0x20 Signed-off-by: Vu Pham [ bvanassche - Modified path description and CC'ed stable. ] Signed-off-by: Bart Van Assche Cc: Signed-off-by: Roland Dreier --- Reading git-diff-tree failed