From nobody Sun Feb 8 22:20:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=reject dis=none) header.from=linux.ibm.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1738859296723690.1075319781689; Thu, 6 Feb 2025 08:28:16 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 0CF681720; Thu, 6 Feb 2025 11:28:16 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 90F441716; Thu, 6 Feb 2025 11:28:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 37522148F; Thu, 6 Feb 2025 11:27:58 -0500 (EST) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 382EF146C for ; Thu, 6 Feb 2025 11:27:57 -0500 (EST) Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 516ESKfx009546; Thu, 6 Feb 2025 16:27:56 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 44mk5a480y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Feb 2025 16:27:56 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 516GL7eB005277; Thu, 6 Feb 2025 16:27:55 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 44j05k6y4a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 06 Feb 2025 16:27:55 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 516GRr9g46924282 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 6 Feb 2025 16:27:53 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44F5120043; Thu, 6 Feb 2025 16:27:53 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2EF6920040; Thu, 6 Feb 2025 16:27:53 +0000 (GMT) Received: from fiuczyvm.. (unknown [9.171.194.115]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 6 Feb 2025 16:27:53 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=pp1; bh=YC/wLfbXTnRK+gLhHvKdybC50pCHrrR69QI9F/K3E +0=; b=szJIiDTxxBF4ppD97rwHgAGYw+aRSWKtLcm8hQuvy8fFGJGBPBgs+pFK4 VZnKyDncVMHfmpGNYpJ6IFfEQkYJkz91gGu0mFi7XzTK4Ap+2L9d2puDuKR20qtX dXfvQhZHRt6ZHghmEpi4L7/O0/hrmF0uC0pLJPNO/XNyRg1nGBAnRChbTblK60nE o7W0+w1T0EM349GRKZFct+uClhsrG6BFL35ifVpcwT0OS+a/iBr+IrveoQ+a4i4S EeeluSolA01bU+71xUJWQULORGZXB2b8GP14JhaeY3re1Iz2Qg9g8PRf0Wbheyg3 AOui+k0pVjjlMVfm6bhH+8JmNLMkw== From: Boris Fiuczynski To: devel@lists.libvirt.org Subject: [PATCH] node_device_udev: add error reporting to udevProcessCCWGroup Date: Thu, 6 Feb 2025 17:27:52 +0100 Message-ID: <20250206162752.116297-1-fiuczy@linux.ibm.com> X-Mailer: git-send-email 2.48.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: hwKXwojDKqNy3yeARs8PMJCYH1zgaH8x X-Proofpoint-ORIG-GUID: hwKXwojDKqNy3yeARs8PMJCYH1zgaH8x 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=2025-02-06_03,2025-02-05_03,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=862 mlxscore=0 malwarescore=0 suspectscore=0 clxscore=1015 impostorscore=0 spamscore=0 adultscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2501170000 definitions=main-2502060130 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: E5OBIGCAEHUKD2XYAUW7AKOKINXA5S2R X-Message-ID-Hash: E5OBIGCAEHUKD2XYAUW7AKOKINXA5S2R X-MailFrom: fiuczy@linux.ibm.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: pkrempa@redhat.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1738859299714019000 Content-Type: text/plain; charset="utf-8" Add reporting an internal error when the string to type conversion of devtype fails as this indicates a serious problem since devtype was used to get into this method during the udev event handling. Signed-off-by: Boris Fiuczynski Reviewed-by: Michal Privoznik --- src/node_device/node_device_udev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 7b4ff80f8f..344b39e97a 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1415,8 +1415,12 @@ udevProcessCCWGroup(struct udev_device *device, =20 udevGenerateDeviceName(device, def, NULL); =20 - if ((tmp =3D virNodeDevCCWGroupCapTypeFromString(devtype)) < 0) + if ((tmp =3D virNodeDevCCWGroupCapTypeFromString(devtype)) < 0) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to find a supported CCW group capability = type '%1$s'"), + devtype); return -1; + } =20 data->ccwgroup_dev.type =3D tmp; =20 --=20 2.47.0