aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Bader <shbader@de.ibm.com>2006-12-15 11:18:30 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-12-15 11:18:30 -0500
commite42734e270b9e5ada83188d73b733533ce11ee4a (patch)
treea74c6f8eb8e517bcd3c85cd18bf9005231ad8e92
parentda1cf23efe0c067ef95e4702b386e6e1baab10c7 (diff)
[S390] cio: css_register_subchannel race.
Asynchronous probe can release memory of a subchannel before css_get_ssd_info is called. To fix this call css_get_ssd_info before registering with driver core. Signed-off-by: Stefan Bader <shbader@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--drivers/s390/cio/css.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
index 4c81d890791e..9d6c02446863 100644
--- a/drivers/s390/cio/css.c
+++ b/drivers/s390/cio/css.c
@@ -139,6 +139,8 @@ css_register_subchannel(struct subchannel *sch)
139 sch->dev.release = &css_subchannel_release; 139 sch->dev.release = &css_subchannel_release;
140 sch->dev.groups = subch_attr_groups; 140 sch->dev.groups = subch_attr_groups;
141 141
142 css_get_ssd_info(sch);
143
142 /* make it known to the system */ 144 /* make it known to the system */
143 ret = css_sch_device_register(sch); 145 ret = css_sch_device_register(sch);
144 if (ret) { 146 if (ret) {
@@ -146,7 +148,6 @@ css_register_subchannel(struct subchannel *sch)
146 __func__, sch->dev.bus_id); 148 __func__, sch->dev.bus_id);
147 return ret; 149 return ret;
148 } 150 }
149 css_get_ssd_info(sch);
150 return ret; 151 return ret;
151} 152}
152 153