From: Raag Jadav <raag.jadav@intel.com>
To: intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
netdev@vger.kernel.org
Cc: rodrigo.vivi@intel.com, riana.tauro@intel.com,
maarten@lankhorst.se, airlied@gmail.com, simona@ffwll.ch,
kuba@kernel.org, Raag Jadav <raag.jadav@intel.com>
Subject: [PATCH v1 1/3] drm/ras: Cancel and free message on get counter failure
Date: Fri, 15 May 2026 01:58:16 +0530 [thread overview]
Message-ID: <20260514202839.1888688-2-raag.jadav@intel.com> (raw)
In-Reply-To: <20260514202839.1888688-1-raag.jadav@intel.com>
doit_reply_value() directly returns on get counter failure, which results
in stale sk_buff and genetlink header that aren't cleaned up. Fix it.
Fixes: c36218dc49f5 ("drm/ras: Introduce the DRM RAS infrastructure over generic netlink")
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
drivers/gpu/drm/drm_ras.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_ras.c b/drivers/gpu/drm/drm_ras.c
index d6eab29a1394..262a75f0c493 100644
--- a/drivers/gpu/drm/drm_ras.c
+++ b/drivers/gpu/drm/drm_ras.c
@@ -207,8 +207,11 @@ static int doit_reply_value(struct genl_info *info, u32 node_id,
ret = get_node_error_counter(node_id, error_id,
&error_name, &value);
- if (ret)
+ if (ret) {
+ genlmsg_cancel(msg, hdr);
+ nlmsg_free(msg);
return ret;
+ }
ret = msg_reply_value(msg, error_id, error_name, value);
if (ret) {
--
2.43.0
next prev parent reply other threads:[~2026-05-14 20:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 20:28 [PATCH v1 0/3] DRM RAS Fixes Raag Jadav
2026-05-14 20:28 ` Raag Jadav [this message]
2026-05-14 20:28 ` [PATCH v1 2/3] drm/xe/drm_ras: Make counter allocation drm managed Raag Jadav
2026-05-14 20:28 ` [PATCH v1 3/3] drm/xe/drm_ras: Add per node cleanup action Raag Jadav
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=20260514202839.1888688-2-raag.jadav@intel.com \
--to=raag.jadav@intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kuba@kernel.org \
--cc=maarten@lankhorst.se \
--cc=netdev@vger.kernel.org \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
/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