diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2011-12-27 14:27:28 +0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-12-27 14:27:14 +0400 |
commit | b38f27e8425a132ed2dc49ffb3741404e81363d8 (patch) | |
tree | 8f1e09bc2bd902ace0307d7a1639db349303829d /drivers/s390/block/dasd_alias.c | |
parent | b206181d636d416fde48c7f493d7ac5d935b57e3 (diff) | |
download | linux-b38f27e8425a132ed2dc49ffb3741404e81363d8.tar.xz |
[S390] dasd: fix fixpoint divide exception in define_extent
If an IO request is build on an alias device without prefix enabled
we try to calculate with zero data from the alias device. This
triggers a BUG statement with fixpoint divide exception.
This case is very unlikely and can only happen if the pathgroup is
lost with an alias device already in use.
Prevent the alias device from being used in this case.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_alias.c')
-rw-r--r-- | drivers/s390/block/dasd_alias.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c index c388eda1e2b1..553b3c5abb0a 100644 --- a/drivers/s390/block/dasd_alias.c +++ b/drivers/s390/block/dasd_alias.c @@ -705,6 +705,16 @@ struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *base_device) if (lcu->pav == NO_PAV || lcu->flags & (NEED_UAC_UPDATE | UPDATE_PENDING)) return NULL; + if (unlikely(!(private->features.feature[8] & 0x01))) { + /* + * PAV enabled but prefix not, very unlikely + * seems to be a lost pathgroup + * use base device to do IO + */ + DBF_DEV_EVENT(DBF_ERR, base_device, "%s", + "Prefix not enabled with PAV enabled\n"); + return NULL; + } spin_lock_irqsave(&lcu->lock, flags); alias_device = group->next; |