Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp214925rdb; Sat, 27 Jan 2024 03:46:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPD2lUbs0+N8ajncFYkddN67D+CzHST/KwNciueWO2VBUDmLdDElqyL44CK8GoAFlkXSLv X-Received: by 2002:a17:906:3047:b0:a35:34c0:e1bd with SMTP id d7-20020a170906304700b00a3534c0e1bdmr777581ejd.67.1706356004102; Sat, 27 Jan 2024 03:46:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706356004; cv=pass; d=google.com; s=arc-20160816; b=rHufXxdfxOl2g0OFa9CZmp0S9eTWXw9G9TZ/Uu4Mm1HMX8puOBHf5Cd6gws+5fFCBA x00KGfnrKgK62VepVglQrP43HfLwBnrV1HN2miP2avW8LiTFXkTUxvYTpY550wBKmmas I63uapxXYSdJU8V4dol6EuIpSZmxr9ZQcTVJKhhlmGAWVI2b2a5N3oi+glYEorBDXKmY kZD6Rj6DJOflpHSbf6Hs2T6784ewBNy8elkQZVprmjjAoVEHsKsIcGa6RH/hFIXEFOAF /cbl8aE60WtzmcEEqzn03oC4HPWwNjZPVCX9T8yZ7xjF0tpyqPWVKQnyV+YPOfVBniUm MwJA== 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=3oq/PF1mx3YehepA45oNYPuEpvGgVkSzqyHJGZQS5TM=; fh=F90BF8ZHGD2Q++JnOF3iNWB6BdOxV2V+uuCj5ImTxS4=; b=B2CRppqsbypNzMFxnycXglRj87aDhCq0xlm2Fy8SQ4qD19WGV1X3h+c8XPA3WEEW/m iqSlTcqV2um/0C82Phm+1G1Vfa3DU2JXcC4rSfzZPohgqXCxEUv7OYKHfzgFcxiF3mfF IZfkdKSAuODJ0iq+6bv6wfkGh7/+TPmQFGO2Bc+2q79RTaDACJ4DyRViq74RBXhsK10+ Iat187E4ob0yWNXoR/VoL5TFY2i25psTPOYlb2/MMClVwldguEnjK+YAT9DqGx4yTa4J gKSa1mIb61iMgfo+hWJ2+XLEpFDsPEyS8zewhwAJCnRySmezgshNmqVwW7YlMbhD/QDx 9G2A== 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-41179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41179-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 os18-20020a170906af7200b00a31867f21a7si1590076ejb.834.2024.01.27.03.46.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 03:46:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41179-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-41179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41179-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 D61D11F22DB4 for ; Sat, 27 Jan 2024 11:46:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C769200DC; Sat, 27 Jan 2024 11:46:35 +0000 (UTC) Received: from mail115-76.sinamail.sina.com.cn (mail115-76.sinamail.sina.com.cn [218.30.115.76]) (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 6B8EF11CA9 for ; Sat, 27 Jan 2024 11:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=218.30.115.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706355995; cv=none; b=c/0IFvsJU00okJWPBjepBzPW7pJUxXsjvXVmxh0V4kl3cdsalBBJLPfqmD6x7iOERCl4BJEpwF7ZRPUJMLi0Nbt4CAKJ6+l6o3w/YOQzGJo7L4RClYo30Tzf0b7g/P1Og3KE3GKwfaQmkJtIP/v6qwMhAoSb3KYMwBMl6CnB7rA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706355995; c=relaxed/simple; bh=p6/PrU8i4vruaCpaw3PnfBcpBDW/+70iWo9XrOwAEyo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Lb05vcwPfW+dweBZKjdd+Ipr9zJHpqnscKdoAO93M0YJeHgwnAsgZn4seh26nDo/+BJqw9xqklyzG5JpUX/0/kg79PK6e/lumjU8wgYr0xHJJnKdb1oFOJFZPoooMFuURmaRsYaOIwlk+NurskWUoR1o2PWS6C1FBi75Y0ctJ4M= 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=218.30.115.76 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.69.6]) by sina.com (10.75.12.45) with ESMTP id 65B4ED0800009934; Sat, 27 Jan 2024 19:46:19 +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: 15807531457944 X-SMAIL-UIID: 8822F8609A034D77A37EB2C906C40B34-20240127-194619-1 From: Hillf Danton To: syzbot Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [overlayfs?] possible deadlock in seq_read_iter (2) Date: Sat, 27 Jan 2024 19:46:10 +0800 Message-Id: <20240127114610.961-1-hdanton@sina.com> In-Reply-To: <0000000000008efd70060ce21487@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, 19 Dec 2023 11:43:27 -0800 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 2cf4f94d8e86 Merge tag 'scsi-fixes' of git://git.kernel.or.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=154aa8d6e80000 #syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2cf4f94d8e86 --- x/fs/namei.c +++ y/fs/namei.c @@ -3533,6 +3533,8 @@ static const char *open_last_lookups(str if (open_flag & (O_CREAT | O_TRUNC | O_WRONLY | O_RDWR)) { got_write = !mnt_want_write(nd->path.mnt); + if (!got_write && (open_flag & O_CREAT)) + return ERR_PTR(-EISDIR); /* * do _not_ fail yet - we might not need that or fail with * a different error; let lookup_open() decide; we'll be --