* [PATCH] megaraid.c
@ 2001-06-12 6:05 Praveen Srinivasan
2001-06-12 16:16 ` Alan Cox
2001-06-12 16:17 ` Alan Cox
0 siblings, 2 replies; 3+ messages in thread
From: Praveen Srinivasan @ 2001-06-12 6:05 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds, alan
Hi,
This patch fixes an instance where an allocation is checked, but only after
the pointer is memset() - moving the memset further down in the function
fixes this.
Praveen Srinivasan
--- ../linux-fresh/./drivers/scsi/megaraid.c Fri Apr 27 13:59:18 2001
+++ ./drivers/scsi/megaraid.c Wed May 23 12:31:01 2001
@@ -4115,7 +4115,7 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) /* 0x020400 */
scsicmd = (Scsi_Cmnd *) kmalloc (sizeof (Scsi_Cmnd),
GFP_KERNEL | GFP_DMA);
- memset (scsicmd, 0, sizeof (Scsi_Cmnd));
+
#else
scsicmd = (Scsi_Cmnd *) scsi_init_malloc (sizeof (Scsi_Cmnd),
GFP_ATOMIC |
GFP_DMA);
@@ -4127,6 +4127,9 @@
return -ENOMEM;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) /* 0x020400 */
+ memset (scsicmd, 0, sizeof (Scsi_Cmnd));
+#endif
scsicmd->host = NULL;
/*
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] megaraid.c
2001-06-12 6:05 [PATCH] megaraid.c Praveen Srinivasan
@ 2001-06-12 16:16 ` Alan Cox
2001-06-12 16:17 ` Alan Cox
1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2001-06-12 16:16 UTC (permalink / raw)
To: Praveen Srinivasan; +Cc: linux-kernel, torvalds, alan
> This patch fixes an instance where an allocation is checked, but only after
> the pointer is memset() - moving the memset further down in the function
> fixes this.
There are a ton of these in the scsi code in Linus tree, Im still merging them
please grab the -ac patch before you waste time on this - there are about
30 or 40 of these already fixed.
The SCSI one is _much_ more problematic because there are pieces of quite high
level code that blindly assumed a scsi command alloc always works etc..
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] megaraid.c
2001-06-12 6:05 [PATCH] megaraid.c Praveen Srinivasan
2001-06-12 16:16 ` Alan Cox
@ 2001-06-12 16:17 ` Alan Cox
1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2001-06-12 16:17 UTC (permalink / raw)
To: Praveen Srinivasan; +Cc: linux-kernel, torvalds, alan
> This patch fixes an instance where an allocation is checked, but only after
> the pointer is memset() - moving the memset further down in the function
>
Linus - please skip this one. There is a newer (1.15d) megaraid driver ready
to go on to you this weekend and it fixes this, pci api usage and security
holes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-06-12 16:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-12 6:05 [PATCH] megaraid.c Praveen Srinivasan
2001-06-12 16:16 ` Alan Cox
2001-06-12 16:17 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).