From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D4A33B6367 for ; Mon, 10 Aug 2026 23:23:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786404227; cv=none; b=pXm+ZLfu1a4MFBJ2ljyFOD1Ci9AjUE0DKoXx1J5WK0eY7g7QTwNy3ScYbkFE5TM41Ux9OHJS4vB57cwoLGcMPnArC92eMxMgS7w4LLBR2kKPwKcNIMnfEYIPDqFIqXPDI64SFVhWenw5caveBCzEn+91UoK5DO47Snp0USJz+5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786404227; c=relaxed/simple; bh=qumYJBErYHBnlknTR2S5jtbwLJj7iWgwgq6ztFcjW+Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PZVuTVX2OnUfVj0/ICu6lXUryoyqKwWGEO45Ob6quVTPf0xN4+4TfHm0H67tQi3iyJ1K784SYD9XYhWoFMcnkUaspksv8qvJrWcjexFYh5FjSSP6klsdb8eI42awwaFahxao0tnECdqcXbFi/X3DoKTdomLxQpChhRBtLldZO8A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=T9FzsM+n; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=IbHDCQpq; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="T9FzsM+n"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="IbHDCQpq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1786404224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dvXcdVrrcYWC7Qoe02Nyc3BrgNoZ7f3QNoGWtGrCDEM=; b=T9FzsM+npCtnqztFbV4iw4nmbbFbBVaV1aQVyip7jHR4irVtGROjlSIkA/Tu14cq5My06k Ji8RMo8F2R8dHFAHi3zVAQsCQMZF3W+G7daz9fr1CsTcFRBRPiH1E5jrwOaJe7X7+1Ro34 Np/JdpRr9o2O3hj5PaVwHb/a9Z/+GSo= Received: from mail-oa1-f70.google.com (mail-oa1-f70.google.com [209.85.160.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-156-4x5fwp_YMO2Yqqvs6sdATg-1; Mon, 10 Aug 2026 19:23:40 -0400 X-MC-Unique: 4x5fwp_YMO2Yqqvs6sdATg-1 X-Mimecast-MFC-AGG-ID: 4x5fwp_YMO2Yqqvs6sdATg_1786404219 Received: by mail-oa1-f70.google.com with SMTP id 586e51a60fabf-448bb8bd2efso3649455fac.0 for ; Mon, 10 Aug 2026 16:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1786404219; x=1787009019; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=dvXcdVrrcYWC7Qoe02Nyc3BrgNoZ7f3QNoGWtGrCDEM=; b=IbHDCQpq9jfPxrftBbR7J7q38VTX2dRKz+Jf3WN2ywEIibD5JRSJAdn0Kw52xVePmv abzI/IyeSy35jsg3Uw3H8lLSg4E4IAS+FrmHD2b7+H3KJq11PYGLOlpIpPvvxXCTUdVW 38a3maryGaDwT1lvgUgqZ2uApqZrQblM4rTgrXIL8jNrr1O9o+n14/RjAxoOFxbpnOJG xcsIg6dUlImMoxj+lqCSw5HceukptHDb1e9xzOcB6n2cRa0N/Gl2nl2NEW4eLKDtc/3A KILgFuShFZrdxXezVeXz2wl2KeY7YmWSKnKt7FREHcJ0mY1ilL10NgozqxlzvR17A6Zo 4bHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786404219; x=1787009019; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=dvXcdVrrcYWC7Qoe02Nyc3BrgNoZ7f3QNoGWtGrCDEM=; b=h2pdDHs0O5a/+vj5/zXtQCoKJbLnKdJeTsEaW5M5QXW5s/N+As3C0Ac2tX1PtrCQUH n2GZeDxDztjdz9WtGTRfMoM7Z6S/A7tkhFb9x0j0Ovo1NzeKez5lFO3XNmaiu9FJ6w2E Z2baxqc0ZV/1kn5dIG1SaV4SFdhONeH6LtCx8ohlzT/GiJy31mDrAqjkPadAddviS4Cs tUGs3UAAeDGRvPHvyUeQClzczDXFIjWZ5j/jCwYNgKD8DUitm5/j9/ihmq6cjhtH3BJ6 sz/k4Jje1A/6xSbm+yevQLY/7o5dvZyonWZWzKDh4Cz9vsPeMUMM3eg9+suBisKWXzQE RLcQ== X-Forwarded-Encrypted: i=1; AHgh+RoGGFsX6oS/H1Ewdb5pGoKPYhFdWC1lcXZ0S4ZUqw0c1iLFBw/PyyV2I6D5p2ODv+cUP67oDp5IgTrhifw=@vger.kernel.org X-Gm-Message-State: AOJu0YzRGr02wyinCF+jLKt/arupn7u4ZZJRLnPX9k3F4Uy2uk+l1Vy7 HZw1gf1xmIHMc1OGjtzUwBBvVDNEQsere6X9YGuAxu+9SIB/+K0tPlHlk0jrYlLU86NU6hk9k8Y zCuuEU3WMbytebbLAftpikQhfQpfQeuzrqIvCjl7gpUDc0HtWfxb6n5BKYqnQ1HZp0g== X-Gm-Gg: AR+sD13x+IBSmCtxUH+THey2WjhlMeYuQ2veuekHneC05ISQb+tejpMQJm9EbNQMDRa PGXDQdfKTtKFk7v7rZiBpKkyopwV7lFfO3GvoH9IxLwnI5htgtM7i606x7A8WdACD8sodys7cPL qd4Ux0A4SAWn3tjaJos/uATr3g/omIqTMFcEIoMCHC/EK23u0Fz8hEOVWkphQENnFYzJdhllPKw f1bDFqhFddGPxRM122ySlQS29PSdBVOD5EPkDme1p8MD2JeD3V1BI/YvMtEhjN9steFlKZNx3Ud nBMEt7mjkv1WQATTtZkB58/hG8xLthkYtxlZdpni4N4sveOislt0JlwGaAC9jdYmxaf5zujtBao 8CTnMOGOSQmRxxfe8NhU0Dz+J0FZMfCZ0o6gtnP0z X-Received: by 2002:a05:6820:168f:b0:6ae:9b39:68d1 with SMTP id 006d021491bc7-6b0420d5753mr12437004eaf.23.1786404219432; Mon, 10 Aug 2026 16:23:39 -0700 (PDT) X-Received: by 2002:a05:6820:168f:b0:6ae:9b39:68d1 with SMTP id 006d021491bc7-6b0420d5753mr12436982eaf.23.1786404219028; Mon, 10 Aug 2026 16:23:39 -0700 (PDT) Received: from [10.0.0.187] (97-127-68-83.mpls.qwest.net. [97.127.68.83]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-459f19fd31csm9718793fac.1.2026.08.10.16.23.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Aug 2026 16:23:38 -0700 (PDT) Message-ID: <8fba77ff-8b67-45fa-969e-4009cfe59928@redhat.com> Date: Mon, 10 Aug 2026 18:23:36 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] devtmpfs: restore mount option reconfiguration on get_tree To: Simon Liebold , Greg Kroah-Hartman , "Rafael J . Wysocki" , Danilo Krummrich , Christian Brauner , driver-core@lists.linux.dev, linux-kernel@vger.kernel.org, Alexander Viro Cc: stable@vger.kernel.org References: <20260810083438.764684-1-simonlie@amazon.de> Content-Language: en-US From: Eric Sandeen In-Reply-To: <20260810083438.764684-1-simonlie@amazon.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 8/10/26 3:34 AM, Simon Liebold wrote: > Commit cb0e0a8bf4e1 ("devtmpfs: replace ->mount with ->get_tree in > public instance") converted devtmpfs to the new mount API but dropped > the reconfigure_single() call that reapplied mount options. > > This causes userspace-requested mount options to be silently ignored. hohum, I'm not sure how I managed to re-break that - I had cc'd neilb precisely because I knew he had fixed a regression here before, so it must have been on my mind. Looking back to an IRC conversation with viro I think I diverged from his recommendation though I'm not sure why. I had credited viro in my changelog, but looking back I don't think I faithfully implemented what he had suggested. I'd like to revisit that and maybe propose a different solution to fixing this. (One concern is approach is that I think it is now passing an fc which was not "for_reconfigure" to reconfigure, for starters, but that's on me I think for setting it up this way ...) Give me a day or so to try to page all this back in again? And sorry for breaking it. :( Thanks, -Eric > To reproduce, boot a system where systemd mounts /dev with a size > option (e.g. size=4m), then check the actual size: > > findmnt -n -o SIZE --bytes /dev > > On an affected kernel this returns ~50% of RAM instead of the > requested size. > > Fix by calling fc->ops->reconfigure() after obtaining the superblock > reference in devtmpfs_get_tree(). > > Fixes: cb0e0a8bf4e1 ("devtmpfs: replace ->mount with ->get_tree in public instance") > Cc: stable@vger.kernel.org > Signed-off-by: Simon Liebold > --- > drivers/base/devtmpfs.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c > index b1c4ceb65026e..44683dde04377 100644 > --- a/drivers/base/devtmpfs.c > +++ b/drivers/base/devtmpfs.c > @@ -72,14 +72,25 @@ static struct file_system_type internal_fs_type = { > .kill_sb = kill_anon_super, > }; > > -/* Simply take a ref on the existing mount */ > +/* Take a ref on the existing mount and reconfigure to apply mount options. */ > static int devtmpfs_get_tree(struct fs_context *fc) > { > struct super_block *sb = mnt->mnt_sb; > + int err; > > atomic_inc(&sb->s_active); > down_write(&sb->s_umount); > fc->root = dget(sb->s_root); > + > + if (fc->ops->reconfigure) { > + err = fc->ops->reconfigure(fc); > + if (err) { > + dput(fc->root); > + fc->root = NULL; > + deactivate_locked_super(sb); > + return err; > + } > + } > return 0; > } > > > base-commit: f5098b6bae761e346ebcd9da7f95622c04733cff