[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1370273267.24311.151.camel@edumazet-glaptop>
Date: Mon, 03 Jun 2013 08:27:47 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Pablo Neira Ayuso <pablo@...filter.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kaber@...sh.net
Subject: Re: [PATCH net-next] netlink: allow large data transfers from
user-space
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)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists