From: Eric Dumazet <eric.dumazet@gmail.com>
To: Saurabh Kr <krsaurabh@juniper.net>,
Angelo Rizzi <angelo.rizzi@3dautomazione.it>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Sarvendra Vikram Singh <svikrams@juniper.net>,
Kunal Sharma <skunal@juniper.net>
Subject: Re: net_tx_action race condition?
Date: Wed, 28 Mar 2018 09:32:18 -0700 [thread overview]
Message-ID: <7f70cdb4-4205-169a-0204-fd5cd72b44f1@gmail.com> (raw)
In-Reply-To: <BY2PR05MB712796CB064F3202FEFA328B3A30@BY2PR05MB712.namprd05.prod.outlook.com>
On 03/28/2018 12:30 AM, Saurabh Kr wrote:
> Hi Eric/Angelo,
>
> We are seeing the assertion error in linux kernel 2.4.29 “*kernel: KERNEL: assertion (atomic_read(&skb->users) == 0) failed at dev.c(1397)**”.* Based on patch provided (_https://patchwork.kernel.org/patch/5368051/_ ) we merged the changes in linux kernel 2.4.29 but we are still facing the assertion error at dev.c (1397). Please let me know your thoughts.
>
> *Before Merge**(linux 2.4.29)*
> ---------------------------------
>
> static void net_tx_action(struct softirq_action *h)
> {
> int cpu = smp_processor_id();
>
> if (softnet_data[cpu].completion_queue) {
> struct sk_buff *clist;
>
> local_irq_disable();
> clist = softnet_data[cpu].completion_queue; // Existing code
> softnet_data[cpu].completion_queue = NULL;
> local_irq_enable();
>
> while (clist != NULL) {
> struct sk_buff *skb = clist;
> clist = clist->next;
>
> BUG_TRAP(atomic_read(&skb->users) == 0);
> __kfree_skb(skb);
> }
> }
>
> ---------
>
> *After Merge the changes based on available patch**(linux 2.4.29)**:*
> ------------------------------------------------------------------------------
>
> static void net_tx_action(struct softirq_action *h)
> {
> int cpu = smp_processor_id();
>
> if (softnet_data[cpu].completion_queue) {
> struct sk_buff *clist;
>
> local_irq_disable();
> clist = *(volatile typeof(softnet_data[cpu].completion_queue) *)&( softnet_data[cpu].completion_queue); // Modified line based on available patch
> softnet_data[cpu].completion_queue = NULL;
> local_irq_enable();
>
> while (clist != NULL) {
> struct sk_buff *skb = clist;
> clist = clist->next;
>
> BUG_TRAP(atomic_read(&skb->users) == 0);
> __kfree_skb(skb);
> }
> }
> ………….
>
> Thanks & regards,
> Saurabh
>
Thats simply prove (again) that this 'fix' was not the proper one.
I have no idea what is wrong, and there is no way I am going to look at 2.4.29 kernel...
next parent reply other threads:[~2018-03-28 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BY2PR05MB712796CB064F3202FEFA328B3A30@BY2PR05MB712.namprd05.prod.outlook.com>
2018-03-28 16:32 ` Eric Dumazet [this message]
2014-11-24 13:29 net_tx_action race condition? Angelo Rizzi
2014-11-24 15:08 ` Herbert Xu
2014-11-24 15:33 ` Eric Dumazet
2014-11-24 17:19 ` Angelo Rizzi
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=7f70cdb4-4205-169a-0204-fd5cd72b44f1@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=angelo.rizzi@3dautomazione.it \
--cc=krsaurabh@juniper.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=skunal@juniper.net \
--cc=svikrams@juniper.net \
/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).