Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4972309imm; Tue, 18 Sep 2018 02:09:27 -0700 (PDT) X-Google-Smtp-Source: ANB0VdawKxcwF2FllfrgWzF4xTy8Tr/M7henrtbdjbNHCDGkAdtoT/LJ1K1HyZ8gWOd/fpd0Zivx X-Received: by 2002:a62:205d:: with SMTP id g90-v6mr3702320pfg.253.1537261767354; Tue, 18 Sep 2018 02:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537261767; cv=none; d=google.com; s=arc-20160816; b=kpIFm1z+SAvpwO97kQJqw0S5yhfbDkWMQVQubWFdD67n58UjyDgrRAIEBP6tEw+esu HW5Y+fzXe46OFaeieGt2suhmOesFZrKXZuwnSCT8+6koxxWKfjAIzD7utqptzX1TOBMY t5Cq5g2YjnoBRcdKLKYwdkgebrI8d6HjtTv9ozlo3qP9wY+xr75sd6mb8HLyiYkvuJ/O kL5dazwasHpZS9V2gE2EMWANGIACFCp2lM32MDskBIPY5hM1Pi/P3Ihiz1x6uIGYhvms 105NKCLcsD8IVFul8+coX5WQwNPgGpfMhf+Mf+IcTPGGaEQ4HA4YZaCLnznvNAFfiC0w wMwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2jEOzF87Ru52EyxyRjGnfagIOT+pdY0ttzfdlRdRZM8=; b=SeNvdmXuz7L2kyIl1hiuFTz54JWmdwpxk/gnf+UxJLaUMflwErnT0tHMGZbb5kIbde 2mNCOf6NB+CcdyjVQHXFNgp93h0ZW+MCHG+yFxBsun895XgHTlqje8/ZkJIswXaubN3I gGRYuBAJP4eiC2jc5tcwSWCXacuRfL6u4bVqRNM1yu67C7ju9OeJzQlSQV2YupYvIoko pISmfwj3wA0mKzYf9AtNUv6AGBC6SxDps7fUwszvcEdYCfrmsCeOHzghhsPCIcPVLre1 UPp2nGxNYKHAt1DKbUARQgMywqLpMnWMYZCsXPi/cJkge+w+v2AkyFtGoq6BILjavpQD l8+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iZTSYh8P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bg5-v6si17429268plb.368.2018.09.18.02.09.12; Tue, 18 Sep 2018 02:09:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iZTSYh8P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729414AbeIROjI (ORCPT + 99 others); Tue, 18 Sep 2018 10:39:08 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:33413 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728467AbeIROjI (ORCPT ); Tue, 18 Sep 2018 10:39:08 -0400 Received: by mail-pl1-f195.google.com with SMTP id b97-v6so696698plb.0; Tue, 18 Sep 2018 02:07:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2jEOzF87Ru52EyxyRjGnfagIOT+pdY0ttzfdlRdRZM8=; b=iZTSYh8PSMkvh2o4lRv96P8yganz98hlvBEyCCSWZ+le8FaCxW8IBOX2TiT+cClw1W vLaai41JMGIkaSzSLs68wqavfwWmLD9Jcz0Xen/45qiWtfjq4RqliELqGia51asmfNYI 3pCSKLQZ8rx4JEkESMHc4ut7eUt17q5ltqCXucOBcirZQojwBo4amcxrZ8IS92q2EzT+ wn0KEKweBEqRZfberQ1SuKRrHGn/YUH/crrhN7lkT6xdmU07ZWNPFovf0PkNjTME17S0 HW/z9aovkzxabJ5ssXwKuFWJkyJ95lR6ovqZ3XUbZR+eE04OlDToslu9erXsUnE1bX0c cXcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2jEOzF87Ru52EyxyRjGnfagIOT+pdY0ttzfdlRdRZM8=; b=FpVqP8cpfUev7tEMShEY8EOdg6aKJRJZ8TaefeSE7DvEUQDMsbSgSnNecuc3r09Pqn Q8YbO/yBNtksDh9y4Fdqnx3xCDsMDLdKkhaKOQH8KHfTMHJyHypph9kjaD6VxBgQEOyb T0pBPMtKEl4iOPj+4HQ54cH5Oih5pN9aAOao0rektEIQXkhpd/J6sYJ/flM62qUh6GrK Zsl6SnM89a0MwOuLTNyp3foy07KM2yFq4N/0LQs+1a2BYINT6cN9lkkLmiSQb5xVnNYT vNuD0iynUkpEA6anKTKvBdZkDgBmN0IJv0ZRHmus6LHtdwX2slaiHEuSA1Knn3ipDr1v IzEg== X-Gm-Message-State: APzg51A3YuRYVn3GcuOytPokNrql5PkEKysqscGBQVhQgi8oX24jMfq5 KPHwHlHkn7KpoK73fOsH/Rs= X-Received: by 2002:a17:902:710c:: with SMTP id a12-v6mr28907239pll.310.1537261647852; Tue, 18 Sep 2018 02:07:27 -0700 (PDT) Received: from localhost ([110.70.59.176]) by smtp.gmail.com with ESMTPSA id y64-v6sm18979403pgd.65.2018.09.18.02.07.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Sep 2018 02:07:26 -0700 (PDT) Date: Tue, 18 Sep 2018 18:07:22 +0900 From: Sergey Senozhatsky To: Guenter Roeck Cc: David Howells , viro@zeniv.linux.org.uk, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt Subject: Re: [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context [ver #11] Message-ID: <20180918090722.GA463@jagdpanzerIV> References: <20180911220743.GA13208@roeck-us.net> <20180911174641.GA15149@roeck-us.net> <153313703562.13253.5766498657900728120.stgit@warthog.procyon.org.uk> <153313714181.13253.304098108512966976.stgit@warthog.procyon.org.uk> <27113.1536702746@warthog.procyon.org.uk> <32382.1536707855@warthog.procyon.org.uk> <20180911235403.GA10107@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180911235403.GA10107@roeck-us.net> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On (09/11/18 16:54), Guenter Roeck wrote: > On Wed, Sep 12, 2018 at 12:17:35AM +0100, David Howells wrote: > > Guenter Roeck wrote: > > > > > [ 8.507672] RIP: 0010:reconfigure_super+0x47/0x210 > > > > Can you tell me the file and line this corresponds to? > > > I don't know, but some debugging shows that fc->ops == NULL. This NULL derefs linux-next. Emergency (sysrq remount/reboot): emergency_remount() do_emergency_remount() do_emergency_remount_callback() reconfigure_super() At fc->ops dereference: 981 if (fc->ops->reconfigure) { ^^^^^^^^^ 982 retval = fc->ops->reconfigure(fc); 983 if (retval == 0) { 984 security_sb_reconfigure(fc); So the check either better be if (fc->ops && fc->ops->reconfigure) Or, we need to set ->ops properly. But I'm not sure if invoking ->init_fs_context() from emergency-reboot path is going to work well all the time. --- fs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/super.c b/fs/super.c index efb0567c8389..e2e03c47c817 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1017,6 +1017,7 @@ int reconfigure_super(struct fs_context *fc) static void do_emergency_remount_callback(struct super_block *sb) { struct fs_context fc = { + .ops = &legacy_fs_context_ops, .purpose = FS_CONTEXT_FOR_EMERGENCY_RO, .fs_type = sb->s_type, .root = sb->s_root, --- -ss