Messages in this thread | | | Date | Tue, 28 Sep 2004 12:24:54 +0200 | From | Ingo Molnar <> | Subject | Re: 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/
| |