|
From: Peter K. <pk...@us...> - 2001-03-13 11:03:46
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.145 1.146=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected verify_area() check in bt_ioctl() (VERIFY_READ and
VERIFY_WRITE were incorrectly exchanged).
The diff of the modified file(s):
--- bluetooth.c 2001/03/08 15:29:21 1.145
+++ bluetooth.c 2001/03/13 11:05:45 1.146
@@ -488,18 +488,18 @@
#endif
=20=20
/* The direction is a bitmask, and VERIFY_WRITE catches R/W transfer.
- 'Type' is user-oriented, while verify_area is kernel-oriented, so
- the concept of "read" and "write" is reversed */
+ The ioctl direction is user-oriented, while verify_area is kernel-
+ oriented, so the concept of "read" and "write" is reversed */
if (_IOC_DIR(cmd) & _IOC_READ) {
- err =3D verify_area(VERIFY_READ, (void*)arg, size);
+ err =3D verify_area(VERIFY_WRITE, (void*)arg, size);
if (err) {
- BT_DRIVER("verify_area(VERIFY_READ) error:%d\n", err);
+ BT_DRIVER("verify_area(VERIFY_WRITE) error:%d\n", err);
return err;
}
} else if (_IOC_DIR(cmd) & _IOC_WRITE) {
- err =3D verify_area(VERIFY_WRITE, (void*)arg, size);
+ err =3D verify_area(VERIFY_READ, (void*)arg, size);
if (err) {
- BT_DRIVER("verify_area(VERIFY_WRITE) error:%d\n", err);
+ BT_DRIVER("verify_area(VERIFY_READ) error:%d\n", err);
return err;
}
}
|