Skip to contentSkip to conversation

Patch "sysctl: fix proc_doulongvec_ms_jiffies_minmax()" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jan 30, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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

sysctl: fix proc_doulongvec_ms_jiffies_minmax()

to the 4.9-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:
sysctl-fix-proc_doulongvec_ms_jiffies_minmax.patch
and it can be found in the queue-4.9 subdirectory.

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

Quoted 1 line

From ff9f8a7cf935468a94d9927c68b00daae701667e Mon Sep 17 00:00:00 2001

From: Eric Dumazet <[email protected]>
Date: Wed, 25 Jan 2017 18:20:55 -0800
Subject: sysctl: fix proc_doulongvec_ms_jiffies_minmax()

From: Eric Dumazet <[email protected]>

commit ff9f8a7cf935468a94d9927c68b00daae701667e upstream.

We perform the conversion between kernel jiffies and ms only when exporting kernel value to user space.

We need to do the opposite operation when value is written by user.

Only matters when HZ != 1000

---
 kernel/sysctl.c |    1 +
 1 file changed, 1 insertion(+)
kernel/sysctl.c +1 -0
@@ -2487,6 +2487,7 @@ static int __do_proc_doulongvec_minmax(v
 				break;
 			if (neg)
 				continue;
+			val = convmul * val / convdiv;
 			if ((min && val < *min) || (max && val > *max))
 				continue;
 			*i = val;

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

queue-4.9/sysctl-fix-proc_doulongvec_ms_jiffies_minmax.patch