qemu-cvs-ioctl_nodirection
the direction given in the ioctl should be correct so we can assume the communication is uni-directional. The alsa developers did not like this concept though and declared ioctls IOC_R and IOC_W even though they were IOC_RW. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Ulrich Hecht <uli@suse.de>
This commit is contained in:
committed by
Andreas Färber
parent
a28ad521ee
commit
7732c5e1c4
@@ -3691,6 +3691,11 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
|
|||||||
arg_type++;
|
arg_type++;
|
||||||
target_size = thunk_type_size(arg_type, 0);
|
target_size = thunk_type_size(arg_type, 0);
|
||||||
switch(ie->access) {
|
switch(ie->access) {
|
||||||
|
/* FIXME: actually the direction given in the ioctl should be
|
||||||
|
* correct so we can assume the communication is uni-directional.
|
||||||
|
* The alsa developers did not like this concept though and
|
||||||
|
* declared ioctls IOC_R and IOC_W even though they were IOC_RW.*/
|
||||||
|
/*
|
||||||
case IOC_R:
|
case IOC_R:
|
||||||
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
|
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
|
||||||
if (!is_error(ret)) {
|
if (!is_error(ret)) {
|
||||||
@@ -3709,6 +3714,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
|
|||||||
unlock_user(argptr, arg, 0);
|
unlock_user(argptr, arg, 0);
|
||||||
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
|
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
default:
|
default:
|
||||||
case IOC_RW:
|
case IOC_RW:
|
||||||
argptr = lock_user(VERIFY_READ, arg, target_size, 1);
|
argptr = lock_user(VERIFY_READ, arg, target_size, 1);
|
||||||
|
Reference in New Issue
Block a user