Skip to content

Commit

Permalink
[S390] cio: css_register_subchannel race.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Bader authored and Martin Schwidefsky committed Dec 15, 2006
1 parent da1cf23 commit e42734e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ 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) {
printk (KERN_WARNING "%s: could not register %s\n",
__func__, sch->dev.bus_id);
return ret;
}
css_get_ssd_info(sch);
return ret;
}

Expand Down

0 comments on commit e42734e

Please sign in to comment.