We will have to agree to disagree. I won't oppose a patch (as
long as the driver still works after it).
> * I still see a couple save_flags/restore_flags in there...
Of course, I haven't removed them, just moved them around.
Old code (simplified) :
---------------------------
xxx_ioctl()
{
save_flags();
switch(cmd) {
[...]
copy_from_user(extra, ...);
outsb(..., extra);
[...]
}
restore_flags();
}
----------------------------
Alan told me that this is a no-no.
New code :
-----------------------
xxx_set_xxx(... , char *extra)
{
save_flags();
[...]
outsb(..., extra);
[...]
restore_flags();
}
-----------------------
copy_to/from_user is handled before reaching the wireless
handler. What is nice is that the new API *enforce* the proper
behaviour.
Actually, you may want to add that to the list of cleanups for
the kernel janitors, check that all copy_to/from_user in device ioctl
functions are not done with irq disabled. Actually, I think it was
mostly in Wireless drivers...
> otherwise looks ok to me.
Good. If I understood the new "official" procedure from Linus
himself, you are supposed to forward my patches to hin ;-)
> Jeff Garzik
Have fun...
Jean
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/