From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/ras: Cancel and free message on get counter failure Date: Mon, 25 May 2026 17:57:40 +1000 Message-ID: In-Reply-To: <20260523050212.557292-2-raag.jadav@intel.com> References: <20260523050212.557292-1-raag.jadav@intel.com> <20260523050212.557292-2-raag.jadav@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Verdict: Good fix, clean implementation.** This fixes a real leak: when `get_node_error_counter()` failed, the functio= n returned directly without calling `genlmsg_cancel()` or `nlmsg_free()`, l= eaking the sk_buff and genetlink header. The goto structure is correct: ```c cancel_msg: genlmsg_cancel(msg, hdr); free_msg: nlmsg_free(msg); return ret; ``` - The `hdr` allocation failure path jumps to `free_msg` directly, correctly= skipping `genlmsg_cancel` (since there's no valid header to cancel). - The `get_node_error_counter` and `msg_reply_value` failure paths jump to = `cancel_msg`, which cancels the header then falls through to free the messa= ge. `hdr` is guaranteed valid at this point. - The existing `msg_reply_value` error handling had the same cancel+free se= quence inline =E2=80=94 consolidating it into the goto is a good cleanup. No issues. --- Generated by Claude Code Patch Reviewer