[lkml]   [2009]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Q: check_unsafe_exec() races (Was: [PATCH 2/4] fix setuid sometimes doesn't)

On Tue, 21 Apr 2009, Oleg Nesterov wrote:
> > (You do rcu_read_unlock() earlier, but that's okay.)
> Yes, but unless we have a "strong" reason, it is better to take
> fs->lock first. rcu_read_lock() is free, but disables preemption.

.. but so does taking a spinlock. So it shouldn't matter.

We could play games with that (the same way I think we have some games for
large-system irq latency with '__raw_spin_lock_flags()' on ia64), but that
makes sense only when you have lots of CPU's and expect irq latency to

And it doesn't tend to make sense for preemption latency, because if you
have so many CPU's that you have lots of spinning on locks, you would
normally not really care deeply about preemption (sure, in theory it's a
real-time thing, in practice I doubt you'll find anybody who cares).


 \ /
  Last update: 2009-04-21 18:45    [W:0.108 / U:2.616 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site