Messages in this thread Patch in this message | | | Date | Tue, 18 Jan 2005 12:48:16 +0200 | From | "Michael S. Tsirkin" <> | Subject | [PATCH 2/5] socket ioctl fix (from Andi) |
| |
Attached patch is against 2.6.11-rc1-bk5. It is split out from Andi's big patch. It is really unchanged so I dont put a signed-off-by here.
Signed-off-by: Andi Kleen <ak@muc.de>
SIOCDEVPRIVATE ioctl command only applies to socket descriptors.
diff -rup linux-2.6.10-orig/fs/compat.c linux-2.6.10-ioctl-sym/fs/compat.c --- linux-2.6.10-orig/fs/compat.c 2005-01-18 10:58:33.609880024 +0200 +++ linux-2.6.10-ioctl-sym/fs/compat.c 2005-01-18 10:54:26.289478440 +0200 @@ -454,7 +460,8 @@ asmlinkage long compat_sys_ioctl(unsigne } up_read(&ioctl32_sem); - if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { + if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) && + cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { error = siocdevprivate_ioctl(fd, cmd, arg); } else { static int count; - 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/
| |