lkml.org 
[lkml]   [2012]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Kernel crash in icq_free_icq_rcu
From
Date
On Tue, 2012-01-17 at 17:11 -0800, Tejun Heo wrote:
> On Wed, Jan 18, 2012 at 09:05:26AM +0800, Shaohua Li wrote:
> > > Vivek is seeing the problem while switching elevators. Are you too?
> > > Or is it during normal operation?
> > same here. I had some problems when I debug my ioscheduler, but
> > eventually found even switching cfq and noop can trigger oops.
>
> Hmmm... maybe quiescing isn't working as expected and kmem cache is
> being destroyed with live icq's. I'll try to reproduce it.
this debug patch seems to fix for me.

diff --git a/block/blk-core.c b/block/blk-core.c
index e6c05a9..c6a8ef5 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -872,11 +872,11 @@ retry:
spin_unlock_irq(q->queue_lock);

/* create icq if missing */
- if (unlikely(et->icq_cache && !icq))
+ if (unlikely(et->icq_cache && !icq && (rw_flags & REQ_ELVPRIV)))
icq = ioc_create_icq(q, gfp_mask);

/* rqs are guaranteed to have icq on elv_set_request() if requested */
- if (likely(!et->icq_cache || icq))
+ if (likely(!et->icq_cache || icq || !(rw_flags & REQ_ELVPRIV)))
rq = blk_alloc_request(q, icq, rw_flags, gfp_mask);

if (unlikely(!rq)) {



\
 
 \ /
  Last update: 2012-01-18 02:33    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog