lkml.org 
[lkml]   [2007]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: list corruption on ib_srp load in v2.6.24-rc5

On Sun, 2007-12-23 at 01:41 +0900, FUJITA Tomonori wrote:
> transport_container_unregister(&i->rport_attr_cont) should not fail here.
>
> It fails because there is still a srp rport.
>
> I think that as Pete pointed out, srp_remove_one needs to call
> srp_remove_host.
>
> Can you try this?

That patched oopsed in scsi_remove_host(), but reversing the order has
survived over 500 insert/probe/remove cycles.

Tested-by: David Dillow <dillowda@ornl.gov>
---
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 950228f..77e8b90 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -2054,6 +2054,7 @@ static void srp_remove_one(struct ib_device *device)
list_for_each_entry_safe(target, tmp_target,
&host->target_list, list) {
scsi_remove_host(target->scsi_host);
+ srp_remove_host(target->scsi_host);
srp_disconnect_target(target);
ib_destroy_cm_id(target->cm_id);
srp_free_target_ib(target);



\
 
 \ /
  Last update: 2007-12-26 18:17    [W:0.087 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site