linux-stable/include
Kees Cook 69e14b7a78 nodemask: Fix return values to be unsigned
[ Upstream commit 0dfe54071d ]

The nodemask routines had mixed return values that provided potentially
signed return values that could never happen. This was leading to the
compiler getting confusing about the range of possible return values
(it was thinking things could be negative where they could not be). Fix
all the nodemask routines that should be returning unsigned
(or bool) values. Silences:

 mm/swapfile.c: In function ‘setup_swap_info’:
 mm/swapfile.c:2291:47: error: array subscript -1 is below array bounds of ‘struct plist_node[]’ [-Werror=array-bounds]
  2291 |                                 p->avail_lists[i].prio = 1;
       |                                 ~~~~~~~~~~~~~~^~~
 In file included from mm/swapfile.c:16:
 ./include/linux/swap.h:292:27: note: while referencing ‘avail_lists’
   292 |         struct plist_node avail_lists[]; /*
       |                           ^~~~~~~~~~~

Reported-by: Christophe de Dinechin <dinechin@redhat.com>
Link: https://lore.kernel.org/lkml/20220414150855.2407137-3-dinechin@redhat.com/
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Yury Norov <yury.norov@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:45:15 +02:00
..
acpi ACPI: bus: Eliminate acpi_bus_get_device() 2022-04-05 19:49:26 +02:00
asm-generic bug: Have __warn() prototype defined unconditionally 2022-04-26 10:59:57 +02:00
clocksource
crypto
drm drm/format-helper: Rename drm_fb_xrgb8888_to_mono_reversed() 2022-06-09 10:29:53 +02:00
dt-bindings dt-bindings: clk: mpfs: add defines for two new clocks 2022-04-22 18:40:15 -07:00
keys
kunit
kvm
linux nodemask: Fix return values to be unsigned 2022-06-14 18:45:15 +02:00
math-emu
media
memory memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-04-21 17:00:24 +02:00
misc
net netfilter: nf_tables: bail out early if hardware offload is not supported 2022-06-14 18:45:05 +02:00
pcmcia
ras
rdma
scsi scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac() 2022-06-09 10:30:26 +02:00
soc net: mscc: ocelot: mark traps with a bool instead of keeping them in a list 2022-05-05 19:15:14 -07:00
sound ASoC: cs35l41: Fix an out-of-bounds access in otp_packed_element_t 2022-06-09 10:29:55 +02:00
target
trace tcp: add accessors to read/set tp->snd_cwnd 2022-06-14 18:44:56 +02:00
uapi binder: fix sender_euid type in uapi header 2022-06-09 10:30:56 +02:00
vdso
video
xen