From patchwork Tue May 30 08:09:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Coelho X-Patchwork-Id: 9754001 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9FB78602F0 for ; Tue, 30 May 2017 08:09:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9084127E63 for ; Tue, 30 May 2017 08:09:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8503C27FA5; Tue, 30 May 2017 08:09:50 +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=-6.9 required=2.0 tests=BAYES_00,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 B677327E63 for ; Tue, 30 May 2017 08:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751247AbdE3IJs (ORCPT ); Tue, 30 May 2017 04:09:48 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:59866 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751168AbdE3IJp (ORCPT ); Tue, 30 May 2017 04:09:45 -0400 Received: from a91-156-4-241.elisa-laajakaista.fi ([91.156.4.241] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.88) (envelope-from ) id 1dFcDi-000821-61; Tue, 30 May 2017 11:09:42 +0300 From: Luca Coelho To: johannes@sipsolutions.net Cc: backports@vger.kernel.org Date: Tue, 30 May 2017 11:09:34 +0300 Message-Id: <20170530080934.7214-1-luca@coelho.fi> X-Mailer: git-send-email 2.11.0 X-SA-Exim-Connect-IP: 91.156.4.241 X-SA-Exim-Mail-From: luca@coelho.fi Subject: [PATCH] backports: provide backport of devcoredump when disabled in kernels >= 3.18 X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on farmhouse.coelho.fi) Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Luca Coelho When devcoredump is not enabled in a kernel that supports it, we would only use stubs for the devcoredump in the backports. Allow the backport to compile when that's the case. Signed-off-by: Luca Coelho --- backport/compat/Kconfig | 1 - backport/compat/backport-4.7.c | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/backport/compat/Kconfig b/backport/compat/Kconfig index 335d9058072e..f66d5f74ba18 100644 --- a/backport/compat/Kconfig +++ b/backport/compat/Kconfig @@ -128,7 +128,6 @@ config BPAUTO_WANT_DEV_COREDUMP config BPAUTO_BUILD_WANT_DEV_COREDUMP bool - depends on KERNEL_3_18 default n if DEV_COREDUMP default n if DISABLE_DEV_COREDUMP default y if BPAUTO_WANT_DEV_COREDUMP diff --git a/backport/compat/backport-4.7.c b/backport/compat/backport-4.7.c index 25a00235bce4..b064707767c6 100644 --- a/backport/compat/backport-4.7.c +++ b/backport/compat/backport-4.7.c @@ -116,8 +116,12 @@ int nla_put_64bit(struct sk_buff *skb, int attrtype, int attrlen, } EXPORT_SYMBOL_GPL(nla_put_64bit); -/* below 3.18 we copied the entire devcoredump */ -#if LINUX_VERSION_IS_GEQ(3,18,0) +/* + * Below 3.18 or if the kernel has devcoredump disabled, we copied the + * entire devcoredump, so no need to define these functions. + */ +#if LINUX_VERSION_IS_GEQ(3,18,0) && \ + !defined(CPTCFG_BPAUTO_BUILD_WANT_DEV_COREDUMP) #include #include