"what is going on" with get_user() is described in kernel source
file: Documentation/exception.txt --- generally speaking it is
*DEEP* to read by anybody :-)
(It is also rather unlike the general language specific exception
handling in several programming languages -- these are HARDWARE
exceptions that are handled here in quite ingenious manner. )
The rewrite is:
int val, err;
if ((err = get_user(val, (void*)arg)))
return err;
if (val)
scsi_cmd[4] = 1;
else
scsi_cmd[4] = 0;
(and throw away the verify_area() calls -- but make sure
that you don't do get_user() after starting something
which is difficult to revert latter.)
> regards,
> ben.
/Matti Aarnio <matti.aarnio@tele.fi>