Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp716815lqs; Fri, 14 Jun 2024 03:48:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXovcC1VceYIz5aybZxBL5d5MgVu32r0YagkNXXSp0QDJKmnTdNoKAPBMCxWH34sqJwcb96mDcIy3Qgju8cVykmdbMsIxGMPldOSJXQuQ== X-Google-Smtp-Source: AGHT+IFlebdbm2wDbJqT0N7et3pm5DOttCMFk/25eC8R3AQYnGrmdAXGLm0zpP9PqPpsuEOxOlIi X-Received: by 2002:a17:906:c243:b0:a6f:1839:ed48 with SMTP id a640c23a62f3a-a6f60de24c9mr215814466b.66.1718362133881; Fri, 14 Jun 2024 03:48:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718362133; cv=pass; d=google.com; s=arc-20160816; b=09WMmmzRdg7J/llBofuqtpXhMOkO2USbCpoCCJZiFSOmhUGjF+7kzDy5plTalITlUA EFHTaRsKVweq0IgPmR9wSE9govSdN3rshbsHIXge4HsXV6u4lU/qEe/uQHINrxxkEu9e yO81mP2ps8Z5ogbke2Eh2gJCcrhOy7imoCwKjuSmMybZLyC0bwurIN3sUE4o2N9fE2IV 8Nc5502mFINRd8R0REl7eN6YHys7sOW06JQ2OTZjFtbfZvrToUNSlwz0uWbVFpPBRCbO +Um+DXoaBOsiZV/qCsVdDNGNok6oIoNU6m7eD5woP8rYCg+XRgiXl5uLQiTAXgrARZFb /g7g== 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=XlNXKJeG+gug2aSLt0L/8b3ygfo1tVL1PGzo6B/WeUY=; fh=saDFzb8XH/fsyCAPCgnXHQYabHFgY8pQa56eeXK7xBY=; b=0phBiJ0kzEpPy8tPHOsGtyoEjAMtiuQ6kRT8T1GhPaUxWWBAAsA8H8fDqkGGRi4T0O bmYaB71sO53zniBhLfra1Y9Tgr0N17nAiLzNh7Iw57CQMHPVOHjlXRFnPgDGKHOphXHm Iel/1j2O/K1hROjOtct6jrvkoL1UnIkrQJzzZ+4pt4dgzh5MyR+W2y3o70BzivX6+3n3 M+hV6VdbEHN1ZARNppQf3Au2NyUACcT7dzH4h/iBIBuadLNUNvgaNIJ0XVD41AKQV1RF I7dcZwVXRl0KtFT2fowjFBlEtvR6CfbiPbXJCU/HEi651kxNGBocD0FBjdkni5cxPwh9 0gbA==; 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-214808-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214808-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56e809e1si162098666b.976.2024.06.14.03.48.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 03:48:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214808-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sina.com); spf=pass (google.com: domain of linux-kernel+bounces-214808-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214808-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 1B7E41F2C1C4 for ; Fri, 14 Jun 2024 10:42:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F18D194A75; Fri, 14 Jun 2024 10:42:10 +0000 (UTC) Received: from smtp134-24.sina.com.cn (smtp134-24.sina.com.cn [180.149.134.24]) (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 4DDCB194AEE for ; Fri, 14 Jun 2024 10:42:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=180.149.134.24 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718361729; cv=none; b=pwnewPooDKBDYOwIHBQWFhVp1bfujlgqJ266beAjWU/z9abZH6kOnomejgzT7Lm0pmw7vueonnSX7OyzGgzd549f+9AB+6fej4aKdb7Mc9ubr7RRnIBwTNlpo3x5EajrfM1Xd024QFpnO0A//81dSiLuT2teOHR81SJ7LPfTHj0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718361729; c=relaxed/simple; bh=PKnXd+/di9YyzsNpFBsAd0Ph6bsexNXvf82Ldz3i33Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VUl3DBt4qKX7BK38NO/yP6eyTnfa7f/tr/tICUiS5cFZF4Na3lYhZGW/rRTolRAynYLQDXKCdd7OpPAnTSosH7U9EsqJ9S7PHDd3V6aST7RUjyIFi11LsdLHbLVqlDUiJ2slYFz589WuzzPZCHYCRLB6pmzIsBDGQIf43TEz88g= 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.24 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 666C1E6D000042B0; Fri, 14 Jun 2024 18:41:52 +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: 2897693408502 X-SMAIL-UIID: 0206CF7C3B4B45C4A296ADE7437F056E-20240614-184152-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 18:41:41 +0800 Message-Id: <20240614104141.537-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 master --- 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); --