Subject: Re: [PATCH] AF_UNIX recv/shutdown race

From: Joe Malicki <[email-masked]>
Date: Mon, 20 Nov 2006 07:46:27 -0500

Jarek Poplawski wrote:
> On 20-11-2006 00:40, [email-masked] 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.

You're absolutely right, I was mistaken (was being too blind about
that).  I'm testing a new version now that's much more localized that
shouldn't have that problem.

Joe Malicki