From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034712AbcIWNxu (ORCPT ); Fri, 23 Sep 2016 09:53:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43392 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034007AbcIWNxs (ORCPT ); Fri, 23 Sep 2016 09:53:48 -0400 Date: Fri, 23 Sep 2016 15:52:50 +0200 From: Oleg Nesterov To: Nikolay Borisov Cc: LKML Subject: Re: BUG_ON in rcu_sync_func triggered Message-ID: <20160923135250.GA28734@redhat.com> References: <20160912130124.GA7984@redhat.com> <57D7B6F5.4040106@kyup.com> <20160913131852.GA4112@redhat.com> <20160913134304.GA26160@redhat.com> <57D80EB8.9080405@kyup.com> <57D80F52.6090804@kyup.com> <20160913152042.GA30160@redhat.com> <57D8EE82.3090502@kyup.com> <20160914125835.GA6673@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 23 Sep 2016 13:53:48 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/23, Nikolay Borisov wrote: > > > --- a/fs/super.c > > +++ b/fs/super.c > > @@ -1344,7 +1344,9 @@ int thaw_super(struct super_block *sb) > > int error; > > > > down_write(&sb->s_umount); > > - if (sb->s_writers.frozen == SB_UNFROZEN) { > > + if (sb->s_writers.frozen != SB_FREEZE_COMPLETE) { > > + if (sb->s_writers.frozen != SB_UNFROZEN) > > + pr_crit("THAW: hit the race: %d\n", sb->s_writers.frozen); > > up_write(&sb->s_umount); > > return -EINVAL; > > } > > > > I was away on holiday so that's why I was silent. However, with this > patch applied I couldn't reproduce the issue nor the pr_crit > triggered. Great, thanks a lot. > Have you had any moments of epiphany re. this issue? Well, after I failed to find any problem in rcu/sync.c I started to look at the callers and found this race. > Should > some FS people be involved in the discussion? Sure. I'll send the patch with CC's. Probably next week, I am too busy right now. Thanks Nikolay, Oleg.