mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Pankaj Gupta <pankaj.gupta@nxp.com>
Cc: linux-kernel@vger.kernel.org, imx@lists.linux.dev, frank.li@nxp.com
Subject: Re: [PATCH -next] firmware: imx: Add missing return in error path to prevent use-after-free.
Date: Thu, 28 May 2026 13:01:26 +0300	[thread overview]
Message-ID: <ahgSdtiPwhSUGaIj@stanley.mountain> (raw)
In-Reply-To: <20260528091446.3331006-1-pankaj.gupta@nxp.com>

On Thu, May 28, 2026 at 02:44:46PM +0530, Pankaj Gupta wrote:
> After freeing dev_ctx and setting *new_dev_ctx to NULL, the function
> continues execution and dereferences dev_ctx, leading to a potential
> use-after-free. Return immediately to avoid accessing freed memory.
> 
> This appears to have been lost during merge of the original fix.
> 
> Fixes: 3ae9dcce8400 ("firmware: drivers: imx: adds miscdev")
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>

I try not to be a whiner about patch attibution to me because I feel
like I get enough credit for stuff and don't need to complain about
small things.  But it's puzzling to see my Signed-off-by here and
normally someone would ask about it.

I did write a patch for this but you have modified the commit message
and added a blank line.
https://lore.kernel.org/all/agv_jhP-2CNTfQXk@stanley.mountain/
Potentially, you already had written this patch by the time I sent
mine because it was a static checker fix and a lot of people run static
checkers.

Normally these tags are in chronoligical order and a Signed-off-by would
mean I handled the patch.  It doesn't make sense for me to be the first
person to handle the patch if I didn't write it.

I suspect what happened is that actually I should get authorship credit
but when you modified the patch, the authorship was lost.  (I have
done this mistake unintentionally before.  More than once).  To give
authorship credit, the first line in the body of the email would be:

From: Dan Carpenter <error27@gmail.com>

But if you already had a patch written then just give me a
Reported-by tag instead.  Either way is fine.

Sorry again, for being a bit nit picky on this...

regards,
dan carpenter


  reply	other threads:[~2026-05-28 10:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28  9:14 Pankaj Gupta
2026-05-28 10:01 ` Dan Carpenter [this message]
2026-06-01 21:20 ` Frank.Li

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=ahgSdtiPwhSUGaIj@stanley.mountain \
    --to=error27@gmail.com \
    --cc=frank.li@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.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

all inboxes | Powered by JetHome®