Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] s390: cio max channels checks

Fix max channel check in cio_ignore display function.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Cornelia Huck and committed by
Linus Torvalds
5bdfcfcc 60b2737d

+3 -3
+3 -3
drivers/s390/cio/blacklist.c
··· 1 1 /* 2 2 * drivers/s390/cio/blacklist.c 3 3 * S/390 common I/O routines -- blacklisting of specific devices 4 - * $Revision: 1.33 $ 4 + * $Revision: 1.34 $ 5 5 * 6 6 * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, 7 7 * IBM Corporation ··· 289 289 len = 0; 290 290 for (devno = off; /* abuse the page variable 291 291 * as counter, see fs/proc/generic.c */ 292 - devno <= __MAX_SUBCHANNELS && len + entry_size < count; devno++) { 292 + devno < __MAX_SUBCHANNELS && len + entry_size < count; devno++) { 293 293 if (!test_bit(devno, bl_dev)) 294 294 continue; 295 295 len += sprintf(page + len, "0.0.%04lx", devno); ··· 302 302 len += sprintf(page + len, "\n"); 303 303 } 304 304 305 - if (devno <= __MAX_SUBCHANNELS) 305 + if (devno < __MAX_SUBCHANNELS) 306 306 *eof = 1; 307 307 *start = (char *) (devno - off); /* number of checked entries */ 308 308 return len;