From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752770Ab1HAMH6 (ORCPT ); Mon, 1 Aug 2011 08:07:58 -0400 Received: from casper.infradead.org ([85.118.1.10]:46721 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751595Ab1HAMHx (ORCPT ); Mon, 1 Aug 2011 08:07:53 -0400 Subject: Re: v3.0: Weird kernel log message when resuming avout NMI received From: Peter Zijlstra To: Cyrill Gorcunov Cc: Francis Moreau , LKML , Don Zickus , Stephane Eranian , Ingo Molnar , Jiri Slaby In-Reply-To: <20110801112102.GQ2209@sun> References: <20110731110641.GG2209@sun> <20110731153225.GJ2209@sun> <1312196702.2617.445.camel@laptop> <20110801112102.GQ2209@sun> Content-Type: text/plain; charset="UTF-8" Date: Mon, 01 Aug 2011 14:12:34 +0200 Message-ID: <1312200754.2617.454.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2011-08-01 at 15:21 +0400, Cyrill Gorcunov wrote: > > mutex_lock(&swhash->hlist_mutex); > > - if (swhash->hlist_refcount > 0) { > > + if (swhash->hlist_refcount > 0 && !swhash->swevent_hlist) { > > Should not there be rcu_dereference(swhash->swevent_hlist)? swhash->hlist_mutex is the modifier lock for that rcu use and should thus serialize things sufficiently.