diff options
author | Eric Sesterhenn / Snakebyte <snakebyte@gmx.de> | 2007-05-23 16:58:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-23 23:14:15 -0400 |
commit | 4acb3e2f97f41cf9b53182b494384467d3ceb304 (patch) | |
tree | a315110b3aae508db20303c92daae467efc8ad1d /drivers/block | |
parent | fa74419bb7b51af4bbb66116d14cc92f0b5aff25 (diff) |
Off by one in floppy.c
Another coverity patch i forgot to resend, original thread here
http://marc.info/?l=linux-kernel&m=115144559823592&w=2
In case drive == N_DRIVE, we get one past the drive_params array.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/floppy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 3587cb434371..fe088045dd08 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -670,7 +670,7 @@ static void __reschedule_timeout(int drive, const char *message, int marg) | |||
670 | if (drive == current_reqD) | 670 | if (drive == current_reqD) |
671 | drive = current_drive; | 671 | drive = current_drive; |
672 | del_timer(&fd_timeout); | 672 | del_timer(&fd_timeout); |
673 | if (drive < 0 || drive > N_DRIVE) { | 673 | if (drive < 0 || drive >= N_DRIVE) { |
674 | fd_timeout.expires = jiffies + 20UL * HZ; | 674 | fd_timeout.expires = jiffies + 20UL * HZ; |
675 | drive = 0; | 675 | drive = 0; |
676 | } else | 676 | } else |