lkml.org 
[lkml]   [2004]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Stack traces in 2.6.9-rc2-mm4

* Nick Piggin <nickpiggin@yahoo.com.au> wrote:

> >+ preempt_disable();
> > /* if over the trickle threshold, use only 1 in 4096 samples */
> > if ( random_state->entropy_count > trickle_thresh &&
> > (__get_cpu_var(trickle_count)++ & 0xfff))
> >- return;
> >+ goto out;
> >
>
> It looks like upstream code *is* buggy because that is a non-atomic
> RMW operation on the per-cpu var, no? Hence you must disable preempt.

no, the upstream code (i.e. BK-curr) is not buggy, because there this
code runs under the BKL, implicitly as part of vt_ioctl() - and the BKL
disables preemption in the upstream kernel.

Yes, the code is fragile, but it's not buggy. With the remove-bkl patch
this fragility turned into an outright bug. (Fortunately the patch
detects all such incidents.)

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

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.048 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site