Commit c9503ff2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ipc locking fix

From: badari <pbadari@us.ibm.com>

I ran into an ipc hang while trying to shutdown a database.  The problem is
due to missing sem_unlock() in find_undo().
parent 66154b6e
......@@ -972,8 +972,10 @@ static struct sem_undo *find_undo(int semid)
if(sma==NULL)
goto out;
un = ERR_PTR(-EIDRM);
if (sem_checkid(sma,semid))
goto out_unlock;
if (sem_checkid(sma,semid)) {
sem_unlock(sma);
goto out;
}
nsems = sma->sem_nsems;
sem_unlock(sma);
......@@ -1004,7 +1006,6 @@ static struct sem_undo *find_undo(int semid)
sma->undo = new;
sem_unlock(sma);
un = new;
out_unlock:
unlock_semundo();
out:
return un;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment