]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
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)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:21 +0000 (14:21 -0300)
commitfafa88583c6d49483c967d341a1c21b1c9f31ceb
treee5fcb4a21b6578ef6fa4d69d31f053ffdd682b6c
parentcf2a20f3e48f160606ecb24e21aeb8d4e21ff274
idr: Fix idr_alloc_u32 on 32-bit systems

BugLink: https://bugs.launchpad.net/bugs/1855787
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
lib/radix-tree.c