Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756166Ab2FGFht (ORCPT ); Thu, 7 Jun 2012 01:37:49 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:58682 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751731Ab2FGFhs convert rfc822-to-8bit (ORCPT ); Thu, 7 Jun 2012 01:37:48 -0400 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 7 Jun 2012 14:37:47 +0900 X-Google-Sender-Auth: CT_AnsdEIyRAJA9h_Rr2SH2xyCM Message-ID: Subject: Re: [PATCH] blk-exec-assign-endio-before-queue-dead-check From: Tejun Heo To: Muthu Kumar Cc: Jens Axboe , James.Bottomley@hansenpartnership.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1160 Lines: 39 Hello, On Thu, Jun 7, 2012 at 2:35 PM, Muthu Kumar wrote: >> Looks like the bug there is rq->rq_disk and rq->end_io assignments >> happening after the queue_dead check. ?Just move the two lines before >> queue_head check? > > Thought about that. But the problem is, original rq->end_io is not > saved before the new assignment. But exploring further, I guess its ok > in this use case. It's supposed to be overridden, so I don't think that matters. > One more thing to consider is, the completion function is called from > the same calling context here. As far as my check, it looks ok. Let me > know if you think otherwise. Not sure what you mean. > Anyway, patch attached (as well as inline). > > Regards, > Muthu > > ----------------------- > blk-exec.c: In blk_execute_rq_nowait(), assign rq->endio,rq_disk > before queue dead check. Needs way more description. Thanks. -- tejun -- 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/