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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b871da4b-e86d-93b2-859a-4fb6c938075a@users.sourceforge.net>
Date:   Sat, 20 May 2017 21:10:39 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     Arnd Bergmann <arnd@...db.de>, Jan Kara <jack@...e.cz>,
        Jesper Nilsson <jesper.nilsson@...s.com>,
        Kumar Gala <galak@...nel.crashing.org>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        Michal Hocko <mhocko@...e.com>,
        Timur Tabi <timur@...escale.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 1/5] fsl_hypervisor: Improve a size determination in
 fsl_hv_open()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 20 May 2017 19:52:38 +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>
---
 drivers/virt/fsl_hypervisor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/virt/fsl_hypervisor.c b/drivers/virt/fsl_hypervisor.c
index d3eca879a0a8..d1df6c6740f1 100644
--- a/drivers/virt/fsl_hypervisor.c
+++ b/drivers/virt/fsl_hypervisor.c
@@ -659,5 +659,5 @@ static int fsl_hv_open(struct inode *inode, struct file *filp)
 	unsigned long flags;
 	int ret = 0;
 
-	dbq = kzalloc(sizeof(struct doorbell_queue), GFP_KERNEL);
+	dbq = kzalloc(sizeof(*dbq), GFP_KERNEL);
 	if (!dbq) {
-- 
2.13.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ