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: <d120d5000706151200u34bd6728n7fca0983d6175f29@mail.gmail.com>
Date:	Fri, 15 Jun 2007 15:00:46 -0400
From:	"Dmitry Torokhov" <dmitry.torokhov@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Using RCU with rcu_read_lock()?

Hi,

I have a piece of code that is always called under a spinlock with
interrups disabled. Within that piece of code I iterate through a
list. I have another piece of code that wants to modify that list. I
have 2 options:

1) Have the other piece of code acquire the same spinlock
2) Use RCU

I don't want to do 1) because the otheir piece of code does not really
care about object owning the spinlock and so acquiring the spinlock is
"not nice". However it is guaranteed that the piece of code that
accesses lock runs atomically with interrupts disabled. So
rcu_read_lock() would be superfluos there.

Is it possible to still use list_for_each_rcu() and friends to access
that list without rcu_read_lock()? Or it is betteruse complete RCU
interface and eat cost of couple of extra instrctions?

-- 
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ