lkml.org 
[lkml]   [2011]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: block: BUG: using smp_processor_id() in preemptible [00000000] code
On 2011-07-26 06:49, Ming Lei wrote:
> Hi,
>
> The bug is observed in -next-20110725, follows the stack trace[1], and
> seems the attachment patch can fix the bug.

Does this work, too? We don't necessarily need the CPU stable, but
spewing debug output isn't very nice.

diff --git a/block/blk-core.c b/block/blk-core.c
index f8cb099..f925581 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1283,7 +1283,7 @@ get_rq:

if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) ||
bio_flagged(bio, BIO_CPU_AFFINE))
- req->cpu = smp_processor_id();
+ req->cpu = raw_smp_processor_id();

plug = current->plug;
if (plug) {
--
Jens Axboe



\
 
 \ /
  Last update: 2011-07-26 07:29    [W:0.039 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site