All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Drake <dsd@gentoo.org>
To: nick.cheng@areca.com.tw
Cc: 'James Bottomley' <James.Bottomley@HansenPartnership.com>,
	linux-scsi@vger.kernel.org
Subject: Re: Patch added to scsi-rc-fixes-2.6:  [SCSI] arcmsr: fix message allocation
Date: Mon, 25 Feb 2008 10:14:30 +0000	[thread overview]
Message-ID: <47C29506.4000609@gentoo.org> (raw)
In-Reply-To: <001401c87753$3edf4670$8800a8c0@Nick>

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

       reply	other threads:[~2008-02-25 10:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <001401c87753$3edf4670$8800a8c0@Nick>
2008-02-25 10:14 ` Daniel Drake [this message]
2008-02-25 10:47   ` Patch added to scsi-rc-fixes-2.6: [SCSI] arcmsr: fix message allocation nickcheng
2008-02-25 14:38     ` James Bottomley
2008-02-26  4:29       ` Patch added to scsi-rc-fixes-2.6: [SCSI] arcmsr: fix messageallocation nickcheng
2008-02-26 16:14         ` James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47C29506.4000609@gentoo.org \
    --to=dsd@gentoo.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nick.cheng@areca.com.tw \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.