mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Yun Lin Chiang <ericyunlinchiang@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Johan Hovold <johan@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	driver-core@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] devres: update node debug info on in-place devm_krealloc()
Date: Fri,  4 Dec 2026 08:39:19 +0800	[thread overview]
Message-ID: <20261204003919.2280818-1-ericyunlinchiang@gmail.com> (raw)
In-Reply-To: <axFVq1Fy8RH4T9wt@ashevche-desk.local>

On Thu, Dec 03, 2026 at 01:42:35PM +0200, Andy Shevchenko wrote:
> Do we really support shrinking for realloc() in kernel?
> I am under the impression that we don't, so in such a case info should
> not be updated. Please, check this and confirm.

devm_krealloc() accepts a smaller size and returns the same pointer,
like krealloc() does, but no memory is given back. My changelog said
"shrunk", which made it sound otherwise.

The patch only changes the size recorded in the node's debug info, so
on its own it only changes debug output, which is not much of a reason.
I wrote it as groundwork for letting KASAN check devres allocations
against the requested size rather than the rounded-up bucket, and I
should not have sent it without that context. Please consider this one
withdrawn. I will come back with the KASAN part as one RFC series,
together with a concrete case it catches.

Thanks,
Eric

      reply	other threads:[~2026-12-04  0:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  0:57 Eric Yun Lin Chiang
2026-12-03 11:42 ` Andy Shevchenko
2026-12-04  0:39   ` Eric Yun Lin Chiang [this message]

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=20261204003919.2280818-1-ericyunlinchiang@gmail.com \
    --to=ericyunlinchiang@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@kernel.org \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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®