mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Geunsik Lim <geunsik.lim@samsung.com>, linux-mm@kvack.org
Cc: Geunsik Lim <leemgs@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Axel Rasmussen <axelrasmussen@google.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Hugh Dickins <hughd@google.com>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [PATCH] fix: Prevent memory leak by checking for NULL buffer before calling css_put()
Date: Mon, 3 Jun 2024 15:15:41 +0200	[thread overview]
Message-ID: <d9fbc964-c5fd-4b55-8f9b-db6971c3188c@web.de> (raw)
In-Reply-To: <CAGFP0L+BaNAtCF7c7cJ1bvbjomp03Fy0=6=w6dj29Fnr0ygSCA@mail.gmail.com>

…
> Previously, the code would directly call `css_put()` without checking
> the value of
> `buf`, which could lead to a memory leak if the buffer allocation failed.
> This commit introduces a conditional check to ensure that `css_put()`
> is only called
> if `buf` is not NULL.
…

How did you come to the conclusion that such a source code adjustment
would trigger a desirable effect?
https://elixir.bootlin.com/linux/v6.10-rc2/source/mm/mmap_lock.c#L188

By the way:
Would you like to reconsider word wrapping for such change descriptions
any more?

Regards,
Markus

  reply	other threads:[~2024-06-03 13:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 12:33 Geunsik Lim
2024-06-03 13:15 ` Markus Elfring [this message]
2024-06-03 17:31 ` Axel Rasmussen
2024-06-03 17:42   ` Yosry Ahmed

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=d9fbc964-c5fd-4b55-8f9b-db6971c3188c@web.de \
    --to=markus.elfring@web.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=axelrasmussen@google.com \
    --cc=geunsik.lim@samsung.com \
    --cc=hpa@zytor.com \
    --cc=hughd@google.com \
    --cc=leemgs@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    /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®