Re: [PATCH] Topcliff PHUB: Generate PacketHub driver

From: Alan Cox
Date: Tue Jun 08 2010 - 03:52:56 EST


On Tue, 8 Jun 2010 14:46:31 +0900
"Masayuki Ohtake" <masa-korg@xxxxxxxxxxxxxxx> wrote:

> Hi Alan
>
> > > Remember here ioctl isn't single threaded so you may want to double check
> >
> > > some of these
> >
> > The above copy_from_user is Copy global variable to local variable.
> > Thus, We think this code has re-entrant.
> The above is not true.
> Our ioctl routine is just used under single pthread.

What if someone else chooses to open it and run multiple threads through
it. What if the code changes. What about malicious attempts to confuse
the driver ?

The fact your own current userspace does not do this does not mean it can
be ignored.

Alan
--
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/