summaryrefslogtreecommitdiffstats
path: root/scripts/coccinelle/api/memdup_user.cocci
AgeCommit message (Collapse)AuthorFilesLines
2022-08-07update Coccinelle URLJulia Lawall1-1/+1
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
2020-08-04coccinelle: api: filter out memdup_user definitionsDenis Efremov1-4/+13
Don't match memdup_user/vmemdup_user. Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
2020-08-04coccinelle: api: extend memdup_user rule with vmemdup_user()Denis Efremov1-0/+45
Add vmemdup_user() transformations to the memdup_user.cocci rule. Commit 50fd2f298bef ("new primitive: vmemdup_user()") introduced vmemdup_user(). The function uses kvmalloc with GPF_USER flag. Signed-off-by: Denis Efremov <efremov@linux.com>
2020-08-04coccinelle: api: extend memdup_user transformation with GFP_USERDenis Efremov1-2/+6
Match GFP_USER and optional __GFP_NOWARN allocations with memdup_user.cocci rule. Commit 6c2c97a24f09 ("memdup_user(): switch to GFP_USER") switched memdup_user() from GFP_KERNEL to GFP_USER. In almost all cases it is still a good idea to recommend memdup_user() for GFP_KERNEL allocations. The motivation behind altering memdup_user() to GFP_USER: https://lkml.org/lkml/2018/1/6/333 Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 505Thomas Gleixner1-3/+4
Based on 1 normalized pattern(s): gplv2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 58 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081207.556988620@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-01Coccinelle: limit memdup_user transformation to GFP_KERNEL caseJulia Lawall1-4/+4
Memdup_user encapsulates a memory allocation with the flag GFP_KERNEL, so only allow this flag in the original code. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.com>
2013-07-03Coccinelle: Update the options used to the new option schemeNicolas Palix1-1/+1
spatch has changed its option scheme. E.g., --no_show_diff is now --no-show-diff This patch updates: - scripts/coccicheck - Semantic patches under scripts/coccinelle/ Signed-off-by: Nicolas Palix <nicolas.palix@imag.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-09-01Coccinelle: fix typo in memdup_user.cocciFengguang Wu1-2/+2
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-01-15scripts/coccinelle: improve the coverage of some semantic patchesJulia Lawall1-7/+32
This patch ensures that all semantic patches in the scripts/coccinelle directory provide the report option. Report messages that include line numbers now have the line number preceded by "line" for easier subsequent processing. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-08-31Coccinelle: Add api/memdup_userNicolas Palix1-0/+35
Use kmemdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives Signed-off-by: Nicolas Palix <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Michal Marek <mmarek@suse.cz>