Skip to contentSkip to conversation

Patch "dm ioctl: have constant on the right side of the test" has been added to the 6.1-stable tree

dm-devel Sasha Levin 1 participant 1 message Jul 14, 2023 Device mapper

lore
Share & tools
lore

Sasha Levin

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

dm ioctl: have constant on the right side of the test

to the 6.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
dm-ioctl-have-constant-on-the-right-side-of-the-test.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

commit 052a2a7fb71535990d598215ed59df6f3f877b93

Author: Heinz Mauelshagen <[email protected]>
Date:   Tue Feb 7 21:47:45 2023 +0100

dm ioctl: have constant on the right side of the test

[ Upstream commit 5cae0aa77397015f530aeb34f3ced32db6ac2875 ]

Stable-dep-of: 249bed821b4d ("dm ioctl: Avoid double-fetch of version")

drivers/md/dm-ioctl.c +2 -2
index 2ced382cdd70b..6aeae095086d7 100644
@@ -1819,8 +1819,8 @@ static int check_version(unsigned int cmd, struct dm_ioctl __user *user)
 	if (copy_from_user(version, user->version, sizeof(version)))
 		return -EFAULT;
 
-	if ((DM_VERSION_MAJOR != version[0]) ||
-	    (DM_VERSION_MINOR < version[1])) {
+	if ((version[0] != DM_VERSION_MAJOR) ||
+	    (version[1] > DM_VERSION_MINOR)) {
 		DMERR("ioctl interface mismatch: kernel(%u.%u.%u), user(%u.%u.%u), cmd(%d)",
 		      DM_VERSION_MAJOR, DM_VERSION_MINOR,
 		      DM_VERSION_PATCHLEVEL,

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel