From: John Fastabend <john.r.fastabend@intel.com>
To: David Miller <davem@davemloft.net>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"gospo@redhat.com" <gospo@redhat.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [net-2.6 PATCH 2/6] net: remove kfree_skb on a NULL pointer in af_netlink.c
Date: Mon, 21 Sep 2009 12:04:35 +0000 [thread overview]
Message-ID: <4AB76BD3.80802@intel.com> (raw)
In-Reply-To: <20090917.182445.240085155.davem@davemloft.net>
David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Thu, 17 Sep 2009 17:57:29 -0700
>
>
>> From: John Fastabend <john.r.fastabend@intel.com>
>>
>> This removes a kfree_skb that is being called on a NULL pointer when
>> do_one_broadcast() is sucessful. And moves the kfree_skb into
>> do_one_broadcast() for the error case.
>>
>> Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>
> kfree_skb() on a NULL pointer is completely legal.
>
OK, but this depends on the unlikely() macro in kfree_skb() to catch a
case that is the expected non-error case. Would it be better to wrap the
kfree_skb() in an if statement to avoid hitting the unlikely() macro?
Or is the performance hit from the unlikely() macro so small this is not
an issue? Thanks for looking at these.
john.
next prev parent reply other threads:[~2009-09-21 19:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 0:57 [net-2.6 PATCH 1/6] net: initialize rmem_alloc and omem_alloc to 0 in netlink socket Jeff Kirsher
2009-09-18 0:57 ` [net-2.6 PATCH 2/6] net: remove kfree_skb on a NULL pointer in af_netlink.c Jeff Kirsher
2009-09-18 1:24 ` David Miller
2009-09-21 12:04 ` John Fastabend [this message]
2009-09-21 20:54 ` David Miller
2009-09-18 0:57 ` [net-2.6 PATCH 3/6] net: fix vlan_get_size to include vlan_flags size Jeff Kirsher
2009-09-18 0:58 ` [net-2.6 PATCH 4/6] net: fix nlmsg len size for skb when error bit is set Jeff Kirsher
2009-09-18 0:58 ` [net-2.6 PATCH 5/6] net: fix sock locking for sk_err field in netlink Jeff Kirsher
2009-09-18 1:27 ` David Miller
2009-09-18 0:58 ` [net-2.6 PATCH 6/6] net: fix double skb free in dcbnl Jeff Kirsher
2009-09-18 1:29 ` [net-2.6 PATCH 1/6] net: initialize rmem_alloc and omem_alloc to 0 in netlink socket David Miller
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=4AB76BD3.80802@intel.com \
--to=john.r.fastabend@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-scsi@vger.kernel.org \
--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).