From nobody Sun Dec 14 23:20:47 2025 Received: from outbound.pv.icloud.com (p-west1-cluster4-host9-snip4-10.eps.apple.com [57.103.65.161]) (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 7F1442580D3 for ; Wed, 7 May 2025 11:51:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=57.103.65.161 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746618662; cv=none; b=uQmJ8KWj2X9yw1HLnbGhZytXXhMW/LwJyNv78PmlKH7bDcxrzIC/+gV/TgEhr1ytrv3ESu63qu+VikGHkjbaJSKCJB2zECObfk7YwnDWCLo1WKHm7BnoAPLYZfVxHEQtdEJ80W3DOy7J8in1gk8DoIyaD0KAKK/1fWL1dScGCO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746618662; c=relaxed/simple; bh=t7RBdpAB6/Rvg0ouhT00GEbC2yqCs/4F4PCd/6M4UJE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Zls6vrFcpZ2LQE8k3L48RXii5fw2HMXhZWPLB9NsF6vyg+fy58d9WGVigHhixTDds2caPvhKMI2ykKd6NDLoTMezoz2v486ndB6IWwn0MgD+LxmchUVbWZWQoAeWj1BVCs3ME/lKW9ia3OdrFVUjnUZJQiScB92peto69Vl5hX4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com; spf=pass smtp.mailfrom=icloud.com; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b=C7n/fbGn; arc=none smtp.client-ip=57.103.65.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icloud.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b="C7n/fbGn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=NoyyqDYIyR/SRfx69JoOxA75oEf2SatCOktYowKGFjA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:x-icloud-hme; b=C7n/fbGnsSOEJyl/VKPwmZH756CdjanCwcrEBeWMRbbL/LMufmt4Jv/tRbnWi5uJD O4E4UGm0lj5s+tMDDF4Xmg4GICDT3QlZJlfpgQy5n2k4buUcg+pCJOIesZ0aEi673x MpRuexdwsAXSS7DkVEOBn4gfF5ota3AXjDK53EGH9iF/r2j47rxDsB2uooh1TWRI6Q 3U5p7sQPizEoYl1oo3Yyhr5ka/BIwsiPpcYgExUWukNv65ZnwwD3y2Ed4cRJ1EgbgL CO7vVgnSWcvF6YuVGeVpNW6WzsbsidZIo8VQxBm3KRwGg77biMDQmjPPJgKsyibYgK WJ5qE5xVXGsqw== Received: from [192.168.1.26] (pv-asmtp-me-k8s.p00.prod.me.com [17.56.9.36]) by outbound.pv.icloud.com (Postfix) with ESMTPSA id 13C9618003B4; Wed, 7 May 2025 11:50:55 +0000 (UTC) From: Zijun Hu Date: Wed, 07 May 2025 19:50:25 +0800 Subject: [PATCH v3 1/3] configfs: Delete semicolon from macro type_print() definition Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250507-fix_configfs-v3-1-fe2d96de8dc4@quicinc.com> References: <20250507-fix_configfs-v3-0-fe2d96de8dc4@quicinc.com> In-Reply-To: <20250507-fix_configfs-v3-0-fe2d96de8dc4@quicinc.com> To: Joel Becker , Pantelis Antoniou , Al Viro , Andreas Hindborg , Breno Leitao Cc: Zijun Hu , linux-kernel@vger.kernel.org, Zijun Hu X-Mailer: b4 0.14.2 X-Proofpoint-ORIG-GUID: C0A6qtARvdRpMkOuGpmmDECQSRHtKH1r X-Proofpoint-GUID: C0A6qtARvdRpMkOuGpmmDECQSRHtKH1r X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-07_03,2025-05-06_01,2025-02-21_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 clxscore=1015 adultscore=0 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2505070111 From: Zijun Hu Macro type_print() definition ends with semicolon, so will cause the subsequent macro invocations end with two semicolons. Fix by deleting the semicolon from the macro definition. Reviewed-by: Joel Becker Signed-off-by: Zijun Hu --- fs/configfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 5568cb74b32243ef30eac9c5957c17da3ca5afe9..6d4a1190f694fe5260577dbedeb= 755d6fcdf6703 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -970,7 +970,7 @@ static void configfs_dump_one(struct configfs_dirent *s= d, int level) { pr_info("%*s\"%s\":\n", level, " ", configfs_get_name(sd)); =20 -#define type_print(_type) if (sd->s_type & _type) pr_info("%*s %s\n", leve= l, " ", #_type); +#define type_print(_type) if (sd->s_type & _type) pr_info("%*s %s\n", leve= l, " ", #_type) type_print(CONFIGFS_ROOT); type_print(CONFIGFS_DIR); type_print(CONFIGFS_ITEM_ATTR); --=20 2.34.1 From nobody Sun Dec 14 23:20:47 2025 Received: from outbound.pv.icloud.com (p-west1-cluster4-host7-snip4-7.eps.apple.com [57.103.65.178]) (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 71C3C257AE8 for ; Wed, 7 May 2025 11:51:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=57.103.65.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746618668; cv=none; b=jdjV40tBxbJrJgcRS8MOtrtxZejHgffcfACvY/0PpCbB3ZebbSdCa2kYe4hRRRWl+JOfhCoVZbbXQ/nxOB0Vu2wKMi0SYSJiZeidDXi6coMIZZdHnPv63AkMYXvbAOF94KQ9sjy8yLUD81+1BWHLbKgBazioMi9q+5mL3UBPkR8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746618668; c=relaxed/simple; bh=fhTWpgyQW4P7IBBWg9OM1EczAevb0P/mq5oliB5kZ3A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jN3gRrN0XuzUPdCmAw0S8h7CsCCB/xN+Qr4TzBtEk2DSauaPWF+Qi4FjSnRHp6xUbu9VkmKAYCjZ9vAhM2j2V2WLwyDXpODPr0PHJwtqOoxyVErEIcur9FceugV6utcTQjlcwFqXKkYdk/eG01xvFdTR4ldBwOi/G4ntwvU8Gzw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com; spf=pass smtp.mailfrom=icloud.com; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b=lhoFOqm0; arc=none smtp.client-ip=57.103.65.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icloud.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b="lhoFOqm0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=nl6EKOqjrfqi7ZEcZQMGd15wSOqkAoUjOXK+nIwxAOc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:x-icloud-hme; b=lhoFOqm0ZH81MiWNSkToRYUwOu87bNpDjKhdl/QlYj/tGHXGqkooUMdhzsuT1coYi SSLpKZ6548iU+y7a+gwkMaGVpxLWtJyYuuL+6r6S8uGWa2qfyxMw6GVAVlaQBaVMsl LeAxJ++aTjmlMQbn2mS+9+8j7AswIzXuRWKV0gjPBXntcvMW26JES261oaNx48wFW3 SLG6Lq2AeQ5L/EmYA8E7geqVIh5SKDOsk9YLQeDBb6JL3ZpLM8zZoy3UfqCdcxA21b wyh4vi2s07n27DDm71Wxg6ZPVE8KlYf388aQMiyTubuxTQc6AqOYe96uCVnHsy5RAT mZnAuY/0mF8jw== Received: from [192.168.1.26] (pv-asmtp-me-k8s.p00.prod.me.com [17.56.9.36]) by outbound.pv.icloud.com (Postfix) with ESMTPSA id 813091800673; Wed, 7 May 2025 11:51:01 +0000 (UTC) From: Zijun Hu Date: Wed, 07 May 2025 19:50:26 +0800 Subject: [PATCH v3 2/3] configfs: Do not override creating attribute file failure in populate_attrs() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250507-fix_configfs-v3-2-fe2d96de8dc4@quicinc.com> References: <20250507-fix_configfs-v3-0-fe2d96de8dc4@quicinc.com> In-Reply-To: <20250507-fix_configfs-v3-0-fe2d96de8dc4@quicinc.com> To: Joel Becker , Pantelis Antoniou , Al Viro , Andreas Hindborg , Breno Leitao Cc: Zijun Hu , linux-kernel@vger.kernel.org, Zijun Hu , stable@vger.kernel.org X-Mailer: b4 0.14.2 X-Proofpoint-ORIG-GUID: d8YdO6rX9Xpq4YSvq0ihvZ3f5-oOcUlh X-Proofpoint-GUID: d8YdO6rX9Xpq4YSvq0ihvZ3f5-oOcUlh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-07_03,2025-05-06_01,2025-02-21_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 clxscore=1015 adultscore=0 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2505070111 From: Zijun Hu populate_attrs() may override failure for creating attribute files by success for creating subsequent bin attribute files, and have wrong return value. Fix by creating bin attribute files under successfully creating attribute files. Fixes: 03607ace807b ("configfs: implement binary attributes") Cc: stable@vger.kernel.org Reviewed-by: Joel Becker Reviewed-by: Breno Leitao Signed-off-by: Zijun Hu --- fs/configfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 6d4a1190f694fe5260577dbedeb755d6fcdf6703..ebf32822e29bed882c4204c71b1= b3b4e5df2f2bd 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c @@ -619,7 +619,7 @@ static int populate_attrs(struct config_item *item) break; } } - if (t->ct_bin_attrs) { + if (!error && t->ct_bin_attrs) { for (i =3D 0; (bin_attr =3D t->ct_bin_attrs[i]) !=3D NULL; i++) { if (ops && ops->is_bin_visible && !ops->is_bin_visible(item, bin_attr, = i)) continue; --=20 2.34.1 From nobody Sun Dec 14 23:20:47 2025 Received: from outbound.pv.icloud.com (p-west1-cluster2-host3-snip4-1.eps.apple.com [57.103.64.232]) (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 27C9325A2A3 for ; Wed, 7 May 2025 11:51:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=57.103.64.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746618674; cv=none; b=ochTPCYWE8ODYGvy22oPFEne2WjhwEvYCo8ZLAtzdZAk6KamRJzdDFvG3eAi9szinX8nkvpH7jZaPXvGE7yBf41uIfwGWAUy+8w0EB1DAQhatzoxkxq9UdsRHK6CUIBRVl4Lrp+C6fbXEeLIaxt45+bXLLguGIYbBOoGYKtmGEc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746618674; c=relaxed/simple; bh=G0EmvLuXMxOVKcjOmby5xyWrkEo1vv5BVYKcqaSnmK0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=htpUw0TPWe30S+tWWwz0qvPgNFibl6MXZsTvaMQwdaaObgkuJSR3m/UPFKK0kztXnmmJR8EvXKc5g3GF+hSwxji/qloQQvE4ETxiZhR8pX3IcESWjVWe6RM3Ywj2JbybJ2xQ8LbNIONHTuWcDpeHW6O3h9xGXUVNu5v0M6dJjsc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com; spf=pass smtp.mailfrom=icloud.com; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b=JwDdh1hA; arc=none smtp.client-ip=57.103.64.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icloud.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b="JwDdh1hA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=GLlyUi+/XtLimd8mmDcek7Y+01pRn6rPBk6nTb5pM6o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:x-icloud-hme; b=JwDdh1hABHrn5bCycPrwnctrapInqYA7sgQBXmXaLpfiWlknoNolj6lalayxua3an 3BOJlVWFR8hHxA2s0siZHuM58J2hTSUL0snd/DgaUkl46J5qH4uwF9lvGXlOrM97BA LxEMec1IdzPp16wuJfjAH6g+1ESWe70NvmZLiZ1K+HYbCjI7PZFuEnOkAD3AQ36PQ4 GaleT3NGzgrKBUAEen5XJPZdicIGFO8R10CaO+Y+kNi1MQWUppiAtq2cfgr8Kqb4VN uoTOasGJbCs242+k/7MipArkHtiLpsrA4yo4swtAay3zrZOIdAmM76l4MsEDP6nkRx jLJ1Ry//BArJg== Received: from [192.168.1.26] (pv-asmtp-me-k8s.p00.prod.me.com [17.56.9.36]) by outbound.pv.icloud.com (Postfix) with ESMTPSA id 7285218001CC; Wed, 7 May 2025 11:51:07 +0000 (UTC) From: Zijun Hu Date: Wed, 07 May 2025 19:50:27 +0800 Subject: [PATCH v3 3/3] configfs: Correct error value returned by API config_item_set_name() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250507-fix_configfs-v3-3-fe2d96de8dc4@quicinc.com> References: <20250507-fix_configfs-v3-0-fe2d96de8dc4@quicinc.com> In-Reply-To: <20250507-fix_configfs-v3-0-fe2d96de8dc4@quicinc.com> To: Joel Becker , Pantelis Antoniou , Al Viro , Andreas Hindborg , Breno Leitao Cc: Zijun Hu , linux-kernel@vger.kernel.org, Zijun Hu X-Mailer: b4 0.14.2 X-Proofpoint-ORIG-GUID: oy3ZyznyjWXS5436yBhCc0M6Yutuuz6K X-Proofpoint-GUID: oy3ZyznyjWXS5436yBhCc0M6Yutuuz6K X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-07_03,2025-05-06_01,2025-02-21_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 clxscore=1015 adultscore=0 mlxscore=0 malwarescore=0 phishscore=0 suspectscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2505070111 From: Zijun Hu kvasprintf() failure is often caused by memory allocation which has error code -ENOMEM, but config_item_set_name() returns -EFAULT for the failure. Fix by returning -ENOMEM instead of -EFAULT for the failure. Reviewed-by: Joel Becker Reviewed-by: Breno Leitao Signed-off-by: Zijun Hu --- fs/configfs/item.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/configfs/item.c b/fs/configfs/item.c index 254170a82aa337d95cbfbdf1a2db1023db3a2907..c378b5cbf87d28387a509c3cabb= 93eccfb520c9c 100644 --- a/fs/configfs/item.c +++ b/fs/configfs/item.c @@ -66,7 +66,7 @@ int config_item_set_name(struct config_item *item, const = char *fmt, ...) name =3D kvasprintf(GFP_KERNEL, fmt, args); va_end(args); if (!name) - return -EFAULT; + return -ENOMEM; } =20 /* Free the old name, if necessary. */ --=20 2.34.1