Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Feb 2018 09:10:14 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329514 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201802180910.w1I9AE6w022051@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Sun Feb 18 09:10:14 2018
New Revision: 329514
URL: https://svnweb.freebsd.org/changeset/base/329514

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

Modified:
  head/sys/compat/linuxkpi/common/include/linux/rcupdate.h

Modified: head/sys/compat/linuxkpi/common/include/linux/rcupdate.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/rcupdate.h	Sun Feb 18 08:58:20 2018	(r329513)
+++ head/sys/compat/linuxkpi/common/include/linux/rcupdate.h	Sun Feb 18 09:10:14 2018	(r329514)
@@ -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?201802180910.w1I9AE6w022051>