From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail78-36.sinamail.sina.com.cn (mail78-36.sinamail.sina.com.cn [219.142.78.36]) (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 CA7AA219EB for ; Sun, 29 Dec 2024 06:42:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=219.142.78.36 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735454540; cv=none; b=SLNIlQJgSy9bJiEuxkXMIT5TBSLg8bbpYPLLTPseTfGX8DwRBhdH/QVwNNQvMUNegK4f/6zCLXGVrYbrNrc7JuYKjI8f6M1z02ruaWklUxv82btylCa5bD1bxvIY4YtlXnipnQDYjWGVRe5WQBPUClSqdEg9aMGYJmSYLg4ZOSE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735454540; c=relaxed/simple; bh=Ppq8NAof8z69i9DrdTp5Y55TfbK+dUXPhwY+/fGmNCU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YtwrQK5OPjKmS45CJ//WaCTkJcAw1tJqKgdW/jFNytNBNGXdY5W9P/rkmtU6VVIUaDLKtsWH2vsA14Tr07B2PRuNYV03ZNnzSFErTKzFGDsG8kfpjXNPgOz9qhgePZehda7ta9BmnUQKwQsUuXPbzfbF7hg0ZPf94KcRtvLXd4w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com; spf=pass smtp.mailfrom=sina.com; arc=none smtp.client-ip=219.142.78.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.51.102]) by sina.com (10.185.250.24) with ESMTP id 6770EF410000666C; Sun, 29 Dec 2024 14:42:11 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 72154510748457 X-SMAIL-UIID: 77BB692778964B638A554FC604A502B8-20241229-144211-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [mm?] WARNING in __folio_rmap_sanity_checks (2) Date: Sun, 29 Dec 2024 14:42:10 +0800 Message-ID: <20241229064212.638-1-hdanton@sina.com> In-Reply-To: <676f84f5.050a0220.2f3838.0493.GAE@google.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Fri, 27 Dec 2024 20:56:21 -0800 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 8155b4ef3466 Add linux-next specific files for 20241220 > git tree: linux-next > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1652fadf980000 #syz test --- x/mm/filemap.c +++ y/mm/filemap.c @@ -3636,6 +3636,7 @@ static vm_fault_t filemap_map_folio_rang continue; skip: if (count) { + VM_WARN_ON_FOLIO(page_folio(page) != folio, folio); set_pte_range(vmf, folio, page, count, addr); *rss += count; folio_ref_add(folio, count); @@ -3739,7 +3740,7 @@ vm_fault_t filemap_map_pages(struct vm_f vmf->pte += xas.xa_index - last_pgoff; last_pgoff = xas.xa_index; end = folio_next_index(folio) - 1; - nr_pages = min(end, end_pgoff) - xas.xa_index + 1; + nr_pages = min(end, end_pgoff) - xas.xa_index; if (!folio_test_large(folio)) ret |= filemap_map_order0_folio(vmf, --