From nobody Wed May 27 09:24:10 2026 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gQPMH2wkhz6fjkM for ; Wed, 27 May 2026 09:24:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gQPMH2Mg9z3f25 for ; Wed, 27 May 2026 09:24:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779873851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+B8Trep1POBNBmwlbo/BskI43cBAj/LTZ/I6mfoCQU=; b=g6M3LrhBWCTkopxhq7678QfiN/3JyWTGYDmuTZeYOnxqlTkSoZRAW2RI2ydHkRTYeg3dUb K8zZqZQ5hUw5h+yucmN4MRdJJAnB3qnD4HvKF+UJP/oTJS2xPzdklbW5G8ZeZdZXJOMoTy k88zy8HbIUUcabBnNsN1cr3rIOO/bqjWcoVgW8DOnF5ltc9wFYwyJOgZxPEmbg1Xp4Jdf6 cMFfbGgMTDblLLaC4xaDUu3hdMRZR3QkgdAXO4dTVZd3FXkBco8V6jFF6GeohN7qrak7XS qBBxbUT9B7C45C1nzfsQJvMMzwgUnG7LiK3Yy69F72fy6LNWofdvQSSnSflF0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779873851; a=rsa-sha256; cv=none; b=fjUGoqxBa5xaHkwAjhBVABshWxk6VeE6mYryQSeVGhkPYeHBkHIO+AXpWBgnjIOdcLsYfD M8baXdmSFsTqkw+vKXooLHtl/HfY5+UuELxHJdEcQq9rcUSMDC+Tn1pKC5WHZ0E+MKN1WL 1vPdvtrivYtBO1lg+MR7b1Bd5xJkjIZEEQmDt30tkuSYJ2LpkMo/t7XMIslJBiwKWACAJC stoxe529co5gyFavf68o5o0itnW+NfKsrmc05NXvO49lNv9cHO3CvyadRjnF+PzT2hPrz0 s4Xn07KqGVmiM8XOVb8rNzTSCuERf+nNMGMMBv/RYHltq5gkMi9LRAM5YGW51w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779873851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+B8Trep1POBNBmwlbo/BskI43cBAj/LTZ/I6mfoCQU=; b=aPH5m3IqzsX68NyZ4cOfAyZlj4vnGGgcQkL/JkRZfVo4Vcdwz3bYSyaAEQqH2cKV9lPDgD cSJbSJMC0XllK6VBTPxJsC9ZlEldJfjMiTTUPqD8+QDv+jORFlMzdQ3suU4Krz6CIPY+8i NodWuitiW7feLJibaybCoDqGKRdUfTuvhUYkMhCvmNqio3SifCWyAS1LYPV1lpPoKoGtBN jCVucrFSSgcXL5jnOMmmrFqNhLqI1D/kk3QEsEhQDcpIdUTVzrRHc42PhZNJQJkVha7QZQ WuOdX6oniBlryIzamNm11qVJ3PskVZ59XUIZJa3znU9JnTj8qnBrhzZHn7r5YA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4gQPMH1xGszt4h for ; Wed, 27 May 2026 09:24:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 64R9OB7K087841 for ; Wed, 27 May 2026 09:24:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 64R9OB1r087840 for bugs@FreeBSD.org; Wed, 27 May 2026 09:24:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 295637] mlx4ib: Fix EQ resource leak on mlx4_ib_add() error path Date: Wed, 27 May 2026 09:24:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: lihaoxiang@isrc.iscas.ac.cn X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295637 Bug ID: 295637 Summary: mlx4ib: Fix EQ resource leak on mlx4_ib_add() error path Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: lihaoxiang@isrc.iscas.ac.cn Created attachment 271232 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D271232&action= =3Dedit possible patch mlx4_ib_alloc_eqs() allocates ibdev->eq_table and calls mlx4_assign_eq(). mlx4_assign_eq() increments the selected EQ ref_count. The normal remove pa= th releases these resources through mlx4_ib_free_eqs(), but the mlx4_ib_add() error paths after mlx4_ib_alloc_eqs() currently fall through to err_map wit= hout calling mlx4_ib_free_eqs(). This can leak ibdev->eq_table and leave EQ references unreleased when any l= ater initialization step fails. The attached patch fixes the error path by calli= ng mlx4_ib_free_eqs() at err_map before iounmap(ibdev->uar_map). --=20 You are receiving this mail because: You are the assignee for the bug.=