From: John Dykstra <john.dykstra1@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: Fix sk reference counting in ip_push_pending_frames and ip6_push_pending_frames
Date: Sat, 11 Jul 2009 20:00:53 +0000 [thread overview]
Message-ID: <1247342453.7128.8.camel@Maple> (raw)
In-Reply-To: <4A58EA7B.1000604@gmail.com>
On Sat, 2009-07-11 at 21:39 +0200, Eric Dumazet wrote:
> John Dykstra a écrit :
> > Commit 2b85a34e911bf483c27cfdd124aeb1605145dc80 "net: No more
> expensive
> > sock_hold()/sock_put() on each tx" used sk_wmem_alloc rather than
> the struct sock reference
> > count to track in-flight transmit-path packets. However, it missed
> the __sock_put() calls
> > in ip_push_pending_frames() and ip6_push_pending_frames(). This
> results in too-small
> > reference counts when UDP or RAW sockets are used to send more than
> one MTU of data. This
> > in turn could lead to struct sock being freed and reused while it is
> still part of an
> > active socket.
> >
> > A wide variety of socket symptoms may be fixed by this patch. It
> also fixes one cause
> > of WARN_ON's in sk_del_node_init() and sk_nulls_del_node_init_rcu().
> >
> > Signed-off-by: John Dykstra <john.dykstra1@gmail.com>
>
> Nice, but are you aware same patch was already posted, and is waiting
> for David
> approval ?
>
> http://patchwork.ozlabs.org/patch/29618/
<sigh> No, I wasn't. It took me a while to track down where the
reference counts were going wrong, and during that time I wasn't
tracking netdev traffic.
At least it's fixed.
-- John
prev parent reply other threads:[~2009-07-11 20:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-11 17:46 [PATCH] net: Fix sk reference counting in ip_push_pending_frames and ip6_push_pending_frames John Dykstra
2009-07-11 19:39 ` Eric Dumazet
2009-07-11 20:00 ` John Dykstra [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=1247342453.7128.8.camel@Maple \
--to=john.dykstra1@gmail.com \
--cc=eric.dumazet@gmail.com \
--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).