]> err.no Git - linux-2.6/commitdiff
[S390] cio: css_register_subchannel race.
authorStefan Bader <shbader@de.ibm.com>
Fri, 15 Dec 2006 16:18:30 +0000 (17:18 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 15 Dec 2006 16:18:30 +0000 (17:18 +0100)
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>
drivers/s390/cio/css.c

index 4c81d890791e48d1c04b001d842af56a49301c00..9d6c02446863cffa2eb1063962781248cae5f574 100644 (file)
@@ -139,6 +139,8 @@ css_register_subchannel(struct subchannel *sch)
        sch->dev.release = &css_subchannel_release;
        sch->dev.groups = subch_attr_groups;
 
+       css_get_ssd_info(sch);
+
        /* make it known to the system */
        ret = css_sch_device_register(sch);
        if (ret) {
@@ -146,7 +148,6 @@ css_register_subchannel(struct subchannel *sch)
                        __func__, sch->dev.bus_id);
                return ret;
        }
-       css_get_ssd_info(sch);
        return ret;
 }