Re: [PATCH 1/1] UIO: Add a write() function to enable/disable interrupts

From: Uwe Kleine-König
Date: Fri May 23 2008 - 07:59:07 EST

Hello Tom,

> > Tom Spink wrote:
> >> The added benefit is that the code becomes less complex, as you don't
> >> have to check buffer sizes and copy the integer from userspace.
> > AFAIK this is wrong. You need to copy the integer from userspace in
> > uio_ioctl. Actually it's a value coming from user space, so you need to
> > do it somewhere.
> Not really in this case. It's not a *pointer* to a value in
> userspace, so you don't need to copy anything. If it was being used
> to point to a memory location holding a value, then yes, it would need
> to be copied across. But in this case, it's just being used to pass
> across 1 or 0.
ah, OK, you're right. Thanks for correcting my correction :-)


Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at