From patchwork Wed Aug 14 20:54:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11094589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F011C13B1 for ; Wed, 14 Aug 2019 20:55:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE2382884E for ; Wed, 14 Aug 2019 20:55:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D27652886A; Wed, 14 Aug 2019 20:55:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7501C2884E for ; Wed, 14 Aug 2019 20:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729791AbfHNUzp (ORCPT ); Wed, 14 Aug 2019 16:55:45 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:51841 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726166AbfHNUzp (ORCPT ); Wed, 14 Aug 2019 16:55:45 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MTRAS-1hqCnc1bOG-00TlOd; Wed, 14 Aug 2019 22:55:36 +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 Cc: Arnd Bergmann , Dmitry Safonov , Johan Hovold Subject: [PATCH v5 11/18] tty: handle compat PPP ioctls Date: Wed, 14 Aug 2019 22:54:46 +0200 Message-Id: <20190814205521.122180-2-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:y1TEGeFNHzbv3ETSzk+Ge7p4uSUBKqjD+pi67GZ8vNmcEncSU+X 1IQY9Q6UrEwfRXHUMi3/6VO1B4JiA7auIN8FTuZkAd0aan9A+Sv1fJHZCOh8CaLkgr3WNe/ mb/zuw5Ipe5QabrBL0ZBpELKzmAg9ssO4IfGKeaazgB/e3vl2JjE+Z0l3MRiYRWXE7IVYzd f6S52cChTD9gcOj6xchjg== X-UI-Out-Filterresults: notjunk:1;V03:K0:BcyhzUX7r0k=:36Bg5SmEhv6QI58j05fqOJ zRFzfLjnx2+NXJ94g6sbAlbxkt1G1kfNu0ThXI689mhlP4PlymW33q6B9YxfN8SiSfj9vsK2s NDiRg6SPt/oBWnGC9F2NZO7kGrPcTePqAOCRUd0u5Qt3BrdgMJSaNEhErHlJzKYIV6sd4cfag Vu62mgxv/3rOljIz+64aaTKk16eXsLmKQ/Ntt6G5NvpZvXphS/sJ/YzePF+vH8/uS/4YYiIjw zuD5wUuhJQM9hStTJEjztHvwVSf0/CFUfqkuXzZSCsPP6fAVfxvCcgBLhSFqABLhBZt6dRw3H ndTiIsBSaCMPtBjCHDl3NLLBr1Ep7mvhiM14AeuTsLr2s1+/vLoOaIvZ0rikQIuxD8tjVFsAt SQmdxZn/VsACNHRoiAWHSLMRfHJdte4M7xWDS/OIB8LtZeGdWicfo7vP9zLg7EHs+ZlHrZCjk Abq0duqYJur3IPp/IoLRgHTC5puRC57dblZsM1kM9AxkBmsJZ0lAVCWUmvrYnAj5g3x48/6Kz dJSJeSkjS/rLCMoHoPRVLAK//powwIz7eDzqjEX9laHSwVh2K8rXS9ayRlbnSMt7GYJZZHR1J 7jIVvNng3jE+R8ywVzIiL4VyXBGqmuAAjTh4sEmfxTZmNKxu0sMHLO1qQbNPyYjwttARiDhzm XNek1pPVFmVUsKDNE/up0qrtWiQ9qr8Xq59cY6yKBjV2rQk26bttdYWcbsKLwKZm9TQNsISbw vmxc/G7hmEN1/rxyRj5ntic86Q7RX3JObMaWyA== Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Multiple tty devices are have tty devices that handle the PPPIOCGUNIT and PPPIOCGCHAN ioctls. To avoid adding a compat_ioctl handler to each of those, add it directly in tty_compat_ioctl so we can remove the calls from fs/compat_ioctl.c. Signed-off-by: Arnd Bergmann Reviewed-by: Greg Kroah-Hartman --- drivers/tty/tty_io.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index cee8b69c6f72..bf5241e0d772 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -87,6 +87,7 @@ #include #include #include +#include #include #include #include @@ -2811,6 +2812,9 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd, #endif case TIOCGSOFTCAR: case TIOCSSOFTCAR: + + case PPPIOCGCHAN: + case PPPIOCGUNIT: return tty_ioctl(file, cmd, (unsigned long)compat_ptr(arg)); case TIOCCONS: case TIOCEXCL: