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: <1471427969-2355-2-git-send-email-oneukum@suse.com>
Date:	Wed, 17 Aug 2016 11:59:29 +0200
From:	Oliver Neukum <oneukum@...e.com>
To:	linux-usb@...r.kernel.org, netdev@...r.kernel.org,
	davem@...emloft.net, stern@...land.harvard.edu
Cc:	Oliver Neukum <oneukum@...e.com>
Subject: [PATCH 2/2] kaweth: fix oops upon failed memory allocation

Just return an error upon failure.

Signed-off-by: Oliver Neukum <oneukum@...e.com>
---
 drivers/net/usb/kaweth.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
index 37bf715..3cd6906 100644
--- a/drivers/net/usb/kaweth.c
+++ b/drivers/net/usb/kaweth.c
@@ -1049,6 +1049,8 @@ static int kaweth_probe(
 		/* Download the firmware */
 		dev_info(dev, "Downloading firmware...\n");
 		kaweth->firmware_buf = (__u8 *)__get_free_page(GFP_KERNEL);
+		if (!kaweth->firmware_buf)
+				return -ENOMEM;
 		if ((result = kaweth_download_firmware(kaweth,
 						      "kaweth/new_code.bin",
 						      100,
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ