netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: netdev@vger.kernel.org
Cc: christopher.leech@intel.com
Subject: NET_DMA: where do we ever call dma_skb_copy_datagram_iovec() with NULL pinned_list?
Date: Sat, 21 Jul 2007 04:48:29 +0100	[thread overview]
Message-ID: <20070721034829.GL21668@ftp.linux.org.uk> (raw)

	AFAICS, all callers of dma_skb_copy_datagram_iovec()
are either
	* recursive for fragments, pass pinned_list unchanged or
	* called from tcp, with pinned_list coming from
tp->ucopy.pinned_list and only when tp->ucopy.dma_chan is non-NULL.

Now, all non-NULL assignments to ->dma_chan have the same form:
	if (!tp->ucopy.dma_chan && tp->ucopy.pinned_list)
		tp->ucopy.dma_chan = get_softnet_dma();
IOW, if ->ucopy.pinned_list stays NULL, ->ucopy.dma_chan will do the same.

Moreover, any place that resets ->ucopy.pinned_list will also reset
->ucopy.dma_chan.

IOW, we can't ever get non-NULL tp->ucopy.dma_chan while tp->ucopy.pinned_list
is NULL.  So how can we ever get to the dma_memcpy_to_kernel_iovec()?

             reply	other threads:[~2007-07-21  3:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-21  3:48 Al Viro [this message]
2007-07-24 17:24 ` NET_DMA: where do we ever call dma_skb_copy_datagram_iovec() with NULL pinned_list? Andrew Grover
2007-07-24 18:14 ` Nelson, Shannon

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=20070721034829.GL21668@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=christopher.leech@intel.com \
    --cc=netdev@vger.kernel.org \
    /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 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).