From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934769Ab3BTJiy (ORCPT ); Wed, 20 Feb 2013 04:38:54 -0500 Received: from sabertooth01.qualcomm.com ([65.197.215.72]:58016 "EHLO sabertooth01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934575Ab3BTJiv (ORCPT ); Wed, 20 Feb 2013 04:38:51 -0500 X-IronPort-AV: E=Sophos;i="4.84,699,1355126400"; d="scan'208";a="24255950" X-IronPort-AV: E=Sophos;i="4.84,699,1355126400"; d="scan'208";a="435321326" From: "Bu, Yitian" To: Peter Zijlstra CC: "tglx@linutronix.de" , "linux-kernel@vger.kernel.org" , "mingo@kernel.org" Subject: RE: [PATCH] Fix rq->lock vs logbuf_lock unlock race Thread-Topic: [PATCH] Fix rq->lock vs logbuf_lock unlock race Thread-Index: AQHOD0aoTqiQYklW0USvuaYJaBrXc5iCd8nw Date: Wed, 20 Feb 2013 09:38:28 +0000 Message-ID: References: <1361349910.10155.0.camel@laptop> In-Reply-To: <1361349910.10155.0.camel@laptop> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.48.1] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id r1K9ct2h002807 > -----Original Message----- > From: Peter Zijlstra [mailto:a.p.zijlstra@chello.nl] > Sent: Wednesday, February 20, 2013 4:45 PM > To: Bu, Yitian > Cc: tglx@linutronix.de; linux-kernel@vger.kernel.org; mingo@kernel.org > Subject: Re: [PATCH] Fix rq->lock vs logbuf_lock unlock race > > On Mon, 2013-02-18 at 12:53 +0000, Bu, Yitian wrote: > > This patch is for kernel V3.7.9 > > > > From 8796f4a2175a323aaa49ea8dd0fe68678dd5dccd Mon Sep 17 00:00:00 > 2001 > > From: ybu > > Date: Mon, 18 Feb 2013 19:52:01 +0800 > > Subject: [PATCH] Fix rq->lock vs logbuf_lock unlock race > > > > fix up the fallout from commit 07354eb1a74d1 ("locking printk: > > Annotate logbuf_lock as raw") > > Release console_sem after unlocking the logbuf_lock avoids some lock > > inversion troubles between logbuf_lock and rq->lock. > > Please clarify how and where.. you're not actually supposed to use > printk() while holding rq->lock. > 1. the patch 0b5e1c5255e, which is written by you, release console_sem after logbuf_lock. But the patch 07354eb1a revert one of your change, it reintroduced a lock inversion problem which was fixed in 0b5e1c5255. The purpose of my patch is the same as your patch 0b5e1c5255e. 2. from printk comment: "This is printk(). It can be called from any context. We want it to work. ". I suppose to use printk in any context. {.n++%ݶw{.n+{G{ayʇڙ,jfhz_(階ݢj"mG?&~iOzv^m ?I