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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu,  1 Dec 2016 10:53:14 +0800
From:   Pan Bian <>
To:     Joshua Morris <>,
        Philip Kelleher <>
Cc:, Pan Bian <>
Subject: [PATCH 1/1] block: rsxx: set error code on exception path

Fix bug In function
rsxx_pci_probe(), variable st takes the return value. Its value should
be negative on failures. However, the value of st is 0 even if the call
to create_singlethread_workqueue() returns a NULL pointer. This patch
fixes the bug by assigning -ENOMEM to st when the call fails.

Signed-off-by: Pan Bian <>
 drivers/block/rsxx/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
index 34997df..925bc46 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -890,6 +890,7 @@ static int rsxx_pci_probe(struct pci_dev *dev,
 	card->event_wq = create_singlethread_workqueue(DRIVER_NAME"_event");
 	if (!card->event_wq) {
 		dev_err(CARD_TO_DEV(card), "Failed card event setup.\n");
+		st = -ENOMEM;
 		goto failed_event_handler;

Powered by blists - more mailing lists