Skip to contentSkip to conversation

+ fs-compat_ioctlc-fix-an-underflow-issue-harmless.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Dec 16, 2013 VFS

lore
Share & tools
lore
#0 lore raw

Subject: + fs-compat_ioctlc-fix-an-underflow-issue-harmless.patch added to -mm tree
To: [email protected]
From: [email protected]
Date: Mon, 16 Dec 2013 11:55:52 -0800

The patch titled
Subject: fs/compat_ioctl.c: fix an underflow issue (harmless)
has been added to the -mm tree. Its filename is
fs-compat_ioctlc-fix-an-underflow-issue-harmless.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/fs-compat_ioctlc-fix-an-underflow-issue-harmless.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/fs-compat_ioctlc-fix-an-underflow-issue-harmless.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Dan Carpenter <[email protected]>
Subject: fs/compat_ioctl.c: fix an underflow issue (harmless)

We cap "nmsgs" at I2C_RDRW_IOCTL_MAX_MSGS (42) but the current code allows negative values. It's harmless but it makes my static checker upset so I've made nsmgs unsigned.

---

 fs/compat_ioctl.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/compat_ioctl.c renamed from fs/compat_ioctl.c~fs-compat_ioctlc-fix-an-underflow-issue-harmless +2 -1
diff -puN fs/compat_ioctl.c~fs-compat_ioctlc-fix-an-underflow-issue-harmless fs/compat_ioctl.c
@@ -680,7 +680,8 @@ static int do_i2c_rdwr_ioctl(unsigned in
 	struct i2c_msg			__user *tmsgs;
 	struct i2c_msg32		__user *umsgs;
 	compat_caddr_t			datap;
-	int				nmsgs, i;
+	u32				nmsgs;
+	int				i;
 
 	if (get_user(nmsgs, &udata->nmsgs))
 		return -EFAULT;

_

Patches currently in -mm which might be from [email protected] are

origin.patch dma-debug-enhance-dma_debug_device_change-to-check-for-mapping-errors-fix.patch video-mmp-delete-a-stray-mutex_unlock.patch video-mmp-using-plain-integer-as-null-pointer.patch ocfs2-use-the-new-dlm-operation-callbacks-while-requesting-new-lockspace.patch drivers-scsi-megaraid-megaraid_mmc-missing-bounds-check-in-mimd_to_kioc.patch drivers-block-paride-pgc-underflow-bug-in-pg_write.patch fs-compat_ioctlc-fix-an-underflow-issue-harmless.patch drivers-mailbox-omap-make-mbox-irq-signed-for-error-handling.patch checkpatch-warn-only-on-space-before-semicolon-at-end-of-line.patch linux-next.patch