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,  5 May 2016 23:24:06 +0530
From:	Muhammad Falak R Wani <falakreyaz@...il.com>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] block: partition: use RCU_INIT_POINTER() for NULLing.

It is safe to use RCU_INIT_POINTER() to NULL, instead of
rcu_assign_pointer().
This results in slightly smaller/faster code.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@...il.com>
---
 block/partition-generic.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/partition-generic.c b/block/partition-generic.c
index 2c6ae2a..e5219d5 100644
--- a/block/partition-generic.c
+++ b/block/partition-generic.c
@@ -262,8 +262,8 @@ void delete_partition(struct gendisk *disk, int partno)
 	if (!part)
 		return;
 
-	rcu_assign_pointer(ptbl->part[partno], NULL);
-	rcu_assign_pointer(ptbl->last_lookup, NULL);
+	RCU_INIT_POINTER(ptbl->part[partno], NULL);
+	RCU_INIT_POINTER(ptbl->last_lookup, NULL);
 	kobject_put(part->holder_dir);
 	device_del(part_to_dev(part));
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ