Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3184449ybd; Mon, 24 Jun 2019 21:12:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1oqr8seqjKy0D0ZPO/IZwmxr8J82Sp21ZCOi7werxjZI56ojHLGuFucrQjS3bihhpP4Td X-Received: by 2002:a63:a1f:: with SMTP id 31mr17121668pgk.66.1561435969065; Mon, 24 Jun 2019 21:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561435969; cv=none; d=google.com; s=arc-20160816; b=0uA1PZ0sYDL/wdwD6ySC+NtMpN5YQt9iuBvMESmd90dJV2KNuSQ6bN+cLcOE0mrsnq adep6LYuYsUB70ApNOHH3J5kAW4zRGq8iegmOSxB9byzoCZtZgG113VgKM7OwBi0DyXX F2LnNi0KvRjhhYs355zrobwlJl//dT53pmxDUJ849LFjV7oaMEAnQoBoVu87dhN1x25l g7zM1LAm0yUGNd5dCslTkyIq+dE5nrCr/u/45HrHAwBR4ju9xneY7+I7VVbWv8XD+6dd x8Xr7GDD51Qvd4NuWh/YCn0v2lnxlyPVQrG9szmq8KCM6mqMrmXigz1o1cLx+vaQD/ql x0tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=8wFOOZobSMXR2Ozogj+mX21ZRt7xd/su4rY5KVbYVt0=; b=jJGxfk2sB3FJZC5qw9rT0T7IOFy6AhxnfH1bAcwd/vRMt5njJC9Is3pDiRVfGtQjXv Ctu2Z55RN20MsFbo3TpwZv4U83lMf47WcMKm82ISRcTF6kveQIxIVI2NTVt9JO9C5XTR +u2Q1eFzoGGFPi0MqSA2OSsx3R/Ij5j39WJMKmmjZW2qyZCummpF7k923ATfdXtMw+pW aDxvnJF8TcsfdVF9zF1+9FR4z+RaMa8zOBsiIsxniwMCLWMv4Fq8xITez+LNsFfljYgm kYVE9lgEb9h/M5zZAIHv0jxjFUpZqQChuXBxrN2pomeFD5Y5AEYW2xSr2N5VM1c8R/sK EP3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=eXdptYKG; 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 s8si10852042plq.7.2019.06.24.21.12.33; Mon, 24 Jun 2019 21:12:49 -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=@etsukata-com.20150623.gappssmtp.com header.s=20150623 header.b=eXdptYKG; 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 S1726895AbfFYDIS (ORCPT + 99 others); Mon, 24 Jun 2019 23:08:18 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39005 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbfFYDIS (ORCPT ); Mon, 24 Jun 2019 23:08:18 -0400 Received: by mail-pg1-f194.google.com with SMTP id 196so8166291pgc.6 for ; Mon, 24 Jun 2019 20:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=etsukata-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8wFOOZobSMXR2Ozogj+mX21ZRt7xd/su4rY5KVbYVt0=; b=eXdptYKGAEBv3lL90mdyAN1/TVQWLm4tzP3pIFwisfgHE5/8hiwyRsCBLSJ78quKNc ZvHyktUyXm7C0E9PoU0VIfWZ9Lzi5Ho1Vi5WZ5c+1u6FzW7XNoiyJqG5Dk0DuOPuTzN1 lF9iGNdzUl87aKQDM5a6389pW9QrWLqTBaTL/opdsWi6NA4HwAm0lJ1sMdAx+F2vDAsY AYa/XbJHW+CM3IX0XevYqPodbU79AWIy9snbiQD22DFZOjrxbThIKLHU5SdNJlq1Aksa zuTgP0rly01lf0C3vv8xMQkd9LN1Ei1YiSWUGxcBp8aET2VErzFZiNN3XaMKQokjpY74 lwng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8wFOOZobSMXR2Ozogj+mX21ZRt7xd/su4rY5KVbYVt0=; b=ZDpmjcLsArfZbuM8EsfTIG3LERkFv6DM8d2/606LxDlIrQkx4JgtBhtF/FsaSPbo4n 4QliZ4ghD1x3ivAW4iKsTzcyxkH3M84qTvfqYf4ThwrWKT/Yol61hDTMaNz9lfLWXmOK UG5A8cOu4hI2hn3K0DCKPYXGQXwz/mMhV0zabc5yfeXvghB7YABael/LtbJ3d+EUxk49 H7x3eypmpCOd0063AdyTbcJf4HoBwjH9waCw6vva09CtMCS8RwTFGabhGtru2Ib9dKPk WPybiv0mgkwUUKerRLqA1iyWOtNEpgs+wwhmuLaJO055TNq3X9IP4n1c799NXqSlbCVz diKw== X-Gm-Message-State: APjAAAUde7IoWRPMQ/p0BJBOZyY3H9sbQMPrjpazlztuHk5M1fBDMBg7 KK9zOcq1J1iXvgbUPNfmVkZxfQ== X-Received: by 2002:a17:90a:cf8f:: with SMTP id i15mr27707097pju.110.1561432097511; Mon, 24 Jun 2019 20:08:17 -0700 (PDT) Received: from localhost.localdomain (p2517222-ipngn21701marunouchi.tokyo.ocn.ne.jp. [118.7.246.222]) by smtp.gmail.com with ESMTPSA id d4sm708016pju.31.2019.06.24.20.08.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 24 Jun 2019 20:08:16 -0700 (PDT) From: Eiichi Tsukata To: gregkh@linuxfoundation.org, jslaby@suse.com, davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Eiichi Tsukata Subject: [PATCH 1/2] tty: ldisc: Fix misuse of proc_dointvec "ldisc_autoload" Date: Tue, 25 Jun 2019 12:08:00 +0900 Message-Id: <20190625030801.24538-1-devel@etsukata.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org /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, }, -- 2.21.0