From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2323A30C35F; Mon, 13 Apr 2026 05:37:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776058675; cv=none; b=VrthSnC0aKYhCgVEZbRKozfnX3k9sHpZ3DmVaAsC5kBizcYj7EZWlfZUtw5YN/98GzaerVlMPUTputAHKxPkGTJm7de0Tf/7I+H/1Eeh6d2IwY4TP0p5ITdOjtMisoOo8qjR1szBAs44mvMEnGmsA2sERxMoJypt0UMD/o0vvNI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776058675; c=relaxed/simple; bh=c9xdq9i+G0zulG6323Mzb3s5ZrM924e/Sx6+1KNbAKI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=g4GsPoe+PNPCFy1xXwwsK0VDQQl9ADsbrY8Jr0OGwBNn2oIxW4gVyGIqpxx02/cGnaHGOFrFww3m2tODOF6AEIhquGEac84vxJ3bZW9+YYNbItX1tRWlFbRzS6hfsT2Jq9gt2vBtf8qrW0SiHVthSUNHNegiQU6qnjaqNcd5/JA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CYAidPKq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CYAidPKq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D756C116C6; Mon, 13 Apr 2026 05:37:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776058674; bh=c9xdq9i+G0zulG6323Mzb3s5ZrM924e/Sx6+1KNbAKI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CYAidPKqcLB7DggtGonSr6XqmwbLLK9P1gNbNHNBTA3mq0vH1b50IIBl5v1zbXXps GHHshy2hpn9wUga0epb1dJOO1e0BFndrNx4clnhZZOn7zUnMfzMx6U35BjPalsVv13 qe/HFMZY82osynewGvSj46/ZbqIGUSh+xDIhvSd+QTqUHgM4YzoDv1x2RvlqnEOdRo 7wWfyVwal3hQDzOC2w+RlZOAL/OCU5glHRpaDPGFhkr7WJsPEXrSyKatLqSv2fukC/ Y5fVO5ybbUpow/LSffY8kBaDZD2Hl75evpdO2SqpzWa/lnBVl0wUwWPho8OkumYSk0 wrCdvcELxpHgA== Date: Mon, 13 Apr 2026 06:37:41 +0100 From: Lorenzo Stoakes To: Shinichiro Kawasaki Cc: Andrew Morton , Jonathan Corbet , Clemens Ladisch , Arnd Bergmann , Greg Kroah-Hartman , "K . Y . Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Bodo Stroesser , "Martin K . Petersen" , David Howells , Marc Dionne , Alexander Viro , Christian Brauner , Jan Kara , David Hildenbrand , "Liam R . Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , Pedro Falcato , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-mtd@lists.infradead.org" , "linux-staging@lists.linux.dev" , "linux-scsi@vger.kernel.org" , "target-devel@vger.kernel.org" , "linux-afs@lists.infradead.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , Ryan Roberts Subject: Re: [PATCH v4 19/21] uio: replace deprecated mmap hook with mmap_prepare in uio_info Message-ID: References: <157583e4477705b496896c7acd4ac88a937b8fa6.1774045440.git.ljs@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Apr 13, 2026 at 05:14:08AM +0000, Shinichiro Kawasaki wrote: > On Mar 20, 2026 / 22:39, Lorenzo Stoakes (Oracle) wrote: > > The f_op->mmap interface is deprecated, so update uio_info to use its > > successor, mmap_prepare. > > > > Therefore, replace the uio_info->mmap hook with a new > > uio_info->mmap_prepare hook, and update its one user, target_core_user, > > to both specify this new mmap_prepare hook and also to use the new > > vm_ops->mapped() hook to continue to maintain a correct udev->kref > > refcount. > > > > Then update uio_mmap() to utilise the mmap_prepare compatibility layer to > > invoke this callback from the uio mmap invocation. > > > > Signed-off-by: Lorenzo Stoakes (Oracle) > > Hello Lorenzo, since two weeks ago, I observe a failure during my kernel test > set targeting Linux for-next branch. On failure, kernel reported a WARN at > __vma_check_mmap_hook [1]. I bisected and found that this patch is the trigger. > Here I share my observations of the failure. Actions or advices for fix will be > appreciated. Ugh yeah thanks, this actually needs to account for use of compatibility layer, so probably we shouldn't even assert this as that isn't easily detectable. I'll send a hotfix for this that can be bundled up with 7.1 patches. Cheers, Lorenzo