netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: david.stevens@oracle.com
Cc: netdev@vger.kernel.org, sowmini.varadhan@oracle.com,
	Raghuram.Kothakota@oracle.com
Subject: Re: [PATCHv7 net-next 2/4] sunvnet: make transmit path zero-copy in the kernel
Date: Mon, 29 Sep 2014 15:28:02 -0400 (EDT)	[thread overview]
Message-ID: <20140929.152802.1895227801613062829.davem@davemloft.net> (raw)
In-Reply-To: <54299A87.80305@oracle.com>

From: David L Stevens <david.stevens@oracle.com>
Date: Mon, 29 Sep 2014 13:44:39 -0400

> @@ -788,12 +874,16 @@ static int vnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  	struct vio_net_desc *d;
>  	unsigned long flags;
>  	unsigned int len;
> -	void *tx_buf;
> -	int i, err;
> +	struct sk_buff *freeskbs = NULL;
> +	int i, err, txi;
> +	void *start = NULL;
> +	int nlen = 0;
> 
>  	if (unlikely(!port))
>  		goto out_dropped;
> 
> +	skb = vnet_skb_shape(skb, &start, &nlen);
> +
>  	spin_lock_irqsave(&port->vio.lock, flags);
> 
>  	dr = &port->vio.drings[VIO_DRIVER_TX_RING];

vnet_skb_shape() can return NULL, I don't think you're handling that case
at all and are blindly derefencing a potentially NULL skb pointer.

      reply	other threads:[~2014-09-29 19:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 17:44 [PATCHv7 net-next 2/4] sunvnet: make transmit path zero-copy in the kernel David L Stevens
2014-09-29 19:28 ` David Miller [this message]

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=20140929.152802.1895227801613062829.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Raghuram.Kothakota@oracle.com \
    --cc=david.stevens@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=sowmini.varadhan@oracle.com \
    /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).