Received: by 10.213.65.68 with SMTP id h4csp739850imn; Fri, 6 Apr 2018 08:07:24 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/mI/CLneBfaU0BKNAO8dculHqfR8gdi4hD2ummiFlPzyan01X71HXfBQXIhwqQv5dZDxA5 X-Received: by 2002:a17:902:206:: with SMTP id 6-v6mr27662373plc.376.1523027244283; Fri, 06 Apr 2018 08:07:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523027244; cv=none; d=google.com; s=arc-20160816; b=mgTV9L9DmHZW0TIHf7+KEC19pYvTGJmjNfvg3fX1I8Fvt/FU5J2yWNFrt4cAOGq6ZF NspHDvr7pRiEOEX1m5fWFhpT1lEH+SMde/GaCnZvCaquNZiPu4Xp1ak/rYfL5iDq4sV5 zVv6OuP5yS1gEApM47ZV0CMK0jc1W2wekasAZZOFTWzYRWB2KpzWpHfTYUSf0bHCWiZR WDIbpzbt44FaKPXuxFPy0RQG3jk+1780wyUC26UOV3agF2wUZoBP6G3cGB/lCzxadZt0 /PLj4/Bk/nMhVeQgJYrFGbRcgCegwttWyhn7Y0Y8/c8lyg5NKIzAkkiIYT93RGIQv5lU 1oGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=XA9MBJCJItEvOUGfXkFhKZx7mvE6RFsFpbk8Z3YtV9c=; b=ExcMHaSIgU2ixsznmAx/06pkbDPX8XAHQkpvA4+ZDLgMikAs/H1nTPTrkw8oqz3pym l2gjZsTZa1NLHhII5drCZPSCFLM2DQHArwODuwtSxDG1aadobQYUEgMd2MD1cXVr31BH GmXxVqCQwqKsdaJb9KY5GRh7Ru/lmycWD2U/B1KYBhtn3pcmJxgvCLTcfdD9RGbvmH7U fgPijhd+Ew+CYdxkxyrpJu6NqcGAvzZT2E+pTOK1TPKzn9T8r9f0svjq61vi7HAeIYdq XxHl9dN3LzgkRHE+jvK1NlgYUa4+JOAos5HSdTgtcRDMSQlESHAE3YzyDjp/Uc51Xtd+ LeYA== 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 a4si7077688pgw.73.2018.04.06.08.06.57; Fri, 06 Apr 2018 08:07:24 -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 S1754806AbeDFNaM (ORCPT + 99 others); Fri, 6 Apr 2018 09:30:12 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:56022 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198AbeDFNaG (ORCPT ); Fri, 6 Apr 2018 09:30:06 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 2164FD53; Fri, 6 Apr 2018 13:30:05 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Paul Moore , Nathan Chancellor Subject: [PATCH 4.4 25/72] tty: provide tty_name() even without CONFIG_TTY Date: Fri, 6 Apr 2018 15:23:26 +0200 Message-Id: <20180406084307.255486826@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084305.210085169@linuxfoundation.org> References: <20180406084305.210085169@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann commit 188e3c5cd2b672620291e64a21f1598fe91e40b6 upstream. The audit subsystem just started printing the name of the tty, but that causes a build failure when CONFIG_TTY is disabled: kernel/built-in.o: In function `audit_log_task_info': memremap.c:(.text+0x5e34c): undefined reference to `tty_name' kernel/built-in.o: In function `audit_set_loginuid': memremap.c:(.text+0x63b34): undefined reference to `tty_name' This adds tty_name() to the list of functions that are provided as trivial stubs in that configuration. Signed-off-by: Arnd Bergmann Fixes: db0a6fb5d97a ("audit: add tty field to LOGIN event") Signed-off-by: Paul Moore [natechancellor: tty_paranoia_check still exists] Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- include/linux/tty.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -372,6 +372,7 @@ extern void proc_clear_tty(struct task_s extern struct tty_struct *get_current_tty(void); /* tty_io.c */ extern int __init tty_init(void); +extern const char *tty_name(const struct tty_struct *tty); #else static inline void console_init(void) { } @@ -392,6 +393,8 @@ static inline struct tty_struct *get_cur /* tty_io.c */ static inline int __init tty_init(void) { return 0; } +static inline const char *tty_name(const struct tty_struct *tty) +{ return "(none)"; } #endif extern void tty_write_flush(struct tty_struct *); @@ -420,7 +423,6 @@ static inline struct tty_struct *tty_kre extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, const char *routine); -extern const char *tty_name(const struct tty_struct *tty); extern void tty_wait_until_sent(struct tty_struct *tty, long timeout); extern int __tty_check_change(struct tty_struct *tty, int sig); extern int tty_check_change(struct tty_struct *tty);