Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4999035imm; Tue, 18 Sep 2018 02:41:21 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZRnOzvFaaMYKuXiGXY8txaxq4S/6YALHq6laeuAyXMIZNuyNz6RtHAvkmMCJwpXDWJ/9FC X-Received: by 2002:a63:bc0a:: with SMTP id q10-v6mr26893416pge.60.1537263681077; Tue, 18 Sep 2018 02:41:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537263681; cv=none; d=google.com; s=arc-20160816; b=uVUSw+J/fKUBWkDZ37FRq4fDXEpg++aVePuhQYKZVTel+HD4rXwTKTTRrdDvOwKmdi xVjaXSXKJk3SaiIaflTcwOEJ/QGRQCARCz9Ao9P10yGYHYZL1/YYZUVXpPo5kr7asC22 fGsqYQUhBP55JIEx/N3KRHbbfDqEAtMS03esGfTZBY0cAJQpohGBO7bMLbgqTdV8BrSo HbKi822+zZChRUyQlkUPrYFg+FgUweDu5d+FkB9mBzWxfkuJXYZ+FIatcxKvmltCD1fK FyMdNPMaxL6fr2WgOcNnCB2VE5ox5/FQEqne8fH924dIRWSc9jWISWpEo8bCpHHvmMwK J0Ew== 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=/VbvpOHjrehBMtZm6KUAslq27yOK+2BZYUex61xRcLQ=; b=NGaV5jjrRbfsqCbtAbrn3SQ6L26gk0iBdFn+D4aL4w2mQmdvKuhc+1IObnWXZOgOvl VNagh0rB9QYaRGo7cg9SAwb6BvzujemdOH9xn+pJ7/CzWhWRWKEz+3TXiRJNMcWL3n/A l6M8RuWsy8C8/w8q7jyu6cWAhQmSJWw+s4hyaNngE5/KhorlWYkNdyg1V9v+VXUWK0ry r7jNkHOSUg8/xrGwnJHkQ/rrCpvOMM+Oe1c2iXmAdhpVMmeXQ8juzF3MTmCc9wim7dr4 FGdQp/S05QA4QhA/fxFvHRTdcrf6wQ0EaK7toJUfZB21oKRjaQ5SCVBsGXurVvTEpQUT FvlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dYElH5xu; 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 k11-v6si18175890pgi.328.2018.09.18.02.41.06; Tue, 18 Sep 2018 02:41:21 -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=dYElH5xu; 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 S1729673AbeIRPMr (ORCPT + 99 others); Tue, 18 Sep 2018 11:12:47 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45540 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729152AbeIRPMr (ORCPT ); Tue, 18 Sep 2018 11:12:47 -0400 Received: by mail-pf1-f196.google.com with SMTP id i26-v6so732512pfo.12; Tue, 18 Sep 2018 02:40:59 -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=/VbvpOHjrehBMtZm6KUAslq27yOK+2BZYUex61xRcLQ=; b=dYElH5xuZPNxi7QC2nWwm7xAwDmqZtX4eKMTG26urJjC92A8Haq284pYEmAF1HT/6k D5E8OrLnNjpVdk0Xzcfjq6MDxGlr7QqzAMcmJ9QDHE2LsbKtP2KDRZVtjqpadoqotziK 07oCSwiDjIoDK3YZ3uOEhM6UYnVmrQS3oOh5h3Iffbapv9APjLOorW4WHA6Rco6KOOjT SJ2l+lUFyELFKeIyKbRuavp3ILlU5iPY6edvR/WHF28onQ27AI5MDxaKPUHAaWQHubBB aygdqwsAqqn3cqKqOxOMiQFXpr4djDRzbSjr6WuBnztCXHK6VxugWvEWSStcN6hereY5 1M5w== 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=/VbvpOHjrehBMtZm6KUAslq27yOK+2BZYUex61xRcLQ=; b=rxk8g01MPsml59ILmbmp9VuwmRcZ0zWO4aMhCXpTrMEOSv+GckvwQ8wwIMbAHOjQPb yPfUkNZHf3uqaOMjLuhChVg5drYraXY8fUYamdVpXeeiW+6Imp1DNgrq3GIgi2QuYdWO SJyXT5qz7Keue7CwXEu/yX1zF6nvm51N7puRCWab8UF/l3rzSdYxyXXfRXMibkVHkq7L BX3hEoRsgvO+/YKkoQkqQHJFlmFPJEtcUJYWkEHHIVIWNT8F1abGyk91Ar1T75kfAhm3 DuEzPOlMKTZkRmNcuoS2Kt77XJZ+vi4Tjpnl60xVVSbZppGrbsZo/FUl4Og+s/5+XnYa QoCg== X-Gm-Message-State: APzg51BiphoZKrgCNnyciD+IurxiKKpzZyb3OoYaX6Ywmu259J6DQ9f/ jAm9UrzCugx5/srCQhus65g= X-Received: by 2002:a63:d244:: with SMTP id t4-v6mr26575429pgi.335.1537263658790; Tue, 18 Sep 2018 02:40:58 -0700 (PDT) Received: from localhost ([110.70.59.176]) by smtp.gmail.com with ESMTPSA id v20-v6sm36721623pfk.12.2018.09.18.02.40.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Sep 2018 02:40:57 -0700 (PDT) Date: Tue, 18 Sep 2018 18:40:53 +0900 From: Sergey Senozhatsky To: David Howells Cc: Guenter Roeck , viro@zeniv.linux.org.uk, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Steven Rostedt , Sergey Senozhatsky Subject: Re: [PATCH 14/33] vfs: Implement a filesystem superblock creation/configuration context [ver #11] Message-ID: <20180918094053.GA417@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> <20180918090722.GA463@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918090722.GA463@jagdpanzerIV> 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 On (09/18/18 18:07), Sergey Senozhatsky wrote: > 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) I guess I was pretty lucky to have leading zeroes in that fc. David, do you want to add a macro which would make `struct fs_context fc' misuse less possible? There are 3 users right now who don't use vfs_new_fs_context(), and none of them appear to properly set all of `struct fs_context fc' members. This can cause problems in the future, right? fs/namespace.c: struct fs_context fc = { fs/super.c: struct fs_context fc = { fs/super.c: struct fs_context fc = { -ss