Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760010AbXISOFc (ORCPT ); Wed, 19 Sep 2007 10:05:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755310AbXISOFY (ORCPT ); Wed, 19 Sep 2007 10:05:24 -0400 Received: from mx2.go2.pl ([193.17.41.42]:42706 "EHLO poczta.o2.pl" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754905AbXISOFX (ORCPT ); Wed, 19 Sep 2007 10:05:23 -0400 Date: Wed, 19 Sep 2007 16:07:26 +0200 From: Jarek Poplawski To: Nadia Derbey Cc: Andrew Morton , Alexey Dobriyan , linux-kernel@vger.kernel.org Subject: Re: 2.6.23-rc6-mm1: IPC: sleeping function called ... Message-ID: <20070919140726.GA4603@ff.dom.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46EFE6D7.3070105@bull.net> User-Agent: Mutt/1.4.2.2i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1250 Lines: 38 On 18-09-2007 16:55, Nadia Derbey wrote: ... > > Well, reviewing the code I found another place where the > rcu_read_unlock() was missing. > I'm so sorry for the inconvenience. It's true that I should have tested > with CONFIG_PREEMPT=y :-( > Now, the ltp tests pass even with this option set... > > In attachment you'll find a patch thhat > 1) adds the missing rcu_read_unlock() > 2) replaces Andrew's fix with a new one: the rcu_read_lock() is now > taken in ipc_lock() / ipc_lock_by_ptr() and released in ipc_unlock(), > exactly as it was done in the ref code. BTW, probably I miss something, but I wonder, how this RCU is working here. E.g. in msg.c do_msgsnd() there is: msq = msg_lock_check(ns, msqid); ... msg_unlock(msq); schedule(); ipc_lock_by_ptr(&msq->q_perm); Since msq_lock_check() gets msq with ipc_lock_check() under rcu_read_lock(), and then goes msg_unlock(msq) (i.e. ipc_unlock()) with rcu_read_unlock(), is it valid to use this with ipc_lock_by_ptr() yet? Regards, Jarek P. - 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/