lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 30 Mar 2013 21:30:16 -0400 From: Rik van Riel <riel@...riel.com> To: Sasha Levin <sasha.levin@...cle.com> CC: torvalds@...ux-foundation.org, davidlohr.bueso@...com, linux-kernel@...r.kernel.org, akpm@...ux-foundation.org, hhuang@...hat.com, jason.low2@...com, walken@...gle.com, lwoodman@...hat.com, chegu_vinod@...com, "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> Subject: Re: [PATCH -mm -next] ipc,sem: untangle RCU locking with find_alloc_undo On 03/30/2013 09:35 AM, Sasha Levin wrote: > I'm thinking that the solution is as simple as: Your patch is absolutely correct. All it needs now is your signed-off-by, so Andrew can merge it into -mm :) Reviewed-by: Rik van Riel <riel@...hat.com> > diff --git a/ipc/sem.c b/ipc/sem.c > index 6e109ef..ac36671 100644 > --- a/ipc/sem.c > +++ b/ipc/sem.c > @@ -1333,8 +1333,10 @@ static int semctl_main(struct ipc_namespace *ns, int semid, int semnum, > /* GETVAL, GETPID, GETNCTN, GETZCNT: fall-through */ > } > err = -EINVAL; > - if(semnum < 0 || semnum >= nsems) > - goto out_unlock; > + if(semnum < 0 || semnum >= nsems) { > + rcu_read_unlock(); > + goto out_wakeup; > + } > > sem_lock(sma, NULL, -1); > curr = &sma->sem_base[semnum]; > > But I'm not 100% sure if I don't mess up anything else. I checked the surrounding code, it all looks fine. -- All rights reversed. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists