Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1009118yba; Thu, 4 Apr 2019 02:19:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkkQ8AGBDFKVa4usKckj716hlEJopaVIM5VEp7dU1lLQ135ub0cJ/i9dGLAI8juqd8Bxxx X-Received: by 2002:a63:7843:: with SMTP id t64mr4529646pgc.178.1554369564255; Thu, 04 Apr 2019 02:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554369564; cv=none; d=google.com; s=arc-20160816; b=MK0KaeNAy1WoVxRnoXrcycpuiKGue+WbUJQp0lJDtS1BZ7Rxbe0lcqGZNpZ94yDBdj mbvjFtT237Xd0q2pqx2QI+xC/v2tszZY9IlFIN+aau9sZvMnFmDPC3hi11hfM9yl2ZXE 7YeBG4cfkwTs3vZ4iUIomMUHMQBnZEixLL3jHlOFPgghxvDx3jkm/cfxz4JRuo2eI56S Bb4q8p5XvasBYYqLIkIdcdbglAvPfcwCKjOmn2LiRXvLi0J2tNTli28wrJdSQHK3driT Oez7xBLtiafojngDCmCxjxswHVnhDnSs2ljlyWzf/Xi8PFEpYygo5UAGYUVNo1zaArNB Bngg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aYM+GRM1eB3Eq5GSuDU5ymPCu3euUgH7juyVuBnnXQs=; b=hPcS0/fBC2PwhLAqfcMkkkHIQsw37izVnBYGC7Vr0b86VBmYTczKbiBqU7Wzx5EsOu CXpZv7egA6Wjt9rjp1KVOdTBQ8fCAeHade11tUQPTCNNG+7gIf1SDYHDhJOWLWHJPJEB ustiHgO0pHzWvphM8NXAubS45ZijQIEKoa0THLZQ9qs8JYcXcWGni6tWg6kAziz4U/d0 jy1sCYnCJCeHKG93aRMpGS6qnrx917b1Q13wWs0iFH9v8cHhQFDllvFvZam7y7Ewlnsp zjQjz3rY1LQ7KNRsWvYUqWhyksOTPeCwNCa68zNUtG0PThxZ6cEYQ/HmABxTfkfMYbd3 MlWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=t9IXKGJe; 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 b125si16451864pfb.242.2019.04.04.02.19.09; Thu, 04 Apr 2019 02:19: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; dkim=pass header.i=@kernel.org header.s=default header.b=t9IXKGJe; 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 S2388396AbfDDJSd (ORCPT + 99 others); Thu, 4 Apr 2019 05:18:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:60682 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388388AbfDDJSb (ORCPT ); Thu, 4 Apr 2019 05:18:31 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F0FE82075E; Thu, 4 Apr 2019 09:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554369510; bh=2i1zFVnTCNRczYsnF+7VLj/9sfJUp0J+H51ofxbKq9c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t9IXKGJeZd0y3iQEXNaknZK/s3paZo++dgaxIqlcr4NdmdWA4R/c6vB7marcqjoks xVS/JU8DenxYMfScMOgbGr5SjJoHLSh0HfNyBcHRyT6pElV566/l4uc82BKDhALA9S +8btBezrBeGOqdlsdrS0cWtU5aOlmAd4Nd/XYYnI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , "David S. Miller" , Sasha Levin Subject: [PATCH 5.0 243/246] appletalk: Fix compile regression Date: Thu, 4 Apr 2019 10:49:03 +0200 Message-Id: <20190404084627.810855127@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084619.236418459@linuxfoundation.org> References: <20190404084619.236418459@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 5.0-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 27da0d2ef998e222a876c0cec72aa7829a626266 ] A bugfix just broke compilation of appletalk when CONFIG_SYSCTL is disabled: In file included from net/appletalk/ddp.c:65: net/appletalk/ddp.c: In function 'atalk_init': include/linux/atalk.h:164:34: error: expected expression before 'do' #define atalk_register_sysctl() do { } while(0) ^~ net/appletalk/ddp.c:1934:7: note: in expansion of macro 'atalk_register_sysctl' rc = atalk_register_sysctl(); This is easier to avoid by using conventional inline functions as stubs rather than macros. The header already has inline functions for other purposes, so I'm changing over all the macros for consistency. Fixes: 6377f787aeb9 ("appletalk: Fix use-after-free in atalk_proc_exit") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- include/linux/atalk.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 23f805562f4e..840cf92307ba 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h @@ -161,16 +161,26 @@ extern int sysctl_aarp_resolve_time; extern void atalk_register_sysctl(void); extern void atalk_unregister_sysctl(void); #else -#define atalk_register_sysctl() do { } while(0) -#define atalk_unregister_sysctl() do { } while(0) +static inline int atalk_register_sysctl(void) +{ + return 0; +} +static inline void atalk_unregister_sysctl(void) +{ +} #endif #ifdef CONFIG_PROC_FS extern int atalk_proc_init(void); extern void atalk_proc_exit(void); #else -#define atalk_proc_init() ({ 0; }) -#define atalk_proc_exit() do { } while(0) +static inline int atalk_proc_init(void) +{ + return 0; +} +static inline void atalk_proc_exit(void) +{ +} #endif /* CONFIG_PROC_FS */ #endif /* __LINUX_ATALK_H__ */ -- 2.19.1