Skip to contentSkip to conversation

aha1542: add kmalloc type

PATCH New Randy.Dunlap 1 participant 1 message Jan 25, 2004 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aha1542: add kmalloc type

Hi,
Please apply to 2.6.current.

Thanks,
--
~Randy

From: Timmy Yee <[email protected]>

Hi,

In drivers/scsi/aha1542.c, kmalloc() is called with no memtype (i.e. without some flag like GFP_KERNEL). The following patch will fix that.

diff -puN drivers/scsi/aha1542.c~aha1542_kmalloc_type drivers/scsi/aha1542.c

 linux-262-rc1-bk1-rddunlap/drivers/scsi/aha1542.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/aha1542.c renamed from drivers/scsi/aha1542.c~aha1542_kmalloc_type +1 -1
diff -puN drivers/scsi/aha1542.c~aha1542_kmalloc_type drivers/scsi/aha1542.c
@@ -704,7 +704,7 @@ static int aha1542_queuecommand(Scsi_Cmn
 #endif
 		int i;
 		ccb[mbo].op = 2;	/* SCSI Initiator Command  w/scatter-gather */
-		SCpnt->host_scribble = (unsigned char *) kmalloc(512, GFP_DMA);
+		SCpnt->host_scribble = (unsigned char *) kmalloc(512, GFP_KERNEL | GFP_DMA);
 		sgpnt = (struct scatterlist *) SCpnt->request_buffer;
 		cptr = (struct chain *) SCpnt->host_scribble;
 		if (cptr == NULL)

_