Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2018 10:33:55 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r329970 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201802251033.w1PAXtur018203@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sun Feb 25 10:33:55 2018
New Revision: 329970
URL: https://svnweb.freebsd.org/changeset/base/329970

Log:
  MFC r329514:
  Implement the rcu_dereference_raw() function macro.
  Make sure all RCU dereferencing use the READ_ONCE() function macro.
  
  Submitted by:	Johannes Lundberg <johalun0@gmail.com>
  Sponsored by:	Mellanox Technologies
  Sponsored by:	Limelight Networks

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/rcupdate.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/rcupdate.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/rcupdate.h	Sun Feb 25 10:33:12 2018	(r329969)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/rcupdate.h	Sun Feb 25 10:33:55 2018	(r329970)
@@ -74,13 +74,16 @@
 } while (0)
 
 #define	rcu_access_pointer(p)			\
-	((__typeof(*p) *)(READ_ONCE(p)))
+	((__typeof(*p) *)READ_ONCE(p))
 
 #define	rcu_dereference_protected(p, c)		\
-	((__typeof(*p) *)(p))
+	((__typeof(*p) *)READ_ONCE(p))
 
 #define	rcu_dereference(p)			\
 	rcu_dereference_protected(p, 0)
+
+#define	rcu_dereference_raw(p)			\
+	((__typeof(*p) *)READ_ONCE(p))
 
 #define	rcu_pointer_handoff(p) (p)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802251033.w1PAXtur018203>