[Mesa-dev] [PATCH] gallium/winsys/kms: do not munmap NULL pointers

Lepton Wu lepton at chromium.org
Thu Aug 16 18:19:30 UTC 2018


Hi Jan,
On Thu, Aug 16, 2018 at 10:37 AM Emil Velikov <emil.l.velikov at gmail.com> wrote:
>
> Hi Jan,
>
> On 13 July 2018 at 20:57, Jan Palus <atler at pld-linux.org> wrote:
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107098
> > Signed-off-by: Jan Palus <atler at pld-linux.org>
> > ---
Thanks for fixing this, actually after digging in some kernel code, it
seems my original assumation that
munmap(NULL...) should be noop is false.  So linux kernel will dry to
munmap for   address space between
NULL  and NULL + len,  if you happen to have a "low" mapping which
starts before len, then it will unmap
some process memory.
> Thanks for fixing this issue. For the future, feel free to use a fixes
> tag (+cc) as below.
> It provides a nice reference when picking the fix for stable branches,
> plus the author is your first line reviewer ;-)
>
> Fixes: d891f28df9a ("gallium/winsys/kms: Fix possible leak in map/unmap.")
> Cc: Lepton Wu <lepton at chromium.org>
>
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
>
> Just heading out of the office, so I'll push this tomorrow morning.
>
> -Emil


More information about the mesa-dev mailing list