netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@o2.pl>
To: netdev@vger.kernel.org
Subject: Re: [PATCH] AF_UNIX recv/shutdown race
Date: Mon, 20 Nov 2006 13:05:17 +0100	[thread overview]
Message-ID: <20061120120517.GD1001@ff.dom.local> (raw)
In-Reply-To: <51488.68.160.147.35.1163979646.squirrel@webmail.metacarta.com>

On 20-11-2006 00:40, jmalicki@metacarta.com wrote:
...
> @@ -650,7 +651,7 @@ static int unix_autobind(struct socket *
>  	struct unix_address * addr;
>  	int err;
> 
> -	mutex_lock(&u->readlock);
> +	unix_state_rlock(sk);

Here follows:
        err = 0;
        if (u->addr)
                goto out;

        err = -ENOMEM;
        addr = kzalloc(sizeof(*addr) + sizeof(short) + 16, GFP_KERNEL);
        if (!addr)
                goto out;

Are you sure you can use spin_lock here? 

Jarek P.


  reply	other threads:[~2006-11-20 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-19 23:40 [PATCH] AF_UNIX recv/shutdown race jmalicki
2006-11-20 12:05 ` Jarek Poplawski [this message]
2006-11-20 12:46   ` Joe Malicki

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=20061120120517.GD1001@ff.dom.local \
    --to=jarkao2@o2.pl \
    --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).