[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <07f2cb49-662f-590f-acf6-686f8432015d@users.sourceforge.net>
Date: Wed, 7 Sep 2016 13:45:56 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: Kees Cook <keescook@...omium.org>, Ingo Molnar <mingo@...hat.com>,
"x86@...nel.org" <x86@...nel.org>, Dave Young <dyoung@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Matt Fleming <matt.fleming@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: Re: x86-ksysfs: Use kmalloc_array() in create_setup_data_nodes()
>> Would the following script (for the semantic patch language)
>> be useful enough for further development considerations?
>>
>> usage_of_kmalloc_array1-excerpt2.cocci:
>> @replacement2@
>> expression count, pointer, target;
>> @@
>> target =
>> - kmalloc(sizeof(*pointer) * (count)
>> + kmalloc_array(count, sizeof(*pointer)
>> , ...);
>
> Why don't you include the _exact_ script that you run?
I showed only the "excerpt" above because of the current situation
that this single SmPL rule triggered the software change
which I suggested for the referenced source file.
How do you think about to try a command out like the following
also in your development (or test) environment?
elfring@...ne:~/Projekte/Linux/next-patched> spatch.opt ~/Projekte/Coccinelle/janitor/usage_of_kmalloc_array1-excerpt2.cocci arch/x86/kernel/ksysfs.c
Regards,
Markus
Powered by blists - more mailing lists