Re: [PATCH] ipc,sem block sem_lock on sma->lock during sma initialization
From: Rik van Riel
Date: Sat Nov 22 2014 - 10:54:26 EST
-----BEGIN PGP SIGNED MESSAGE-----
On 11/22/2014 08:56 AM, Manfred Spraul wrote:
> Hi Rik,
> good catch - I completely forgot to check the initialization
> On 11/22/2014 04:40 AM, Rik van Riel wrote:
>> newary initializes a bunch of things after the call to ipc_addid,
>> however some things are initialized inside ipc_addid as well
>> Looking closer at newary, I suppose that it should be possible to
>> move those other initializations before the call to ipc_addid.
>> That would likely get rid of the problem, too.
>> However, I also see this line in newary, and I have no idea what
>> protects that data:
>> ns->used_sems += nsems;
> It should be sem_ids.rwsem, and at least according to the
> documentation both freeary() and newary() hold it.
You're right, that is properly protected already.
All rights reversed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----END PGP SIGNATURE-----
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/