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>] [day] [month] [year] [list]
Message-Id: <1462107742-9784-1-git-send-email-falakreyaz@gmail.com>
Date:	Sun,  1 May 2016 18:30:44 +0530
From:	Muhammad Falak R Wani <falakreyaz@...il.com>
To:	David Airlie <airlied@...ux.ie>
Cc:	Ben Skeggs <bskeggs@...hat.com>, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] drm/nouveau/fence: use RCU_INIT_POINTER() when NULLing.

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

The follwoing semantic patch was used:
<smpl>
@@
@@
- rcu_assign_pointer
+ RCU_INIT_POINTER
  (..., NULL)

</smpl>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@...il.com>
---
 drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index 9a8c5b7..c842dc4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -60,7 +60,7 @@ nouveau_fence_signal(struct nouveau_fence *fence)
 
 	fence_signal_locked(&fence->base);
 	list_del(&fence->head);
-	rcu_assign_pointer(fence->channel, NULL);
+	RCU_INIT_POINTER(fence->channel, NULL);
 
 	if (test_bit(FENCE_FLAG_USER_BITS, &fence->base.flags)) {
 		struct nouveau_fence_chan *fctx = nouveau_fctx(fence);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ