summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRobert Love <rml@tech9.net>2002-10-08 23:06:28 -0700
committerJames Simmons <jsimmons@maxwell.earthlink.net>2002-10-08 23:06:28 -0700
commit2a7a183fba201c2827328f786e2980cf11cc79a6 (patch)
tree5829dcad49f698d0a969ac1b091c5fd96799b75b /kernel
parent26113ebec4495031c3d8833feaf2b2e9f5882dcd (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