public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@bytheb•org>
To: Eric Dumazet <eric.dumazet@gmail•com>, netdev@vger•kernel.org
Subject: Re: [PATCH v2] [net] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag
Date: Sun, 20 Sep 2015 15:38:38 -0400	[thread overview]
Message-ID: <87d1xc7uf5.fsf@bytheb.org> (raw)
In-Reply-To: <87h9mo7ui9.fsf@bytheb.org> (Aaron Conole's message of "Sun, 20 Sep 2015 15:36:46 -0400")


Resending, I accidentally dropped the list.

> Eric Dumazet <eric.dumazet@gmail•com> writes:
>
>> On Sun, 2015-09-20 at 15:07 -0400, Aaron Conole wrote:
>>> Eric Dumazet <eric.dumazet@gmail•com> writes:
>>> 
>>> > On Sun, 2015-09-20 at 05:18 -0400, Aaron Conole wrote:
>>> >> From: Aaron Conole <aaron@bytheb•org>
>>> >> 
>>> >
>>> > I am wondering what this is expected to do, and how this code would
>>> > possibly not trigger a crash.
>>> Are you suspecting it should crash from a possible double-lock case?
>>> On line 2125, there is an unconditional unlock, which should be 
>>> guaranteeing that there is no longer a condition to 'double lock' the
>>> socket.
>>
>> Not at all.
>>
>> I am suggesting there is a big difference between
>>
>> unix_state_lock(&sk);
>>
>> and
>>
>> unix_state_lock(sk);
>>
>> Can you see it ?

Wow!

That's an excellent catch, thank you! I did test the originally
submitted patch, and got no oops, bug, panic, etc (I usually have
panic_on_oops set to 1 when first testing new code).

I guess I got very lucky, somehow. I'll change this, and make sure
to retest.

I will also try to enhance the python case attached to the bug to
include a filepointer as well, and will repost a v3 when I have done
this.

Thanks,
-Aaron

      parent reply	other threads:[~2015-09-20 19:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-20  9:18 [PATCH v2] [net] af_unix: return data from multiple SKBs on recv() with MSG_PEEK flag Aaron Conole
2015-09-20 16:46 ` Eric Dumazet
2015-09-20 19:07   ` Aaron Conole
2015-09-20 19:21     ` Eric Dumazet
     [not found]       ` <87h9mo7ui9.fsf@bytheb.org>
2015-09-20 19:38         ` Aaron Conole [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=87d1xc7uf5.fsf@bytheb.org \
    --to=aconole@bytheb$(echo .)org \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /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