Skip to content

Commit

Permalink
[PATCH] UEAGLE : cmv name bug (was cosmetic)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
matthieu castet authored and Greg Kroah-Hartman committed Feb 1, 2006
1 parent e40abaf commit fdf290f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/atm/ueagle-atm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ static int request_cmvs(struct uea_softc *sc,
int ret, size;
u8 *data;
char *file;
static char cmv_name[256] = FW_DIR;
char cmv_name[FIRMWARE_NAME_MAX]; /* 30 bytes stack variable */

if (cmv_file[sc->modem_index] == NULL) {
if (UEA_CHIP_VERSION(sc) == ADI930)
Expand Down

0 comments on commit fdf290f

Please sign in to comment.