public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [0/9] SYSCTL: Use RCU to avoid races with string sysctls v2
@ 2010-01-05  2:15 Andi Kleen
  2010-01-05  2:15 ` [PATCH] [1/9] Add rcustring ADT for RCU protected strings v2 Andi Kleen
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: Andi Kleen @ 2010-01-05  2:15 UTC (permalink / raw)
  To: ebiederm, paulmck, akpm, linux-kernel


v2 version that addresses all the earlier review comments
minus patches that were already merged.

I think this one is ready for merge now. Andrew, could you please
take it?

Signed-off-by: Andi Kleen <ak@linux.intel.com>

---

With BKL-less sysctls most of the writable string sysctls are racy. There
is no locking on the reader side, so a reader could see an inconsistent
string or worse miss the terminating null and walk of beyond it.

This patch kit adds a new "rcu string" variant to avoid these 
problems and convers the racy users. One the writer side the strings are 
always copied to new memory and the readers use rcu_read_lock()
to get a stable view. For readers who access the string over
sleeps the reader copies the string. 

This is all hidden in a new generic "rcu_string" ADT which can be also 
used for other purposes.

This finally implements all the letters in RCU, most other users
leave out the 'C'.

I left some obscure users in architectures (sparc, mips) alone and audited
all of the others. The sparc reboot_cmd one has references to asm files
which I didn't want to touch and the mips variant seemd just too obscure.

All the others are not racy.

-Andi

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-01-11 14:27 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-05  2:15 [PATCH] [0/9] SYSCTL: Use RCU to avoid races with string sysctls v2 Andi Kleen
2010-01-05  2:15 ` [PATCH] [1/9] Add rcustring ADT for RCU protected strings v2 Andi Kleen
2010-01-05  5:32   ` Paul E. McKenney
2010-01-05 10:47     ` Andi Kleen
2010-01-05 14:11       ` Paul E. McKenney
2010-01-05 14:19         ` Andi Kleen
2010-01-08 23:50   ` Andrew Morton
2010-01-11 12:12   ` Bert Wesarg
2010-01-11 14:26     ` Andi Kleen
2010-01-05  2:15 ` [PATCH] [2/9] Add a kernel_address() that works for data too Andi Kleen
2010-01-05  8:44   ` Russell King
2010-01-05  8:58   ` Sam Ravnborg
2010-01-05 19:04     ` Russell King
2010-01-05 19:15       ` Andi Kleen
2010-01-08 23:51         ` Andrew Morton
2010-01-05  2:15 ` [PATCH] [3/9] SYSCTL: Add proc_rcu_string to manage sysctls using rcu strings Andi Kleen
2010-01-05  2:15 ` [PATCH] [4/9] SYSCTL: Use RCU strings for core_pattern sysctl Andi Kleen
2010-01-05  6:56   ` Eric W. Biederman
2010-01-05 11:49     ` Andi Kleen
2010-01-05  2:15 ` [PATCH] [5/9] SYSCTL: Add call_usermodehelper_cleanup() Andi Kleen
2010-01-05  2:15 ` [PATCH] [6/9] SYSCTL: Convert modprobe_path to proc_rcu_string() Andi Kleen
2010-01-05  2:15 ` [PATCH] [7/9] SYSCTL: Convert poweroff_command to proc_rcu_string Andi Kleen
2010-01-05  2:15 ` [PATCH] [8/9] SYSCTL: Convert hotplug helper string to proc_rcu_string() Andi Kleen
2010-01-05  2:15 ` [PATCH] [9/9] SYSCTL: Use RCU protected sysctl for ocfs group add helper Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox