All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Zheyu Ma <zheyuma97@gmail.com>
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] fbdev: fbmem: Fix double free of 'fb_info->pixmap.addr'
Date: Sun, 10 Oct 2021 09:57:40 +0200	[thread overview]
Message-ID: <YWKc9A/WNjCJ8c5F@ravnborg.org> (raw)
In-Reply-To: <1633848148-29747-1-git-send-email-zheyuma97@gmail.com>

Hi Zheyu,

On Sun, Oct 10, 2021 at 06:42:28AM +0000, Zheyu Ma wrote:
> savagefb and some other drivers call kfree to free 'info->pixmap.addr'
> even after calling unregister_framebuffer, which may cause double free.
> 
> Fix this by setting 'fb_info->pixmap.addr' to NULL after kfree in
> unregister_framebuffer.

This is a nice general way to fix it that benefits all drivers.
Applied to drm-misc-next as this is not an urgent fix.

	Sam

      reply	other threads:[~2021-10-10  7:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-10  6:42 [PATCH 2/2] fbdev: fbmem: Fix double free of 'fb_info->pixmap.addr' Zheyu Ma
2021-10-10  7:57 ` Sam Ravnborg [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=YWKc9A/WNjCJ8c5F@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zheyuma97@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.