Re: O2micro smartcard reader driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Dienstag, 12. Dezember 2006 22:28 schrieb Eric Piel:

Hi

> Thanks a lot for reading my code, I didn't even hope that someone would! 
> I've corrected the copy_to_user (and copy_from_user) code. However I 
> don't know how to do locking for the concurrent ioctls. Indeed, I don't 
> think there is anything preventing two programs to call the driver at 
> the same time. Unfortunately, I've got no idea how to do the locking and 
> surprisingly couldn't find any ioctl code in the kernel doing locking. 
> Maybe I've just not looked at the right place, could you give a me some 
> hint how to do locking for ioctl's ?

I take it back. Reading your code again, it seems to me that it'll
never sleep. In this case you are protected by BKL. If not, you need
to use mutexes, just like eg. in drivers/usb/class/usblp.c

	HTH
		Oliver
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux