lkml.org 
[lkml]   [1996]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectHere: fix for NCR5380.c
Thanks to a dying SCSI disk drive on a PAS16 controller, I discovered a bug  
in the error handling, which causes Linux to crash. Here's the fix. This
patch is to 2.0.22, but it should also just slide right in to 2.0.23 and 2.1.
5.

Regards,
Ray Van Tassle


--- linux2.0.23/drivers/scsi/NCR5380.c.2022 Mon Apr 29 09:14:19 1996
+++ linux2.0.23/drivers/scsi/NCR5380.c Thu Oct 24 18:07:58 1996
@@ -734,7 +734,7 @@
*/

static void NCR5380_print_status (struct Scsi_Host *instance) {
- char pr_bfr[256];
+ char pr_bfr[512];
char *start;
int len;

@@ -767,7 +767,7 @@
*/

#undef SPRINTF
-#define SPRINTF(args...) do { if(pos < buffer + length) pos += sprintf(pos,
## args); } while(0)
+#define SPRINTF(args...) do { if(pos < buffer + length-80) pos +=
sprintf(pos, ## args); } while(0)
static
char *lprint_Scsi_Cmnd (Scsi_Cmnd *cmd, char *pos, char *buffer, int
length);
static
\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.036 / U:4.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site