From nobody Sun Feb 8 20:28:35 2026 Received: from mx0a-0064b401.pphosted.com (mx0a-0064b401.pphosted.com [205.220.166.238]) (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 185EA28EC for ; Thu, 26 Dec 2024 02:09:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.166.238 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735178981; cv=none; b=ugsJMINIHhNQmVEyqYWhXrI16V51QN914M3GMw/95fwam+krb66nE//X8oL6GvqU8KAbYLiyYggLMTopcHyvdh2eJi1DE/uEEaYL7ZgRVNjQ8w+pNAAfdFX0au9feGfNqJ5nkzjv0Rl3Q5Qkkp5qQOjTP/6D5a77LfaE02Z7op8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735178981; c=relaxed/simple; bh=ggkgCaLK3qsZbmAyPcyTCNVkWpv6DVbWptNzaJ4SHRg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Y17qQpsxflW719pEyGXObK412qs1JdAFNrspQ1vSu3reuCitpoSUqQVNuahO4bG11kEVQbp4BGNBScEuO4WOA8P6jWwZCLsataCx6m4N7/T34kvXohtdwbfnpdry5UpmrmsTmPTLSkhObQnffzmYEDn9xWK3NNh4oQ6vr5Yon0k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=windriver.com; spf=pass smtp.mailfrom=windriver.com; arc=none smtp.client-ip=205.220.166.238 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=windriver.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=windriver.com Received: from pps.filterd (m0250809.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BQ1JKZC032423; Wed, 25 Dec 2024 17:26:19 -0800 Received: from ala-exchng01.corp.ad.wrs.com (ala-exchng01.wrs.com [147.11.82.252]) by mx0a-0064b401.pphosted.com (PPS) with ESMTPS id 43nx2pbqey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 25 Dec 2024 17:26:19 -0800 (PST) Received: from ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) by ala-exchng01.corp.ad.wrs.com (147.11.82.252) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.43; Wed, 25 Dec 2024 17:26:18 -0800 Received: from pek-lpd-ccm6.wrs.com (147.11.136.210) by ALA-EXCHNG02.corp.ad.wrs.com (147.11.82.254) with Microsoft SMTP Server id 15.1.2507.43 via Frontend Transport; Wed, 25 Dec 2024 17:26:17 -0800 From: Lizhi Xu To: CC: , , , , Subject: [PATCH] afs: Merge preference rule failure condition Date: Thu, 26 Dec 2024 09:26:16 +0800 Message-ID: <20241226012616.2348907-1-lizhi.xu@windriver.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <676c7f0d.050a0220.2f3838.03bb.GAE@google.com> References: <676c7f0d.050a0220.2f3838.03bb.GAE@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: TU82v8PGQGb-1EjlxKSJUWDAIjlF5CBT X-Authority-Analysis: v=2.4 cv=LtNoymdc c=1 sm=1 tr=0 ts=676cb0bb cx=c_pps a=/ZJR302f846pc/tyiSlYyQ==:117 a=/ZJR302f846pc/tyiSlYyQ==:17 a=RZcAm9yDv7YA:10 a=edf1wS77AAAA:8 a=hSkVLCK3AAAA:8 a=t7CeM3EgAAAA:8 a=7Yp-04125b2BqOOcT2IA:9 a=DcSpbTIhAlouE1Uv7lRv:22 a=cQPPKAXgyycSBL8etih5:22 a=FdTzh2GWekK77mhwV6Dw:22 X-Proofpoint-GUID: TU82v8PGQGb-1EjlxKSJUWDAIjlF5CBT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-12-25_08,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 spamscore=0 bulkscore=0 clxscore=1011 priorityscore=1501 impostorscore=0 mlxscore=0 mlxlogscore=279 suspectscore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.21.0-2411120000 definitions=main-2412260009 Content-Type: text/plain; charset="utf-8" syzbot reported a lock held when returning to user space. [1] If argc is less than 0 and the function returns directly, the held inode lock is not released. Combine it with less than 2. [1] WARNING: lock held when returning to user space! 6.13.0-rc3-syzkaller-00209-g499551201b5f #0 Not tainted Reported-by: syzbot+76f33569875eb708e575@syzkaller.appspotmail.com Tested-by: syzbot+76f33569875eb708e575@syzkaller.appspotmail.com ------------------------------------------------ syz-executor133/5823 is leaving the kernel with locks still held! 1 lock held by syz-executor133/5823: #0: ffff888071cffc00 (&sb->s_type->i_mutex_key#9){++++}-{4:4}, at: inode_l= ock include/linux/fs.h:818 [inline] #0: ffff888071cffc00 (&sb->s_type->i_mutex_key#9){++++}-{4:4}, at: afs_pro= c_addr_prefs_write+0x2bb/0x14e0 fs/afs/addr_prefs.c:388 Reported-by: syzbot+76f33569875eb708e575@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3D76f33569875eb708e575 Tested-by: syzbot+76f33569875eb708e575@syzkaller.appspotmail.com Signed-off-by: Lizhi Xu --- fs/afs/addr_prefs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/afs/addr_prefs.c b/fs/afs/addr_prefs.c index a189ff8a5034..ba391f8558d5 100644 --- a/fs/afs/addr_prefs.c +++ b/fs/afs/addr_prefs.c @@ -413,8 +413,6 @@ int afs_proc_addr_prefs_write(struct file *file, char *= buf, size_t size) =20 do { argc =3D afs_split_string(&buf, argv, ARRAY_SIZE(argv)); - if (argc < 0) - return argc; if (argc < 2) goto inval; =20 --=20 2.43.0