From nobody Thu Apr 16 06:40:52 2026 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4420317159 for ; Mon, 2 Mar 2026 05:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.71 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772429483; cv=none; b=lotRnWsLT+cBP07Bycyu5wTY4QBQHEmFOinwEnV3iyR83XK5k3CFMyrO/ypGkhd+2aDC1siHxuR9muLui9751Mv1wRrITT/VcjPPQTP4nn8C9svhxyelAFFtwNRAQwTH+sYzQSgaMTw1kXawCGd7ZPSZ3oK4v1MHhNCYErBQ63I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772429483; c=relaxed/simple; bh=l3TDbAiNgiiBVXihv9HAd828GkAluprunFvpJz+Xlj4=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=pB2K53UjfFOROXWzCtIOTrTH7AdTl+TA0mbpRrdC4hMQactod6YRjRhL+qXUnZcRNGAsvfLIGs6MuiVJ4WT0Vk1MLbqyue3q3ZySXZMgUrYAXg3AW0Ma8a4iWd9LfHkG5SlNDkSIeJKmhU1YNqJO7kz6HQ0VJPBlHuKXEYeRTck= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-679dcff168dso36346068eaf.3 for ; Sun, 01 Mar 2026 21:31:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772429481; x=1773034281; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UcAU86qwAqCXSCHYeg9ZFXl7UxjnmLhHO4SGkSYTYIs=; b=dAOKjxUugJAqWUBCCAPo+K+TQA66SaZMvjxYb3ato/GHuEDzkhbRbJqrk+CtNHroi3 +ds6l5H3PgGynsrH1EkH9ZzKUtCyCm3zs+kpFoz+q04ITM6cO7M8/Gijh6jEclQXcdQG YA8MLbpFOVNNRzg7lo3r726YRfExjfRf1g3UI07EYZ345AcCZFZeI+SCMgSyykIsb9hg 1nDcbjkI0RWAqkf1d/pPUxPiMuxrBOiB7Upx3hJ0/turVVj5ApkC3OmcKrRhgNrobVmf y2dMxyd8gTeoEONvRI4cukC3f7VHkzpPWSvcK8P8EsHg2zaMVbKuuW19hGj6h3dKSiVZ KF1g== X-Gm-Message-State: AOJu0YyIDImr+f0C2nBMPPBMHVpWxlA2xSveIGH2Ev8pXL/hnbhXjuVg WVZ7i3NS+3qoJ+mHOVa9NKrBVYFczKzljDXKJfOtSE42x8Jih0/FBGuan7qu72DFMmC1iYC7Lz+ IV2peQcQd91Y+hnpholIPA4fBpmZa2RJ9cbT/1O5IckEYH2YGoy3tgs/rucI= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:98e:b0:66d:b183:64ed with SMTP id 006d021491bc7-679fadf3944mr6647903eaf.25.1772429480829; Sun, 01 Mar 2026 21:31:20 -0800 (PST) Date: Sun, 01 Mar 2026 21:31:20 -0800 In-Reply-To: <66fdfef3.050a0220.9ec68.0031.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69a520a8.050a0220.3a55be.0070.GAE@google.com> Subject: Forwarded: test patch From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: test patch Author: heming.zhao@suse.com #syz test diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index e85b1ccf81be..77b8f0363e94 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c @@ -311,11 +311,25 @@ int ocfs2_lock_global_qf(struct ocfs2_mem_dqinfo *oin= fo, int ex) spin_unlock(&dq_data_lock); if (ex) { inode_lock(oinfo->dqi_gqinode); - down_write(&OCFS2_I(oinfo->dqi_gqinode)->ip_alloc_sem); + if (!down_write_trylock(&OCFS2_I(oinfo->dqi_gqinode)->ip_alloc_sem)) { + inode_unlock(oinfo->dqi_gqinode); + status =3D -EBUSY; + goto bail; + } } else { down_read(&OCFS2_I(oinfo->dqi_gqinode)->ip_alloc_sem); } return 0; + +bail: + /* does a similar job as ocfs2_unlock_global_qf */ + ocfs2_inode_unlock(oinfo->dqi_gqinode, ex); + brelse(oinfo->dqi_gqi_bh); + spin_lock(&dq_data_lock); + if (!--oinfo->dqi_gqi_count) + oinfo->dqi_gqi_bh =3D NULL; + spin_unlock(&dq_data_lock); + return status; } =20 void ocfs2_unlock_global_qf(struct ocfs2_mem_dqinfo *oinfo, int ex) diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c index c4e0117d8977..e749cd064c87 100644 --- a/fs/ocfs2/quota_local.c +++ b/fs/ocfs2/quota_local.c @@ -1224,7 +1224,9 @@ int ocfs2_create_local_dquot(struct dquot *dquot) int status; u64 pcount; =20 - down_write(&OCFS2_I(lqinode)->ip_alloc_sem); + if (!down_write_trylock(&OCFS2_I(lqinode)->ip_alloc_sem)) + return -EBUSY; + chunk =3D ocfs2_find_free_entry(sb, type, &offset); if (!chunk) { chunk =3D ocfs2_extend_local_quota_file(sb, type, &offset); --=20 2.43.0