From: Johannes Berg <johannes@sipsolutions.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6] netlink: netlink_recvmsg() fix
Date: Mon, 16 Aug 2010 08:31:16 +0200 [thread overview]
Message-ID: <1281940276.3683.7.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1281940172.2942.81.camel@edumazet-laptop>
On Mon, 2010-08-16 at 08:29 +0200, Eric Dumazet wrote:
> Le lundi 16 août 2010 à 08:22 +0200, Johannes Berg a écrit :
> > On Mon, 2010-08-16 at 08:10 +0200, Eric Dumazet wrote:
> >
> > > We'll find another way to address the problem.
> >
> > For my understanding: The problem is that the save/restore of the
> > frag_list skb can race so a second reader will not see the frag_list skb
> > because it gets there while it's NULL. This happens with MSG_PEEK, or
> > with clones of the SKB since skb_shared_info is invariant across clones.
> >
> > Correct?
> >
>
> Yes
>
> I believe we should have a mutual exclusion for the critical section.
>
> (setting pointer to NULL, ...., setting pointer back to its orig value)
Yeah, that'd work, but I'm wondering now why I did this at all. The code
already restricts the data copying to skb->len, which will not include
the frag_list, so it should be OK to just leave it intact? I'll go and
look at that in more detail and try it.
johannes
next prev parent reply other threads:[~2010-08-16 6:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 13:16 [PATCH net-next-2.6] netlink: netlink_recvmsg() fix Eric Dumazet
2010-07-20 15:20 ` Eric Dumazet
2010-07-21 8:05 ` Johannes Berg
2010-07-21 8:20 ` Eric Dumazet
2010-07-21 8:43 ` Eric Dumazet
2010-07-26 4:55 ` David Miller
2010-07-26 20:08 ` David Miller
2010-07-26 20:39 ` Eric Dumazet
2010-07-26 20:48 ` David Miller
2010-07-26 20:55 ` Eric Dumazet
2010-08-13 14:00 ` Johannes Berg
2010-08-13 14:35 ` Johannes Berg
2010-08-13 14:48 ` Eric Dumazet
2010-08-13 15:13 ` Johannes Berg
2010-08-15 5:37 ` David Miller
2010-08-16 5:25 ` Johannes Berg
2010-08-16 6:10 ` Eric Dumazet
2010-08-16 6:21 ` David Miller
2010-08-16 6:22 ` Johannes Berg
2010-08-16 6:29 ` Eric Dumazet
2010-08-16 6:31 ` Johannes Berg [this message]
2010-08-16 7:20 ` [PATCH] netlink: fix compat recvmsg Johannes Berg
2010-08-16 12:50 ` Eric Dumazet
2010-08-16 12:54 ` Johannes Berg
2010-08-16 13:01 ` Eric Dumazet
2010-08-19 6:36 ` 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=1281940276.3683.7.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.