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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Mar 2014 17:42:09 -0700
From:	Conrad Meyer <cemeyer@...edu>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Forest Bond <forest@...ttletooquiet.net>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Conrad Meyer <cse.cem@...il.com>
Subject: [PATCH] Staging: vt6655: Fix sparse-indicated type mismatch to kmalloc

Signed-off-by: Conrad Meyer <cse.cem@...il.com>
---
Patch is against next-20140320. Fixes a minor sparse warning in the staging
driver vt6655. p->length is u16; implicit cast to size_t is fine. No reason to
cast GFP_KERNEL...
---
 drivers/staging/vt6655/wpactl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c
index d17224f..c27ed5d 100644
--- a/drivers/staging/vt6655/wpactl.c
+++ b/drivers/staging/vt6655/wpactl.c
@@ -855,11 +855,11 @@ int wpa_ioctl(PSDevice pDevice, struct iw_point *p)
 
 	if (p->length < sizeof(struct viawget_wpa_param) ||
 	    p->length > VIAWGET_WPA_MAX_BUF_SIZE || !p->pointer)
 		return -EINVAL;
 
-	param = kmalloc((int)p->length, (int)GFP_KERNEL);
+	param = kmalloc(p->length, GFP_KERNEL);
 	if (param == NULL)
 		return -ENOMEM;
 
 	if (copy_from_user(param, p->pointer, p->length)) {
 		ret = -EFAULT;
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ