Skip to contentSkip to conversation

The RAW_GETBIND compat_ioctl fails

PATCH New James Cross 1 participant 1 message Jan 22, 2004 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 The RAW_GETBIND compat_ioctl fails

Hi,

The RAW_GETBIND compatibility ioctl call does convert properly between the 32bit/64bit version of raw_config_request due to a trivial error, and the ioctl call fails.

Thanks,

James

fs/compat_ioctl.c renamed from fs/compat_ioctl.c.orig +1 -1
@@ -2426,7 +2426,7 @@
         __get_user(hi_min, ((__u32*)(&user_req->block_minor) + 1));
 
         req->block_major = lo_maj | (((__u64)hi_maj) << 32);
-        req->block_minor = lo_min | (((__u64)lo_min) << 32);
+        req->block_minor = lo_min | (((__u64)hi_min) << 32);
 
         return ret;
 }