mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
2nd part of the fixes needed for http://bugzilla.kernel.org/show_bug.cgi?id=11796. When the idr tree is either grown or shrunk, then the update to the number of layers and the top pointer were not atomic. This race caused crashes. The attached patch fixes that by replicating the layers counter in each layer, thus idr_find doesn't need idp->layers anymore. Signed-off-by: Manfred Spraul <[email protected]> Cc: Clement Calmels <[email protected]> Cc: Nadia Derbey <[email protected]> Cc: Pierre Peiffer <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>