From: Stefan Bader Date: Fri, 15 Dec 2006 16:18:30 +0000 (+0100) Subject: [S390] cio: css_register_subchannel race. X-Git-Tag: MMI-PSA29.97-13-9~45860^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e42734e270b9e5ada83188d73b733533ce11ee4a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 Signed-off-by: Martin Schwidefsky --- 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) 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; }