Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753287AbdCMO32 (ORCPT ); Mon, 13 Mar 2017 10:29:28 -0400 Received: from mail-qt0-f176.google.com ([209.85.216.176]:36108 "EHLO mail-qt0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753554AbdCMO3C (ORCPT ); Mon, 13 Mar 2017 10:29:02 -0400 MIME-Version: 1.0 In-Reply-To: <20170313141517.3397802-1-arnd@arndb.de> References: <20170313141517.3397802-1-arnd@arndb.de> From: Alexander Potapenko Date: Mon, 13 Mar 2017 15:28:18 +0100 Message-ID: Subject: Re: [PATCH] kasan: Add a prototype of task_struct to avoid warning To: Arnd Bergmann Cc: Andrey Ryabinin , Masami Hiramatsu , Dmitry Vyukov , Andrew Morton , kasan-dev , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v2DETm4k023513 Content-Length: 1795 Lines: 56 On Mon, Mar 13, 2017 at 3:14 PM, Arnd Bergmann wrote: > From: Masami Hiramatsu > > Add a prototype of task_struct to fix below warning on arm64. > > In file included from arch/arm64/kernel/probes/kprobes.c:19:0: > include/linux/kasan.h:81:132: error: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration [-Werror] > static inline void kasan_unpoison_task_stack(struct task_struct *task) {} > > As same as other types (kmem_cache, page, and vm_struct) this adds a > prototype of task_struct data structure on top of kasan.h. > > [arnd] A related warning was fixed before, but now appears in a different > line in the same file in v4.11-rc2. The patch from Masami Hiramatsu > still seems appropriate, so let's take his version. > > Link: https://patchwork.kernel.org/patch/9569839/ > Signed-off-by: Masami Hiramatsu > Cc: Andrey Ryabinin > Cc: Alexander Potapenko > Cc: Dmitry Vyukov > Signed-off-by: Arnd Bergmann Acked-by: Alexander Potapenko > --- > include/linux/kasan.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/kasan.h b/include/linux/kasan.h > index 1c823bef4c15..5734480c9590 100644 > --- a/include/linux/kasan.h > +++ b/include/linux/kasan.h > @@ -6,6 +6,7 @@ > struct kmem_cache; > struct page; > struct vm_struct; > +struct task_struct; > > #ifdef CONFIG_KASAN > > -- > 2.9.0 > -- Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Straße, 33 80636 München Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg