[S390] dasd: check tsb validity
Check tsb validity before the tcw_get_tsb function is called. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
4a31ba57ca
commit
b8fde7224d
|
@ -3155,11 +3155,11 @@ static void dasd_eckd_dump_sense_tcw(struct dasd_device *device,
|
||||||
|
|
||||||
tsb = NULL;
|
tsb = NULL;
|
||||||
sense = NULL;
|
sense = NULL;
|
||||||
if (irb->scsw.tm.tcw)
|
if (irb->scsw.tm.tcw && (irb->scsw.tm.fcxs == 0x01))
|
||||||
tsb = tcw_get_tsb(
|
tsb = tcw_get_tsb(
|
||||||
(struct tcw *)(unsigned long)irb->scsw.tm.tcw);
|
(struct tcw *)(unsigned long)irb->scsw.tm.tcw);
|
||||||
|
|
||||||
if (tsb && (irb->scsw.tm.fcxs == 0x01)) {
|
if (tsb) {
|
||||||
len += sprintf(page + len, KERN_ERR PRINTK_HEADER
|
len += sprintf(page + len, KERN_ERR PRINTK_HEADER
|
||||||
" tsb->length %d\n", tsb->length);
|
" tsb->length %d\n", tsb->length);
|
||||||
len += sprintf(page + len, KERN_ERR PRINTK_HEADER
|
len += sprintf(page + len, KERN_ERR PRINTK_HEADER
|
||||||
|
|
Loading…
Reference in New Issue