Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a908c735aed44c8bbed303371202e416813b271 Commit: 1a908c735aed44c8bbed303371202e416813b271 Parent: 46258ab5e42eed5cbe20a83b732d6538c49ea2fe Author: Cornelia Huck <[EMAIL PROTECTED]> AuthorDate: Sat Jan 26 14:10:50 2008 +0100 Committer: Martin Schwidefsky <[EMAIL PROTECTED]> CommitDate: Sat Jan 26 14:11:04 2008 +0100
[S390] cio: Fix ungroup vs. machine check race in ccwgroup. There are two ways for a ccwgroup device to be unregistered: Via the ungroup attribute, or when on of the slave devices is killed by a machine check. As we have to unregister the ccwgroup device via a callback, we'll now have to check whether it hasn't been already unregistered because of a machine check. Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]> Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]> --- drivers/s390/cio/ccwgroup.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index dc1c5f4..3964056 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c @@ -75,8 +75,10 @@ static void ccwgroup_ungroup_callback(struct device *dev) struct ccwgroup_device *gdev = to_ccwgroupdev(dev); mutex_lock(&gdev->reg_mutex); - __ccwgroup_remove_symlinks(gdev); - device_unregister(dev); + if (device_is_registered(&gdev->dev)) { + __ccwgroup_remove_symlinks(gdev); + device_unregister(dev); + } mutex_unlock(&gdev->reg_mutex); } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html