idr: Fix idr_alloc_u32 on 32-bit systems
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 2 Nov 2019 04:25:08 +0000 (00:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 14:36:53 +0000 (15:36 +0100)
commitd0840f62f1a51df5853b3f22ffc5be91438304db
treea0409e28264689d18b2db9f3e4c7519c9e707c90
parent7086d6a65075d96c203a03d464bd439fd81160e5
idr: Fix idr_alloc_u32 on 32-bit systems

[ Upstream commit b7e9728f3d7fc5c5c8508d99f1675212af5cfd49 ]

Attempting to allocate an entry at 0xffffffff when one is already
present would succeed in allocating one at 2^32, which would confuse
everything.  Return -ENOSPC in this case, as expected.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
lib/radix-tree.c