Patch "sysctl: don't print negative flag for proc_douintvec" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
sysctl: don't print negative flag for proc_douintvec
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-don-t-print-negative-flag-for-proc_douintvec.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
5380e5644afbba9e3d229c36771134976f05c91eMon Sep 17 00:00:00 2001
From: Liping Zhang <[email protected]>
Date: Fri, 7 Apr 2017 23:51:06 +0800
Subject: sysctl: don't print negative flag for proc_douintvec
From: Liping Zhang <[email protected]>
commit 5380e5644afbba9e3d229c36771134976f05c91e upstream.
I saw some very confusing sysctl output on my system:
# cat /proc/sys/net/core/xfrm_aevent_rseqth -2 # cat /proc/sys/net/core/xfrm_aevent_etime -10 # cat /proc/sys/net/ipv4/tcp_notsent_lowat -4294967295
Because we forget to set the *negp flag in proc_douintvec, so it will become a garbage value.
Since the value related to proc_douintvec is always an unsigned integer, so we can set *negp to false explictily to fix this issue.
--- kernel/sysctl.c | 1 + 1 file changed, 1 insertion(+)
kernel/sysctl.c +1 -0
@@ -2149,6 +2149,7 @@ static int do_proc_douintvec_conv(bool * *valp = *lvalp; }else {unsigned int val = *valp; + *negp = false; *lvalp = (unsigned long )val; }return 0 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/sysctl-don-t-print-negative-flag-for-proc_douintvec.patch queue-4.9/sysctl-report-einval-if-value-is-larger-than-uint_max-for-proc_douintvec.patch