Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3187635ybd; Mon, 24 Jun 2019 21:17:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAB3D29Zc1ivr8fLk/ZegAq6VqDIkx9mCqiI9/M++x3B7hcMMUjL2HfDVZYvI/suztWraT X-Received: by 2002:a17:902:3fa5:: with SMTP id a34mr146719202pld.317.1561436243707; Mon, 24 Jun 2019 21:17:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561436243; cv=none; d=google.com; s=arc-20160816; b=cnmZWQ8jZCGrzj5ioZiXGf+NPHmw2JWrsDcUaSalmm5zSaBsWsEdLE+roayLggIYGs WVAPw+JoSlSYXZ7dDX9onvPdmju7wjibt5VFjR1B5YspuKiOwjef1Z9+2X0oVgRWSG7n 8Pgme/pZCQtLYgP6DRS/obkWO77bvpsvnIO2TOl9HvU9BhCVzPqBm7qcbnGu1rWFXLj6 hYErmnzuGOHMDTIs7u/UrTuNjT8nIHS9eJ+NTzVA0i7Di7rNPxPI6lMSbl6935MSMOkQ 4rarZT7eBE16DJC0WICucvEHei5SbUtQpDbv+Dcdop1q/QN0WgGeKQBHPyiWZmAgg9WR /08g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gXwuSIp/moH/mIpobo0QQOj3fbfWuAYPdRH8H6Y54Uc=; b=ulN8SgCgk8K4/XOEfbNRzdClrUwBpMPPogKmj8IyjXY8XwmipC31seI3QMFld1vmZd f8WKqm8/SY8VTTqnqS5FlmwWROQi6CXCST5DexgKCm4ivEZELP1SXZlJhLvbhuzEGLQM wz85Nia8aaoVyEiucX8zbzr7Hmfrxu0aEkBimGztCvpRbx3KBnqrE+XOLe8I1OZvb6Wu 8tSBt/PGFYYQBWzvaVBPBvZ8b5JpvFgArz+FO22SNQNEe7il19g8VVquknPXrxQR8CPX uhyQWOgo4vPqG273pbD50/a73rEUqsrCmIYeImkREIEpTRbzgaK2PxQWOIwJvObBsyQW Fftw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qZ7XYeo+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5si11371280pgs.4.2019.06.24.21.17.07; Mon, 24 Jun 2019 21:17:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qZ7XYeo+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727428AbfFYDxw (ORCPT + 99 others); Mon, 24 Jun 2019 23:53:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:36014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726833AbfFYDxv (ORCPT ); Mon, 24 Jun 2019 23:53:51 -0400 Received: from localhost (unknown [116.226.249.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8450520665; Tue, 25 Jun 2019 03:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561434830; bh=E4nE1EjWI33jbz4SGyWmu9sYfD082jUQXQQfrNoLQXU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qZ7XYeo+I3dPO32jVSB6vo+lkkvvs2U54y9HoEjCetrb+kFfpvNKInrA0qvFV3IPw IOt7m52Bjp6jnuCYyATUxw1wgbaU9HAoFSXZHVEZj9cGM5NZa0d1grdnDe4CJ8ddBC PFaIesiJ+pkH4VGEoyAaQYY1YbdOoOKJEJ6ubYLk= Date: Tue, 25 Jun 2019 11:32:16 +0800 From: Greg KH To: Eiichi Tsukata Cc: jslaby@suse.com, davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 1/2] tty: ldisc: Fix misuse of proc_dointvec "ldisc_autoload" Message-ID: <20190625033216.GA11902@kroah.com> References: <20190625030801.24538-1-devel@etsukata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190625030801.24538-1-devel@etsukata.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 25, 2019 at 12:08:00PM +0900, Eiichi Tsukata wrote: > /proc/sys/dev/tty/ldisc_autoload assumes given value to be 0 or 1. Use > proc_dointvec_minmax instead of proc_dointvec. > > Fixes: 7c0cca7c847e "(tty: ldisc: add sysctl to prevent autoloading of ldiscs)" > Signed-off-by: Eiichi Tsukata > --- > drivers/tty/tty_ldisc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c > index e38f104db174..a8ea7a35c94e 100644 > --- a/drivers/tty/tty_ldisc.c > +++ b/drivers/tty/tty_ldisc.c > @@ -863,7 +863,7 @@ static struct ctl_table tty_table[] = { > .data = &tty_ldisc_autoload, > .maxlen = sizeof(tty_ldisc_autoload), > .mode = 0644, > - .proc_handler = proc_dointvec, > + .proc_handler = proc_dointvec_minmax, > .extra1 = &zero, > .extra2 = &one, Ah, nice catch. But this really isn't an issue as if you use a bigger value, things will not "break", right? thanks, greg k-h