Re: Patch added to scsi-rc-fixes-2.6: [SCSI] arcmsr: fix message allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



nickcheng wrote:
Hi,
I definitely agree it is in atomic context but why is the memory not for
DMA?
Would you please show me why?

It would probably be easier if you could explain where you believe the memory IS used for DMA :)

Anyway, looking at ARCMSR_MESSAGE_READ_RQBUFFER
current code does this:
		ver_addr = kmalloc(1032, GFP_ATOMIC);

Here are the cases when that buffer is used:

checking for successful malloc: not DMA
		if (!ver_addr) {

copying the address: not DMA
		ptmpQbuffer = ver_addr;

memcpying 1 byte into the buffer: not DMA
			memcpy(ptmpQbuffer, pQbuffer, 1);

incrementing address: not DMA
			ptmpQbuffer++;

memcpying from the buffer: not DMA
		memcpy(pcmdmessagefld->messagedatabuffer, ver_addr, allxfer_len);

freeing the buffer: not DMA
		kfree(ver_addr);

Daniel
-
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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux