Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754830AbdDJP4L (ORCPT ); Mon, 10 Apr 2017 11:56:11 -0400 Received: from mail-ua0-f178.google.com ([209.85.217.178]:36260 "EHLO mail-ua0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754389AbdDJP4J (ORCPT ); Mon, 10 Apr 2017 11:56:09 -0400 MIME-Version: 1.0 In-Reply-To: <20170410151723.692402894@linutronix.de> References: <20170410151426.808543816@linutronix.de> <20170410151723.692402894@linutronix.de> From: Andy Lutomirski Date: Mon, 10 Apr 2017 08:55:42 -0700 Message-ID: Subject: Re: [patch 3/3] x86/vdso: Sanitize vdso*_enabled handling To: Thomas Gleixner Cc: LKML , X86 ML , Peter Zijlstra , Mathias Krause Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 577 Lines: 15 On Mon, Apr 10, 2017 at 8:14 AM, Thomas Gleixner wrote: > +static int vdso32_sysctl; > + > +static int vdso_update_handler(struct ctl_table *table, int write, > + void __user *buffer, size_t *lenp, > + loff_t *ppos) > +{ > + int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); Using a global for the temporary is gross and mildly racy. I would just open-code the conversion. Or, even better, add proc_dobool(). I'm not convinced that the current patch is a cleanup. --Andy