]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
XArray: Fix xas_find returning too many entries
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 18 Jan 2020 03:13:21 +0000 (22:13 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 30 Jan 2020 15:28:14 +0000 (16:28 +0100)
commitad422bd65a3ad6e4e3890e768c28ff63528994d5
tree47835913f7ecf13120e99b90b463f5742b4caf2e
parent375fd52d5cf809d3503da72e5cfaf2017e7cbca5
XArray: Fix xas_find returning too many entries

BugLink: https://bugs.launchpad.net/bugs/1861385
commit c44aa5e8ab58b5f4cf473970ec784c3333496a2e upstream.

If you call xas_find() with the initial index > max, it should have
returned NULL but was returning the entry at index.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
lib/test_xarray.c
lib/xarray.c