lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 3 May 2017 22:40:51 +0200 From: SF Markus Elfring <elfring@...rs.sourceforge.net> To: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org> Cc: LKML <linux-kernel@...r.kernel.org>, kernel-janitors@...r.kernel.org Subject: [PATCH 5/6] lockdep: Improve a size determination in lock_stat_open() From: Markus Elfring <elfring@...rs.sourceforge.net> Date: Wed, 3 May 2017 22:05:57 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net> --- kernel/locking/lockdep_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/lockdep_proc.c b/kernel/locking/lockdep_proc.c index 2cc0ccd2b3de..509a17f5ea01 100644 --- a/kernel/locking/lockdep_proc.c +++ b/kernel/locking/lockdep_proc.c @@ -607,7 +607,7 @@ static int lock_stat_open(struct inode *inode, struct file *file) { int res; struct lock_class *class; - struct lock_stat_seq *data = vmalloc(sizeof(struct lock_stat_seq)); + struct lock_stat_seq *data = vmalloc(sizeof(*data)); if (!data) return -ENOMEM; -- 2.12.2
Powered by blists - more mailing lists