diff options
| author | Robert Love <rml@tech9.net> | 2002-10-08 23:06:28 -0700 |
|---|---|---|
| committer | James Simmons <jsimmons@maxwell.earthlink.net> | 2002-10-08 23:06:28 -0700 |
| commit | 2a7a183fba201c2827328f786e2980cf11cc79a6 (patch) | |
| tree | 5829dcad49f698d0a969ac1b091c5fd96799b75b /kernel | |
| parent | 26113ebec4495031c3d8833feaf2b2e9f5882dcd (diff) | |
[PATCH] fix preempt_count overflow with brlocks
Now that brlocks loop over NR_CPUS, on SMP every br_lock/br_unlock
results in the acquire/release of 32 locks. This incs/decs the
preempt_count by 32.
Since we only have 7 bits now for actually storing the lock depth, we
cannot nest but 3 locks deep. I doubt we ever acquire three brlocks
concurrently, but it is still a concern.
Attached patch disables/enables preemption explicitly once and only
once for each lock/unlock. This is also an optimization as it
removes 31 incs, decs, and conditionals. :)
Problem reported by Andrew Morton.
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
