From patchwork Thu Jun 9 04:18:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Shen Lim X-Patchwork-Id: 632619 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rQBtn3Fzqz9snm for ; Thu, 9 Jun 2016 14:20:49 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=C56J0yWf; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426358AbcFIEUq (ORCPT ); Thu, 9 Jun 2016 00:20:46 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:36681 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752575AbcFIETM (ORCPT ); Thu, 9 Jun 2016 00:19:12 -0400 Received: by mail-pa0-f67.google.com with SMTP id fg1so1822391pad.3; Wed, 08 Jun 2016 21:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SrfHn/xBGlWwpFQtXzpQGQvs3urnB7Cdf1FJE703LpY=; b=C56J0yWfhAttr9LcmZGgMdY7N42Eh+okN3fp3RxqZCm8VDJpVGXasOCGl1Q3xg85iK JRCr8trKxNvCB0/MZ6w3B4Fz9quDV/lyxprp/Kfw0CkXd8tfDSDVqIgDeZP5CNV0fkJA 593DPxB92/gxabdktxk32S36TAbPbAWd8/Lg3Buzib+FCyo4oCSKy/6X5hYk8SiAB/3U 7TiH7m0o9K2DZ+P+Z5/hAvbjA8v4zbz+ZOwckidhdTCNRC/H59AM5ClbHLkBI1mWfnz4 QYID0hfSJZiXqjhZzU5fggq1arouY9o4Tkh0SrxMV0ZX87JAbL+spNhwu/eJSryxhYsW TkqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SrfHn/xBGlWwpFQtXzpQGQvs3urnB7Cdf1FJE703LpY=; b=A+Wh2zwGk77oznznoBDuEU9LWSSCSyb5OHV3IC7hIyvcAwVxUJdpspZVYbQIP28wiQ KflZbHZ8IFxRZj5tFtQdDFN97/oFCh/fEv0hCdp/cECOslRREUlaGGKnNiEpH0qJmZa8 CWgaJRJzFRPpt+LDgS0GyNvgimtJ6yB7aHhHwCZJu9+7j5SQu4Wex7yeEEfv7XSOu7RF y7qfjNm5ZmnvZNCIKwVAP0mw7VsUs6eajbtywFCSRnx9xA8WKbzYqmw9d8eendehlTr+ 7hseWxaLezsPM4/RYKDtxcGeaXeX3cnJC7Uvkr9/mbC6TFziz6FsX5jDZiQhxN4n/sux 0SAQ== X-Gm-Message-State: ALyK8tLXaPrtyev0TR5KMo8LX7/Ku051vW9szQK92GlN/IviMIunFz6eoDD3zYRZq6SDSw== X-Received: by 10.66.251.2 with SMTP id zg2mr9845921pac.32.1465445950976; Wed, 08 Jun 2016 21:19:10 -0700 (PDT) Received: from localhost.localdomain (c-73-223-118-172.hsd1.ca.comcast.net. [73.223.118.172]) by smtp.gmail.com with ESMTPSA id c13sm5848579pfc.40.2016.06.08.21.19.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 21:19:10 -0700 (PDT) From: Zi Shen Lim To: "David S. Miller" , Catalin Marinas , Will Deacon Cc: Zi Shen Lim , Yang Shi , Alexei Starovoitov , Daniel Borkmann , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v3 1/4] bpf: fix missing header inclusion Date: Wed, 8 Jun 2016 21:18:47 -0700 Message-Id: <1465445930-3960-2-git-send-email-zlim.lnx@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465445930-3960-1-git-send-email-zlim.lnx@gmail.com> References: <1465445930-3960-1-git-send-email-zlim.lnx@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Commit 0fc174dea545 ("ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs") introduced usage of ERR_PTR() in bpf_prog_get(), however did not include linux/err.h. Without this patch, when compiling arm64 BPF without CONFIG_BPF_SYSCALL: ... In file included from arch/arm64/net/bpf_jit_comp.c:21:0: include/linux/bpf.h: In function 'bpf_prog_get': include/linux/bpf.h:235:9: error: implicit declaration of function 'ERR_PTR' [-Werror=implicit-function-declaration] return ERR_PTR(-EOPNOTSUPP); ^ include/linux/bpf.h:235:9: warning: return makes pointer from integer without a cast [-Wint-conversion] In file included from include/linux/rwsem.h:17:0, from include/linux/mm_types.h:10, from include/linux/sched.h:27, from arch/arm64/include/asm/compat.h:25, from arch/arm64/include/asm/stat.h:23, from include/linux/stat.h:5, from include/linux/compat.h:12, from include/linux/filter.h:10, from arch/arm64/net/bpf_jit_comp.c:22: include/linux/err.h: At top level: include/linux/err.h:23:35: error: conflicting types for 'ERR_PTR' static inline void * __must_check ERR_PTR(long error) ^ In file included from arch/arm64/net/bpf_jit_comp.c:21:0: include/linux/bpf.h:235:9: note: previous implicit declaration of 'ERR_PTR' was here return ERR_PTR(-EOPNOTSUPP); ^ ... Fixes: 0fc174dea545 ("ebpf: make internal bpf API independent of CONFIG_BPF_SYSCALL ifdefs") Suggested-by: Daniel Borkmann Signed-off-by: Zi Shen Lim Acked-by: Daniel Borkmann --- include/linux/bpf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/bpf.h b/include/linux/bpf.h index 8ee27b8..1bcae82 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -11,6 +11,7 @@ #include #include #include +#include struct bpf_map;