From patchwork Wed Oct 9 19:10:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 175645 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1171461ill; Wed, 9 Oct 2019 12:12:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwq06ko/CtyqwDNQ4MZb967QCWIDU59Gz4y0bEiiaD5BadlVB1TDVpMJk/5T3mfcEmISvZk X-Received: by 2002:a17:906:6b99:: with SMTP id l25mr4250182ejr.233.1570648321327; Wed, 09 Oct 2019 12:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570648321; cv=none; d=google.com; s=arc-20160816; b=qyQRZfD4Fh7rHltTDor4CAJPHZEninuq0ZnzhswjUeDYacaG4mTdo23BzhsDzEFLHj zCFlJFyv72R2dOlY8aQJi8FHR5NWSK8VMKJrp21Jq9sjZCibWomhNDco78ZSnyvbCu0D zAibDZj7E7UJt/RzOoPI9IibPZLbh39SmmGTZgUA/W+XP/a/DJuwcSx7a7DBmL5SlW9F 1G4NC4aw7Zs80/vMiwlEbL4WY8UBr4TB9FWdy3nCrPkkBo0SdcxSQ9o7oJiuGbSFSppA omu+wILheSbt4H6+XSDOZfj844nf63PWo5OQA0YjlWbyB5XWcx8SsOwA4WnLv+gtcGQ7 zw7g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=INDJD2br6XxXffY0jysQGGR2wgNu0wyKGAefQIZNvWk=; b=KDVi495QOKHuSQCbRK+2dHYOwKWSRtESPcbNXV0wVpYNQopc0uRRgMaM/FA+JxxegO ufUC/cPWyK9O1GeE72cmYQoY0jI53D1R+SAQ0ptkvK7VUDLHVNanQcLGBzn2Axr5d4GS 8P15DMHBzp172pGvSm8Q1rCMIDEd+4hqtNyrpZNgoWYlEwtrzrIBoQSPjDSVVkOu6QSH rsEUBcDLEKr2OhR2HCkIBXPiWJQO/+Yis13sQWQAuEHD9PUGf3GmRle/kWOCVkl9awGY uv9ffchjYtxnwZOGx622Yyd5D7F7T5ORmgeuWyWw7taQXTczMEh6RT3cuZYqtBbwdY1J v2VQ== ARC-Authentication-Results: i=1; mx.google.com; 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 gh16si1676469ejb.150.2019.10.09.12.12.01; Wed, 09 Oct 2019 12:12:01 -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; 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 S1732139AbfJITLj (ORCPT + 26 others); Wed, 9 Oct 2019 15:11:39 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:44457 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732017AbfJITL2 (ORCPT ); Wed, 9 Oct 2019 15:11:28 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1M9FSx-1iCUjn0qkZ-006OvI; Wed, 09 Oct 2019 21:11:20 +0200 From: Arnd Bergmann To: Al Viro Cc: linux-kernel@vger.kernel.org, y2038@lists.linaro.org, linux-fsdevel@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , Eric Dumazet , netdev@vger.kernel.org, "David S. Miller" Subject: [PATCH v6 35/43] compat_ioctl: move SIOCOUTQ out of compat_ioctl.c Date: Wed, 9 Oct 2019 21:10:36 +0200 Message-Id: <20191009191044.308087-36-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191009190853.245077-1-arnd@arndb.de> References: <20191009190853.245077-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Gs7WDz3cO6L34SuxnoUE0cPkG0RD46UJTcOdAtxxQ1wu2AcocIH MLlyJRAJ8Q6F2FRZDhUczb7xeo7VKSoS7S+r2JbhUK30znZWrAwlwhfU4RweQnK7sx89S/8 s9RgheEsez9Uomff7IBT9Sltreuq64VyHWryfBMeRfUyAETmwTP08msug+UQKLwvT+1trrR Sv2dxjAVq0UUbeHAemB7A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:HtEfBJfsbxY=:E7oDDRVKYPFRpr3roXuDJ9 2a2dn8t9obGYSTPEUnz0t2K7GmIT/1+xA4ovsqk8Kur9QPB3c2IahhiyJmSHQFl4cZeSQryh1 AqIQTSi1rtujSBNrlmRp25g3/c5MpZn/qJd/Qonjsru6QuxeC1LLH0STtADZWKJZZ1Q9bAE95 RyKLn27ZRIaGPKzydfxflDf7+3EsMKNPB3UhsQn6vFpePJRnECESmuJa+f9xYFNHFpU9uwYZi 8k3POEKOCWbpWR7zINsvobTBZyqqKLDMpzlwVMPvftpTSw4BSRgCuATpj91oot5bPoKx0dVlI sOi67TGH6EqbrjBpIdl1HouxucUq9EuTT/5Hg6ohtbixGME8ADJR/Csf1eotQ2+xegqcY0MtE yOGlP3sSO+h/kSukU4ciwdDF6FEHJaFfp8i+ZWFhL824kNU52oi3hdvGjfAF1WWmSsPVA88Xc C/tJxGlyCGVHHbNeSzlVCR5xR8QLmke8AJOl9ahbVfSzjO1uFyjkCPngHAolmpzo/f36GFNpq 859XoS3QmUTOTZelYbFxGHLIsWA9bv/VNdg0cPP9wMW2Mg/hciK9h/86S9IaNBMOtyoR5g5yT PiCQwLHwcO/BycittMlz18e/6U1WgGzo6/SC542+TCVdLdXDv3G/9zXq/8p5fZ/ITYV1mWWZn Ct1DOaLHindVluRUugzQATVjV+lZGY+SGzzTFJaKmIRwtxzHu1kQKPXWuE/FjTSkzj0hcNhFk DE/WbvWIp6lSX+XlJ72O7pZFCjLwn2fZJQuayRTVm4Ijs/pEb6NqkyK2XbPfJZV29hXL/m9cx iOt3ysUxL08uOJqtj170VNDhNlkArXK02ON+8NeK+ohY/C7n7W2zmowIUXxtdUmuAZWU7vLC5 2dE4A/lwcI0iwAAG5Ssg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All users of this call are in socket or tty code, so handling it there means we can avoid the table entry in fs/compat_ioctl.c. Reviewed-by: Greg Kroah-Hartman Cc: Eric Dumazet Cc: netdev@vger.kernel.org Cc: "David S. Miller" Signed-off-by: Arnd Bergmann --- drivers/tty/tty_io.c | 1 + fs/compat_ioctl.c | 2 -- net/socket.c | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) -- 2.20.0 diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 802c1210558f..c09691b20a25 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -2755,6 +2755,7 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd, int retval = -ENOIOCTLCMD; switch (cmd) { + case TIOCOUTQ: case TIOCSTI: case TIOCGWINSZ: case TIOCSWINSZ: diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index f279e77df256..d537888f3660 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c @@ -198,8 +198,6 @@ static int ppp_scompress(struct file *file, unsigned int cmd, #define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd), static unsigned int ioctl_pointer[] = { -/* Little t */ -COMPATIBLE_IOCTL(TIOCOUTQ) #ifdef CONFIG_BLOCK /* Big S */ COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN) diff --git a/net/socket.c b/net/socket.c index a60f48ab2130..371999a024fa 100644 --- a/net/socket.c +++ b/net/socket.c @@ -100,6 +100,7 @@ #include #include #include +#include #include #include #include @@ -3452,6 +3453,7 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock, case SIOCSARP: case SIOCGARP: case SIOCDARP: + case SIOCOUTQ: case SIOCOUTQNSD: case SIOCATMARK: return sock_do_ioctl(net, sock, cmd, arg);