From patchwork Tue Jun 7 05:22:56 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: 631319 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 3rP0PX5qHRz9s48 for ; Tue, 7 Jun 2016 15:24:48 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=PNIXKEE2; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752222AbcFGFX0 (ORCPT ); Tue, 7 Jun 2016 01:23:26 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32978 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782AbcFGFXY (ORCPT ); Tue, 7 Jun 2016 01:23:24 -0400 Received: by mail-pf0-f196.google.com with SMTP id u67so3456778pfu.0; Mon, 06 Jun 2016 22:23:24 -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=PNIXKEE2WagkhVeM80RCZaD9HTCiUT2g/1MaQixKdqwg5tC/bxAGW3jKpqBbkNUpVS KNY3t6ZXFLYKBkg+ncREPnUDLgvMig/OYdPTgqCB9t6O6iafWbtDn9fVIXTrvOTQrgtv 79P/O8McGug+QO+LDa4p2rl99GXYVFEm71YXe28KpYeqEkPw5EepER3ZfdTCjhudVDjD eIjbTpZ/A+nrWu00h+hBpJgwHkvX8tuG5QyiIp4Gs7wYO3Y6niCa4KsDLHKXfPz9OfPL f0QXVO2HVZ3083InHgnLphJ1FKYtk3zV9TBqzQb8bzjxunIUaCK/mTC2NsziNRBevyKU fSKQ== 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=KEX/8F48paEyW9a7fQ1Q6wGB+PHAdluvtfdCVw0cF0djv7jR83Ugb0OPSs80QMRhdx HnETtUxt2vRXLbBbPb8LTLkUWvQkuSOZhUmIo7v6fHyyVWzwl4F+x/h9I9unOlyxSOm9 9tP2eB1+/ROEhhJfAQ7fi8VD6KrnzvIXorDOY2P7Q4YE8ZmFx//nl0+gjV2EE7kyrn+U pLxPiIXGLzGwfj0OkjQe1CPSFtM4/yoYH97HlJ9zFIFvfO2xR0JV7UjMSPAbPiOVRwht eNHVlKIHV82D3DLRknS78gMQIEt93LKgnj3DzaRPtwPt762AVytCIKiegeuCyADF3MJ0 i5/A== X-Gm-Message-State: ALyK8tJAVMfhuxz8uz7MH0e0nb7cpq+f83cIEI9dRm4d0s45ezTjpbaEJysiyd96kmFWZQ== X-Received: by 10.98.113.4 with SMTP id m4mr21412269pfc.22.1465277003939; Mon, 06 Jun 2016 22:23:23 -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 4sm31609674pfz.35.2016.06.06.22.23.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jun 2016 22:23:23 -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 v2 1/4] bpf: fix missing header inclusion Date: Mon, 6 Jun 2016 22:22:56 -0700 Message-Id: <1465276979-10147-2-git-send-email-zlim.lnx@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465276979-10147-1-git-send-email-zlim.lnx@gmail.com> References: <1465276979-10147-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;