From: Peter Oberparleiter Date: Fri, 27 Apr 2007 14:01:29 +0000 (+0200) Subject: [S390] cio: observe chpid valid flag X-Git-Tag: v2.6.22-rc1~1130^2~32 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9182e0f42c5646e670c2166b6d6638052d574af;p=linux-2.6 [S390] cio: observe chpid valid flag Check validity flag of CHPID description data before continuing with channel-path initialization. Signed-off-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/cio/chp.c b/drivers/s390/cio/chp.c index 6e04521acc..8a5839147f 100644 --- a/drivers/s390/cio/chp.c +++ b/drivers/s390/cio/chp.c @@ -339,6 +339,10 @@ int chp_new(struct chp_id chpid) ret = chsc_determine_channel_path_description(chpid, &chp->desc); if (ret) goto out_free; + if ((chp->desc.flags & 0x80) == 0) { + ret = -ENODEV; + goto out_free; + } /* Get channel-measurement characteristics. */ if (css_characteristics_avail && css_chsc_characteristics.scmc && css_chsc_characteristics.secm) {