mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 12:29:33 +01:00
In cyapa_update_fw_store(), if 'count' is zero, the write to fw_name[count-1] underflows the array. Presumably that's not possible in normal operation, as its caller sysfs_kf_write() already checks for zero. Regardless it's a good idea to check for the error explicitly and avoid undefined behavior. Fixes the following warning with an UBSAN kernel: vmlinux.o: warning: objtool: .text.cyapa_update_fw_store: unexpected end of section Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/73ae0bb3c656735890d914b74c9d6bb40c25d3cd.1742852847.git.jpoimboe@kernel.org Closes: https://lore.kernel.org/oe-kbuild-all/202503171547.LlCTJLQL-lkp@intel.com/ |
||
|---|---|---|
| .. | ||
| alps.c | ||
| alps.h | ||
| amimouse.c | ||
| appletouch.c | ||
| atarimouse.c | ||
| bcm5974.c | ||
| byd.c | ||
| byd.h | ||
| cyapa_gen3.c | ||
| cyapa_gen5.c | ||
| cyapa_gen6.c | ||
| cyapa.c | ||
| cyapa.h | ||
| cypress_ps2.c | ||
| cypress_ps2.h | ||
| elan_i2c_core.c | ||
| elan_i2c_i2c.c | ||
| elan_i2c_smbus.c | ||
| elan_i2c.h | ||
| elantech.c | ||
| elantech.h | ||
| focaltech.c | ||
| focaltech.h | ||
| gpio_mouse.c | ||
| hgpk.c | ||
| hgpk.h | ||
| inport.c | ||
| Kconfig | ||
| lifebook.c | ||
| lifebook.h | ||
| logibm.c | ||
| logips2pp.c | ||
| logips2pp.h | ||
| Makefile | ||
| maplemouse.c | ||
| pc110pad.c | ||
| psmouse-base.c | ||
| psmouse-smbus.c | ||
| psmouse.h | ||
| rpcmouse.c | ||
| sentelic.c | ||
| sentelic.h | ||
| sermouse.c | ||
| synaptics_i2c.c | ||
| synaptics_usb.c | ||
| synaptics.c | ||
| synaptics.h | ||
| touchkit_ps2.c | ||
| touchkit_ps2.h | ||
| trackpoint.c | ||
| trackpoint.h | ||
| vmmouse.c | ||
| vmmouse.h | ||
| vsxxxaa.c | ||