From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/ras: Cancel and free message on get counter failure
Date: Thu, 04 Jun 2026 13:22:00 +1000 [thread overview]
Message-ID: <review-patch1-20260602044919.702209-2-raag.jadav@intel.com> (raw)
In-Reply-To: <20260602044919.702209-2-raag.jadav@intel.com>
Patch Review
**Verdict: Good fix, correct.**
The original code had two issues in `doit_reply_value()`:
1. When `get_node_error_counter()` failed, `msg` (the sk_buff) and `hdr` (the genetlink header) were leaked.
2. The existing error handling for `msg_reply_value()` failure had its own cleanup copy-paste.
The goto-based consolidation is clean and handles the `hdr == NULL` case correctly — when `genlmsg_iput()` fails, the jump goes to `free_msg` (skipping `genlmsg_cancel`), which is right since there's no valid header to cancel:
```c
cancel_msg:
genlmsg_cancel(msg, hdr);
free_msg:
nlmsg_free(msg);
return ret;
```
No issues.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-06-04 3:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 4:48 [PATCH v3 0/4] DRM RAS Fixes Raag Jadav
2026-06-02 4:48 ` [PATCH v3 1/4] drm/ras: Cancel and free message on get counter failure Raag Jadav
2026-06-04 3:22 ` Claude Code Review Bot [this message]
2026-06-02 4:48 ` [PATCH v3 2/4] drm/xe/drm_ras: Make counter allocation drm managed Raag Jadav
2026-06-04 3:22 ` Claude review: " Claude Code Review Bot
2026-06-02 4:48 ` [PATCH v3 3/4] drm/xe/drm_ras: Add per node cleanup action Raag Jadav
2026-06-04 3:22 ` Claude review: " Claude Code Review Bot
2026-06-02 4:48 ` [PATCH v3 4/4] drm/xe/hw_error: Use HW_ERR prefix in log Raag Jadav
2026-06-04 3:22 ` Claude review: " Claude Code Review Bot
2026-06-04 3:21 ` Claude review: DRM RAS Fixes Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-23 5:00 [PATCH v2 0/4] " Raag Jadav
2026-05-23 5:00 ` [PATCH v2 1/4] drm/ras: Cancel and free message on get counter failure Raag Jadav
2026-05-25 7:57 ` Claude review: " Claude Code Review Bot
2026-05-14 20:28 [PATCH v1 0/3] DRM RAS Fixes Raag Jadav
2026-05-14 20:28 ` [PATCH v1 1/3] drm/ras: Cancel and free message on get counter failure Raag Jadav
2026-05-16 0:24 ` Claude review: " Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=review-patch1-20260602044919.702209-2-raag.jadav@intel.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox