Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp743954lqs; Fri, 14 Jun 2024 04:42:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVA4XwP57qs++4CIrtZzASCO917lFofcVWuR0nPNY+lMezL1p+NXa+i3ObTpuy1MbGydld0/+jCAuCNS3pE3KGEEIFU1pzQWbnRnX5sBg== X-Google-Smtp-Source: AGHT+IFUfTAFPYFai7kazPXnJ/8CtdNDKJpgTId/+DVO4eM/ItV3giz9IPy6ZQ8LkorDYY8SiaCj X-Received: by 2002:a19:690b:0:b0:52c:8304:db31 with SMTP id 2adb3069b0e04-52ca6e67c17mr1948630e87.27.1718365354875; Fri, 14 Jun 2024 04:42:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718365354; cv=pass; d=google.com; s=arc-20160816; b=beteH/4lFQvGxJaSbYF94/y/slY9H4zVeimJKfyzOTIECuujxz5lna/CwNcIjaDNKQ qdHMdVUSfItTQPbOyK+KhJdXO3jRzjEw7zpX2KiF3ILf2VR64fnD1hW7/aKoOXH/GkXm lsevlKS6WfROlRN+UaNB0mQVNEl34l4Q6gLlvmjjVEwCDWBfpxgtrEgfr3ah2TfPqg+d 2HV3B6yI7p4r95lAd2u7k+dOibAG/0Zz5SBp333ZBM0sQgOAobCh4t3jTFhJIgMhsug0 uCN9ZLC12QXR01DvWh3tjZ6Fn58xMsiN3H6EQQwOywXHmxBtvfdqEFUuaExfKnnRT0G6 dAkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=W0/sXJT6lPqbv4UCTWPNE4BT0l9jlQJV7yyOXYUW6q4=; fh=saDFzb8XH/fsyCAPCgnXHQYabHFgY8pQa56eeXK7xBY=; b=I04lbb4d3JGsCzAfZHyDs2J8QPqILcMhxoZRJCN5VJBUgdHmMbsMVIhyA17Z8E0JBY jyqk8UCMmrH9ji3A+CNmaVxrNA+MYBcomXoOhLE9J9gZuYqo52RCxeTlZpXCUiBbRALh gtx0kyUcFRoXG1JLttV5Dp22pLlV5lCS4zZMsIheizhcD6xw7JKA6XhjgOy7GDpBIc2b VGyLY4l52fC6So0cobhgStPYlRtnLhk2e4xqs5Xre3Ybph1iFQs0TMjKvDpIg/7OFPEM XvVArNXMJWhfZUFicxpODfx1+sJDujTXKZ8FFy1gWSeY8D503d2jmnytAqyEn4VMMfq7 +t6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-214843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214843-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f603eb626si95747966b.522.2024.06.14.04.42.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 04:42:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-214843-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214843-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8F5131F28391 for ; Fri, 14 Jun 2024 11:42:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63901195F3A; Fri, 14 Jun 2024 11:42:23 +0000 (UTC) Received: from smtp134-31.sina.com.cn (smtp134-31.sina.com.cn [180.149.134.31]) (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 79FF8190477 for ; Fri, 14 Jun 2024 11:42:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.31 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718365342; cv=none; b=n1TwlqYSBBLdQPGxBWpoqQSyc7Cku5HTOWR9DcYZpy0jL9IgY6oe6Kk5DybbcCszdVW2ud9RQRxBsfiKzmpdCRmwlKoVi05WEK1BRsFlSYB09uO3sIgmHJhnfvjIAypVRyJ4evMx8nE1W459FyGesZPZmkZGiaEvRxv6+DzXKBQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718365342; c=relaxed/simple; bh=0UTkU+vYGKrKshHTiLb2eb8RpUdyMf0Z4mUfmam9F9c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XreBlk9oOQZ2Var6dzZKxz3EjsGrrl9Y7yKN6NmO/T2+I+aHIWi/8t4hv2GXsjBDbXk633oQ48McjEoTeL09mVVHOl0Uvk460Izygv7DLpsoaHeNLlKHFZsP6zJZaQSwFMXMDsrhfM5UxSfY0FPiQeNcJbwlIlBqp/g0meJq85I= 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=180.149.134.31 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.118.70.97]) by sina.com (10.185.250.21) with ESMTP id 666C2A5000007E81; Fri, 14 Jun 2024 19:32:34 +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: 2455453408535 X-SMAIL-UIID: FE2C5B6C01774354B9191BDA55061F6F-20240614-193234-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [nilfs?] [mm?] KASAN: slab-use-after-free Read in lru_add_fn Date: Fri, 14 Jun 2024 19:32:24 +0800 Message-Id: <20240614113224.590-1-hdanton@sina.com> In-Reply-To: <000000000000cae276061aa12d5e@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 Tue, 11 Jun 2024 11:10:20 -0700 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 83a7eefedc9b Linux 6.10-rc3 > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17c645e2980000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 83a7eefedc9b --- x/mm/truncate.c +++ y/mm/truncate.c @@ -418,6 +418,9 @@ void truncate_inode_pages_range(struct a truncate_folio_batch_exceptionals(mapping, &fbatch, indices); folio_batch_release(&fbatch); } + + if (mapping_exiting(mapping)) + lru_add_drain_all(); } EXPORT_SYMBOL(truncate_inode_pages_range); --