From: Daniel Borkmann <daniel@iogearbox•net>
To: maninder1.s@samsung•com, Vaneet Narang <v.narang@samsung•com>
Cc: "davem@davemloft•net" <davem@davemloft•net>,
"willemb@google•com" <willemb@google•com>,
"edumazet@google•com" <edumazet@google•com>,
"eyal.birger@gmail•com" <eyal.birger@gmail•com>,
"tklauser@distanz•ch" <tklauser@distanz•ch>,
"fruggeri@aristanetworks•com" <fruggeri@aristanetworks•com>,
"dwmw2@infradead•org" <dwmw2@infradead•org>,
"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
"linux-kernel@vger•kernel.org" <linux-kernel@vger•kernel.org>,
PANKAJ MISHRA <pankaj.m@samsung•com>,
Geon-ho Kim <gh007.kim@samsung•com>,
Hak-Bong Lee <hakbong5.lee@samsung•com>
Subject: Re: [PATCH] af_packet: Raw socket destruction warning fix
Date: Tue, 26 Jan 2016 01:13:33 +0100 [thread overview]
Message-ID: <56A6BA2D.2090604@iogearbox.net> (raw)
In-Reply-To: <2036003091.741801453376409338.JavaMail.weblogic@ep2mlwas01a>
On 01/21/2016 12:40 PM, Maninder Singh wrote:
>> The other sock_put() in packet_release() to drop the final ref and call into
>> sk_free(), which drops the 1 ref on the sk_wmem_alloc from init time. Since you
>> got into __sk_free() via sock_wfree() destructor, your socket must have invoked
>> packet_release() prior to this (perhaps kernel destroying the process).
>>
>> What kernel do you use?
>
> Issue is coming for 3.10.58.
[ sorry for late reply ]
What driver are you using (is that in-tree)? Can you reproduce the same issue
with a latest -net kernel, for example (or, a 'reasonably' recent one like 4.3 or
4.4)? There has been quite a bit of changes in err queue handling (which also
accounts rmem) as well. How reliably can you trigger the issue? Does it trigger
with a completely different in-tree network driver as well with your tests? Would
be useful to track/debug sk_rmem_alloc increases/decreases to see from which path
new rmem is being charged in the time between packet_release() and packet_sock_destruct()
for that socket ...
>>> Driver calls dev_kfree_skb_any->dev_kfree_skb_irq
>>> and it adds buffer in completion queue to free and raises softirq NET_TX_SOFTIRQ
>>>
>>> net_tx_action->__kfree_skb->skb_release_all->skb_release_head_state->sock_wfree->
>>> __sk_free->packet_sock_destruct
>>>
>>> Also purging of receive queue has been taken care in other protocols.
next prev parent reply other threads:[~2016-01-26 0:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 11:40 [PATCH] af_packet: Raw socket destruction warning fix Maninder Singh
2016-01-26 0:13 ` Daniel Borkmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-02-10 12:43 Vaneet Narang
2016-02-10 14:56 ` Eric Dumazet
2016-02-05 5:23 Vaneet Narang
2016-01-18 10:11 Vaneet Narang
2016-01-18 11:08 ` Daniel Borkmann
2016-01-18 6:37 Maninder Singh
2016-01-18 9:44 ` Daniel Borkmann
2016-01-18 10:29 ` Daniel Borkmann
2016-02-05 11:26 ` Eric Dumazet
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=56A6BA2D.2090604@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=dwmw2@infradead$(echo .)org \
--cc=edumazet@google$(echo .)com \
--cc=eyal.birger@gmail$(echo .)com \
--cc=fruggeri@aristanetworks$(echo .)com \
--cc=gh007.kim@samsung$(echo .)com \
--cc=hakbong5.lee@samsung$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=maninder1.s@samsung$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pankaj.m@samsung$(echo .)com \
--cc=tklauser@distanz$(echo .)ch \
--cc=v.narang@samsung$(echo .)com \
--cc=willemb@google$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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