Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] UEAGLE : cmv name bug (was cosmetic)

this patch correct a possible bug with cmv_name being static. If there
is 2 modems and the driver is scheduled when filling cmv_name this could
result with garbage in cmv_name. We allocate cmv_name on the stack but
with a small size in order to avoid that.

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

matthieu castet and committed by
Greg Kroah-Hartman
fdf290fd e40abaf6

+1 -1
+1 -1
drivers/usb/atm/ueagle-atm.c
··· 1013 1013 int ret, size; 1014 1014 u8 *data; 1015 1015 char *file; 1016 - static char cmv_name[256] = FW_DIR; 1016 + char cmv_name[FIRMWARE_NAME_MAX]; /* 30 bytes stack variable */ 1017 1017 1018 1018 if (cmv_file[sc->modem_index] == NULL) { 1019 1019 if (UEA_CHIP_VERSION(sc) == ADI930)