Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1216435lqo; Thu, 9 May 2024 07:51:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVNlJlbEJ8ezEolG7DgVd2YWY85vAgaJ8DgbX+GmhXKE4SasCyydXAQiQb48W6UanmZxDx29q24nSuaQhjaVZZrq/1Sc5kWTtNGFsvytQ== X-Google-Smtp-Source: AGHT+IFeE2ph6KPeXE23j1zPus5KLBnwfghjXgDfAl3723My9/4bBkmAoEgml/MO5q5VAD8TwkBU X-Received: by 2002:a05:6512:2110:b0:520:36ea:9375 with SMTP id 2adb3069b0e04-5217cd4913amr4551909e87.43.1715266306042; Thu, 09 May 2024 07:51:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715266306; cv=pass; d=google.com; s=arc-20160816; b=R2wvXWe6nBPRMLZlp70dKt9GqPbb9BHOxsoBl1s8L6BFt+L88PW3GZwdNkA0JPQq4R rkiskcWaU4woyb2xIBifpJtr7bl5awUZmrlp0GOuNSNgTmILngxVEKQAk8ZoXRLatMVA hObslwZey7KjGJCZ3WnVbXoEjnvxPwv/mHO8YEB50csmPc+Ny2Lt/0fJnNmqcZrime55 +w3dLw3s1EePi8xuJSWguZ37+1q6V6Tsvj5GQrmTHpr27sh37RnswWPqAQoQTETUCwoK MGOfgljpd9mp59wCiCVAWaabF1OL9KdmgRRFvqi6QXjykxQfIuiaJZdY7ppAb/+4IuL4 nvrw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2rkEFPmAsmSs8bT9V5fpjO3Bmf+kooXnTHTcPwtoDyU=; fh=XS8A2Vsnb4mnQ5N9jwlZ7+Hqv8jx5k9kfAxhB76Usrk=; b=MsNfvcOB7FVs6l80LkSAD80I4ml0V3AdiColiyglxrh732PlbBvlMOrtv9ewWqKg8f 8yvbdAK+K750EhL6ExuClpHIhMHHw4NIjZ1AkxPkSdKULKFXmeXlxr1Q1MiNpInVcta/ aol1QEXaq0yuFAF0/hLOC18CL+j8RW1xEe7nPdYv3Ihcf08hqx8Bc8zVqLWWnEf5/7rC Qt3hRNAYrbvBE/8N4my1zUQxcsijLik9wjeoMkecKP8DVN8u800aixeArWvFgg7+TwmN NDon/P4A8KXFSdRvoDoOauXLkSyxgL1VbzkEZghu1A1hIoLMrVaaB+vhpKP7umpJ2axx khXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=dqCnAh1B; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-ext4+bounces-2420-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2420-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu 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-a5a17c2be93si88100466b.928.2024.05.09.07.51.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 07:51:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2420-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; dkim=pass header.i=@mit.edu header.s=outgoing header.b=dqCnAh1B; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-ext4+bounces-2420-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2420-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu 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 BB2E61F2134D for ; Thu, 9 May 2024 14:51:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CED412FF9B; Thu, 9 May 2024 14:51:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="dqCnAh1B" X-Original-To: linux-ext4@vger.kernel.org Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 E771637719 for ; Thu, 9 May 2024 14:51:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715266299; cv=none; b=F37hFiTaSUTUzNGqqyOdWwtrEYBrNdvM5D9L25KNrpewZvRt5kelHVok+d8bN/WNBL4Bo8COKI2Md/lBcv9NOP98fcUPNpT7iMu7n6VLjsEVdqQNXxhC6lD55pMLldG1rGmqn2+JLDdcQpos3/GitiMYtsE+K08ojv5a3l3AlUI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715266299; c=relaxed/simple; bh=ROuxEhTpbRtsfE1hnzOUvo+e32DRlMNGBViWysD4b0A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AN9k9n5n5edCPpxdDTOmLsI88un6ZXvntLEiYuO4kxHFV5kaGmPI45btT9yUuMrc3az6kiQrEasKGZWzbgXW5kKVGKI2PP7BBkOn6mgiZ8lXv/u+J/TsPtQ1BVnr343vES2P6q9xUV0MlO7nMzdfiMQ2rgdLnTOLZUugN0L2gUs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b=dqCnAh1B; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from cwcc.thunk.org (pool-173-48-113-2.bstnma.fios.verizon.net [173.48.113.2]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 449EpO0m025071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 9 May 2024 10:51:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1715266288; bh=2rkEFPmAsmSs8bT9V5fpjO3Bmf+kooXnTHTcPwtoDyU=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=dqCnAh1BbLC4UUZqacrs2RhKEUbD1BMQI787FnPh0381EMB0HKLqo/8ChzOndcjFF Ff7f6DQ79rxj/usVfMc3B0mk0FHLqezX4AW8zcALNEN2n5Gaj6clKYcoFkR21J+vhk +PH6O+XX5Wp5CP+pbN+sqgVYSJtPWGmKC26Ecu2dE/QTZimw3AdYNVNBhGyfS1qfZE QYxDkG4Ey+vMUYe24LNge+fRZ/QyuOuPlMmeEibZgdrq91HigjePWCflbW6LCU/7vJ Eq3ehcZsTsF0EUMZ2cxGxWKOwXD7b6N1Y0X9FZEwQ4E2df02Z8zx8lkjbVkCAO0jc9 rQY8thg16H7QQ== Received: by cwcc.thunk.org (Postfix, from userid 15806) id A812215C026D; Thu, 09 May 2024 10:51:24 -0400 (EDT) Date: Thu, 9 May 2024 10:51:24 -0400 From: "Theodore Ts'o" To: Mikhail Ukhin Cc: stable@vger.kernel.org, Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Michail Ivanov , Pavel Koshutin , lvc-project@linuxtesting.org, Ritesh Harjani , Artem Sadovnikov Subject: Re: [PATCH v2] ext4: fix i_data_sem unlock order in ext4_ind_migrate() Message-ID: <20240509145124.GH3620298@mit.edu> References: <20240405210803.9152-1-mish.uxin2012@yandex.ru> Precedence: bulk X-Mailing-List: linux-ext4@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: <20240405210803.9152-1-mish.uxin2012@yandex.ru> On Sat, Apr 06, 2024 at 12:08:03AM +0300, Mikhail Ukhin wrote: > Fuzzing reports a possible deadlock in jbd2_log_wait_commit. > > The problem occurs in ext4_ind_migrate due to an incorrect order of > unlocking of the journal and write semaphores - the order of unlocking > must be the reverse of the order of locking. > > Found by Linux Verification Center (linuxtesting.org) with syzkaller. > > Reviewed-by: Ritesh Harjani (IBM) > Signed-off-by: Artem Sadovnikov > Signed-off-by: Mikhail Ukhin Thanks. This has been addressed by commit 00d873c17e29 ("ext4: avoid deadlock in fs reclaim with page writeback"), with the same code change. - Ted