From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751473AbdAaFwz (ORCPT ); Tue, 31 Jan 2017 00:52:55 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:60962 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbdAaFvH (ORCPT ); Tue, 31 Jan 2017 00:51:07 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Linus Torvalds Subject: [PATCH 4.4 05/23] sysctl: fix proc_doulongvec_ms_jiffies_minmax() Date: Tue, 31 Jan 2017 06:37:07 +0100 Message-Id: <20170131053625.170106228@linuxfoundation.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170131053624.926643555@linuxfoundation.org> References: <20170131053624.926643555@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet 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 Signed-off-by: Eric Dumazet Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- kernel/sysctl.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2414,6 +2414,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;