]> www.infradead.org Git - users/jedix/linux-maple.git/commit
um: remove variable stack array in os_rcv_fd_msg()
authorJohannes Berg <johannes.berg@intel.com>
Thu, 4 Jul 2024 10:20:36 +0000 (12:20 +0200)
committerRichard Weinberger <richard@nod.at>
Thu, 12 Sep 2024 17:51:26 +0000 (19:51 +0200)
commitec24b988eb26e21f37707d090ec3ab53c51fd386
tree8cc74023d7c21be037a922d42c8034fb2ad91b32
parent431c1646e1f86b949fa3685efc50b660a364c2b6
um: remove variable stack array in os_rcv_fd_msg()

When generalizing this, I was in the mindset of this being
"userspace" code, but even there we should not use variable
arrays as the kernel is moving away from allowing that.

Simply reserve (but not use) enough space for the maximum
two descriptors we might need now, and return an error if
attempting to receive more than that.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202407041459.3SYg4TEi-lkp@intel.com/
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/os-Linux/file.c