[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9449aa6-be9d-9021-66e7-fb0272909ee7@csgroup.eu>
Date: Fri, 25 Feb 2022 09:27:33 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Petr Mladek <pmladek@...e.com>, Aaron Tomlin <atomlin@...hat.com>
CC: "mcgrof@...nel.org" <mcgrof@...nel.org>,
"cl@...ux.com" <cl@...ux.com>, "mbenes@...e.cz" <mbenes@...e.cz>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"jeyu@...nel.org" <jeyu@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-modules@...r.kernel.org" <linux-modules@...r.kernel.org>,
"void@...ifault.com" <void@...ifault.com>,
"atomlin@...mlin.com" <atomlin@...mlin.com>,
"allen.lkml@...il.com" <allen.lkml@...il.com>,
"joe@...ches.com" <joe@...ches.com>,
"msuchanek@...e.de" <msuchanek@...e.de>,
"oleksandr@...alenko.name" <oleksandr@...alenko.name>
Subject: Re: [PATCH v8 09/13] module: Move kallsyms support into a separate
file
Le 25/02/2022 à 10:15, Petr Mladek a écrit :
> On Tue 2022-02-22 14:12:59, Aaron Tomlin wrote:
>> No functional change.
>
> The patch adds rcu_dereference_sched() into several locations.
> It triggers lockdep warnings, see below.
>
> It is good example why avoid any hidden changes when shuffling
> code. The changes in the code should be done in a preparatory
> patch or not at all.
>
> This patch is even worse because these changes were not
> mentioned in the commit message. It should describe what
> is done and why.
>
> I wonder how many other changes are hidden in this patchset
> and if anyone really checked them.
That's probably my fault, when I reviewed version v5 of the series I
mentionned all checkpatch and sparse reports asking Aaron to make his
series exempt of such warnings. Most warnings where related to style
(parenthesis alignment, blank lines, spaces, etc ...) or erroneous
casting etc....
But for that particular patch we had:
kernel/module/kallsyms.c:174:23: warning: incorrect type in assignment
(different address spaces)
kernel/module/kallsyms.c:174:23: expected struct mod_kallsyms
[noderef] __rcu *kallsyms
kernel/module/kallsyms.c:174:23: got void *
kernel/module/kallsyms.c:176:12: warning: dereference of noderef expression
kernel/module/kallsyms.c:177:12: warning: dereference of noderef expression
kernel/module/kallsyms.c:179:12: warning: dereference of noderef expression
kernel/module/kallsyms.c:180:12: warning: dereference of noderef expression
kernel/module/kallsyms.c:189:18: warning: dereference of noderef expression
kernel/module/kallsyms.c:190:35: warning: dereference of noderef expression
kernel/module/kallsyms.c:191:20: warning: dereference of noderef expression
kernel/module/kallsyms.c:196:32: warning: dereference of noderef expression
kernel/module/kallsyms.c:199:45: warning: dereference of noderef expression
Aaron used rcu_dereference_sched() in order to fix that.
How should this be fixed if using rcu_dereference_sched() is not correct ?
Thanks
Christophe
Powered by blists - more mailing lists