All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: badari <pbadari@us.ibm.com>
Cc: andrew <akpm@osdl.org>, lkml <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.5-rc2-mm2 ipc hang fix
Date: Fri, 26 Mar 2004 06:57:50 +0100	[thread overview]
Message-ID: <4063C65E.3030608@colorfullife.com> (raw)
In-Reply-To: <40638D1F.C296F528@us.ibm.com>

badari wrote:

>--- linux/ipc/sem.c     2004-03-26 05:19:22.833959160 -0800
>+++ linux.new/ipc/sem.c 2004-03-26 05:19:57.047757872 -0800
>@@ -972,8 +972,10 @@ static struct sem_undo *find_undo(int se
>        if(sma==NULL)
>                goto out;
>        un = ERR_PTR(-EIDRM);
>-       if (sem_checkid(sma,semid))
>+       if (sem_checkid(sma,semid)) {
>+               sem_unlock(sma);
>                goto out_unlock;
>+       }
>        nsems = sma->sem_nsems;
>        sem_unlock(sma);
>  
>
[snip]

> out_unlock:
>         unlock_semundo();
> out:
>         return un;
> }

Thanks for finding the bug - out_unlock unlocks the wrong spinlock, 
that's why I didn't notice it while searching for the bug.
But I think your fix is wrong: the "goto out_unlock" must be replaced 
with "goto out": the semundo spinlock is not held.

--
    Manfred


  reply	other threads:[~2004-03-26  5:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-26  1:53 2.6.5-rc2-mm2 ipc hang fix badari
2004-03-26  5:57 ` Manfred Spraul [this message]
2004-03-26 17:16   ` Badari Pulavarty
2004-03-26 17:36   ` 2.6.5-rc2-mm2 ipc hang fix (final version) Badari Pulavarty

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=4063C65E.3030608@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbadari@us.ibm.com \
    /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.