On Tue, 14 Sep 2010 09:47:05 -0500 James Bottomley <James.Bottomley@xxxxxxx> wrote: > On Tue, 2010-09-14 at 21:26 +0800, Hillf Danton wrote: > > The kzalloc for sshdr is replaced with sshdr struct on stack, then it > > looks safer. > > This premise is completely wrong. There are lots of times stack can be > wrong for driver code especially: DMA or aligment but for general code, This patch looks fine about DMA because scsi_execute_req() doesn't do DMA with sshdr. scsi_execute_req() allocates a buffer for DMA with kzalloc. > since we went to 4k stacks we have very little space; a lot of arrays > and structures got moved to kmalloc to reduce stack consumption. Yes but scsi_sense_hdr is just 8 bytes so I think that this conversion could be fine. Actually, I sent a patch to do the same long ago. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html