Re: [PATCH v2] drivers/net/usb/hso.c: prevent reading uninitializedmemory

From: Alan Cox
Date: Thu Sep 16 2010 - 12:45:50 EST


->tiocmget;
> >
> > + memset(&icount, 0, sizeof(struct serial_icounter_struct));
> > +
>
> Move the above to after the spinlocks.

Why - its a local variable ?

Easier to write

struct serial_icounter_struct icount = { 0 };

though
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/