From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944451AbdDTMxb (ORCPT ); Thu, 20 Apr 2017 08:53:31 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:34629 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S943290AbdDTMx3 (ORCPT ); Thu, 20 Apr 2017 08:53:29 -0400 Date: Thu, 20 Apr 2017 14:53:26 +0200 (CEST) From: Thomas Gleixner To: Myungho Jung cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] timer: fix timer_migration to accept only 0 and 1 In-Reply-To: <1492640690-3550-1-git-send-email-mhjungk@gmail.com> Message-ID: References: <1492640690-3550-1-git-send-email-mhjungk@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Apr 2017, Myungho Jung wrote: > Error is not shown by setting invalid value to timer_migration. Valid > values for timer_migration should be restricted to 0 and 1. Testcase for > this bug is ltp/runpwtests06. While I agree with the change, I disagree with the changelog. Where is the bug? The timer code checks for timer_migration != 0 resp. == 0. So as long as the value is != 0 it's enabled, if it's 0 it is disabled. It's a correctness issue that we treat a sysctl which is basically a boolean as such. Ideally we'd have: proc_doboolvec() for such cases and convert all similar sysctls over to that. Thanks, tglx