lkml.org 
[lkml]   [2007]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 06/38] cio: observe chpid valid flag
From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>

Check validity flag of CHPID description data before continuing with
channel-path initialization.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

drivers/s390/cio/chp.c | 4 ++++
1 files changed, 4 insertions(+)

Index: quilt-2.6/drivers/s390/cio/chp.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/chp.c 2007-04-27 16:04:53.000000000 +0200
+++ quilt-2.6/drivers/s390/cio/chp.c 2007-04-27 16:04:53.000000000 +0200
@@ -339,6 +339,10 @@
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) {
--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-27 16:21    [W:0.320 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site