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]
Message-ID: <20190214193113.0000609f.zbestahu@gmail.com>
Date:   Thu, 14 Feb 2019 19:31:13 +0800
From:   Yue Hu <zbestahu@...il.com>
To:     anton@...msg.org, ccross@...roid.com, tony.luck@...el.com,
        keescook@...omium.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] pstore/ram: Avoid possible failure of dummy device
 unregister

From 08ac260f36b4c11eb33fa58466462a5e1027bdb3 Mon Sep 17 00:00:00 2001
From: Yue Hu <zbestahu@...il.com>
Date: Thu, 14 Feb 2019 19:34:16 +0800
Subject: [PATCH] pstore/ram: Avoid possible failure of dummy device unregister

If create dummy platform device failed, dummy variable should not
been set as NULL. Because the following platform_device_unregister()
will judge if the dummy is NULL or not, if dummy is NULL nothing
happen for unregister flow.

Signed-off-by: Yue Hu <zbestahu@...il.com>
---
 fs/pstore/ram.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 4a06675..61bc573 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -994,7 +994,6 @@ static void __init ramoops_register_dummy(void)
 	if (IS_ERR(dummy)) {
 		pr_info("could not create platform device: %ld\n",
 			PTR_ERR(dummy));
-		dummy = NULL;
 		ramoops_unregister_dummy();
 	}
 }
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ