From patchwork Wed Aug 14 20:54:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 171366 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1319960ily; Wed, 14 Aug 2019 13:55:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxfTUGBdtSm9OA84ZTg/3gS3RE3b8kZTzF+PwJMoIpQof63sJ7jCmnHmFIU0d1upHfoTfm9 X-Received: by 2002:a17:902:9688:: with SMTP id n8mr1145045plp.227.1565816135562; Wed, 14 Aug 2019 13:55:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565816135; cv=none; d=google.com; s=arc-20160816; b=bXiYobqVIPnMPtVJAFovfL3WveuI0v7+ho2bjxNOaVIlU7v37WNoNVYEEcWLwtn9c/ VXv59OZ7ZFIvXQ1LuIV0BLSMw3yHFdAVdyZbp80fO0V8ZgZfSJ9gE7YMiP5vbeqyTJbJ Rq840KMiKhvUlPantk4bCrTmvPveIXCE2TWhuUnprkSjKErHFwv9q5hbER8yu6xSAFSJ cBDLfg8yA/DvZO+BUedMP6c5bHq7Ack0ZPmIEdLrtF2GSfh+e/3cmzhxdIdyXQSuidRH V5QooeWcoiN9O4yM4KE2mgFFjzby9eb7D9JVowNN/yV0TNpV1TOTPOADIu3vhmJbOzL7 muJg== 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=4e4JenvSQa23nVWeiBlWwql6Kt2YVjji8luDO1nhyGE=; b=RjERM8RFheIY0ztomh71eZ45D/A6Oydu3isJuMC/ZSuqVpHwbxkVofAexV9EG5Jtoy 4gnfToVgfAS+I9Hd5BkYZAkGb1WqnR/QlWcLXJZ5HZxeQEivQw4k0yh5+kqKMu9rphbT baT/EVQ0VNoD+zfahodFK2cIZ1ReBzFwoPBMJzUYrvq1BQsi24Fy64u/hEcovtWfT4SC JIXiroIZH+m1sdcOR9+uboOS3tZWKMNn86qYlzcedfSh2CE8dwwE48Bhqw+uuHwwpqEs i553N/tCUwD5NIaFhfPE9TdOxUISRIpVbZYeyBxI0HaJO72miWA580axUS901rRQCf6c euJQ== 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 t1si528627pjv.5.2019.08.14.13.55.35; Wed, 14 Aug 2019 13:55:35 -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 S1729676AbfHNUze (ORCPT + 28 others); Wed, 14 Aug 2019 16:55:34 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:41385 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726166AbfHNUzd (ORCPT ); Wed, 14 Aug 2019 16:55:33 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1M1YtP-1i12RD37Ot-0037Zk; Wed, 14 Aug 2019 22:55:24 +0200 From: Arnd Bergmann To: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, Greg Kroah-Hartman , Jiri Slaby , "David S. Miller" Cc: Arnd Bergmann , netdev@vger.kernel.org Subject: [PATCH v5 10/18] compat_ioctl: move SIOCOUTQ out of compat_ioctl.c Date: Wed, 14 Aug 2019 22:54:45 +0200 Message-Id: <20190814205521.122180-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190814204259.120942-1-arnd@arndb.de> References: <20190814204259.120942-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:v7fqYyRWcR/L7MO3acdXThwZvUt3754+rVJBd6ZPhL9Cl1yCVvn gRvBNyPrVt7LggG5Mq05U6BexgSi81BDnlkZvRL/ICitCUpf6PVr5WcQZfsm/JhRu14RonY JhpbPU1GooKwIudtCHSrXnUkk/6+lXaSUMxSer9mvbS7NoTAnAgkpn/4YMDl4BnUDFMoKG2 3BBh2VXHqJZ7obI2kNDLA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:OTDXPZE8Xv4=:2E5DZr6+h1yfYpY7TjG80/ yhaFAIdO01y38tSn7GreEwX8NdvikpQpZfsIESNDvncaZbULO1bAPcmV7icJ5SF6ZOY5MsyPo bp3ohRoxLmSPoAFk46duttwNRbrSxWbow3oILp6NpCjLoQ43RgdlvexlnuoF2oQhNLJ7EqSoA art5XsD/ibmvn6WAlp5ZZqt89xbypOiHfexeM0nyYEzX/McqmGrhH9RA//+Z6u7dWEk9P6LE/ 95hQqHRWBukJ243V84AIgtuGFTex/EOTfc1W5KxacBjUAQ/3Loe0WD0RLoK9P6g0NxnehY+c7 e74i2abMntXSY1mZRq6BKdBu3o6oC5cxvvCNw0fLarRGAMnrubCiz2aKARjSrXgFz1WMUryql kqAAIz0Vdg/zFfRNwQsuGz8HeMRBzyjpy2pXao8rfrGi4ptSHSRmrFSGJZrukgZpA3hXhPp6u K1URqKozcgtOyJMC6t4ScNFuG1XHXfLcZi8ncN8NMY9tjly4eJZZYvvFTBbLtPmNQMmcw5LaX JJAMd+2YF4KyljlxlDeZg7HQ9o5dKVHFFsSGWLrZsfoAwhdXqF4MfB2jxnNVgPpNDMR93kaqr eovNP8hFJ2xBN76Xez8054dCcmPmcKyGzbl2TrDZ5m6qgQuPXaDwN/HjQeVBMF5lq6scjvnbO nEtvlIrfNp8l5TQtY1t0UT48rdEa7JvMFa/eTUvsCEGeMSjmcTopo/HHNxi4o8Yux37kaM8Jl 3lzVNYUVo/wApcOiXf0Lag2HQHFdDWwtKieNST6f96M53tj9SUkv0sD0Dm5CWHoDkYtRCKc1M vUePiAWE6CkZkP9zEkMye3C0e5GDQ== 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. 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 Reviewed-by: Greg Kroah-Hartman diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 566728fbaf3c..cee8b69c6f72 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);