Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kaber@trash.net
Subject: Re: [PATCH net-next] netlink: allow large data transfers from user-space
Date: Mon, 03 Jun 2013 08:27:47 -0700	[thread overview]
Message-ID: <1370273267.24311.151.camel@edumazet-glaptop> (raw)
In-Reply-To: <1370273152.24311.150.camel@edumazet-glaptop>

On Mon, 2013-06-03 at 08:25 -0700, Eric Dumazet wrote:
> On Mon, 2013-06-03 at 17:10 +0200, Pablo Neira Ayuso wrote:
> 
> > +	if (size <= PAGE_SIZE)
> > +		return alloc_skb(size, GFP_KERNEL);
> > +
> 
> That would be
> 
>  	if (size < SKB_WITH_OVERHEAD(PAGE_SIZE))
> 
> or
> 
> 	if (size < SKB_MAX_HEAD(0))
> 

I shoule have used '<=' instead of '<'

or

	if (size <= NLMSG_GOODSIZE)

      reply	other threads:[~2013-06-03 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 15:10 [PATCH net-next] netlink: allow large data transfers from user-space Pablo Neira Ayuso
2013-06-03 15:25 ` Eric Dumazet
2013-06-03 15:27   ` Eric Dumazet [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=1370273267.24311.151.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.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