linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Pavel Skripkin <paskripkin@gmail.com>
Cc: sumit.semwal@linaro.org, christian.koenig@amd.com,
	dongwon.kim@intel.com, linux-media@vger.kernel.org,
	linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org,
	syzbot+e9cd3122a37c5d6c51e8@syzkaller.appspotmail.com
Subject: Re: [PATCH next] udmabuf: fix general protection fault in udmabuf_create
Date: Thu, 12 Aug 2021 09:32:14 +0200	[thread overview]
Message-ID: <20210812073214.xwflqw7c6cpt3n7p@sirius.home.kraxel.org> (raw)
In-Reply-To: <20210811175052.21254-1-paskripkin@gmail.com>

On Wed, Aug 11, 2021 at 08:50:52PM +0300, Pavel Skripkin wrote:
> Syzbot reported general protection fault in udmabuf_create. The problem
> was in wrong error handling.
> 
> In commit 16c243e99d33 ("udmabuf: Add support for mapping hugepages (v4)")
> shmem_read_mapping_page() call was replaced with find_get_page_flags(),
> but find_get_page_flags() returns NULL on failure instead PTR_ERR().
> 
> Wrong error checking was causing GPF in get_page(), since passed page
> was equal to NULL. Fix it by changing if (IS_ER(!hpage)) to if (!hpage)
> 
> Reported-by: syzbot+e9cd3122a37c5d6c51e8@syzkaller.appspotmail.com
> Fixes: 16c243e99d33 ("udmabuf: Add support for mapping hugepages (v4)")
> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>

Pushed to drm-misc-next.

thanks,
  Gerd


      reply	other threads:[~2021-08-12  7:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 17:50 [PATCH next] udmabuf: fix general protection fault in udmabuf_create Pavel Skripkin
2021-08-12  7:32 ` Gerd Hoffmann [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=20210812073214.xwflqw7c6cpt3n7p@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=dongwon.kim@intel.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=paskripkin@gmail.com \
    --cc=sumit.semwal@linaro.org \
    --cc=syzbot+e9cd3122a37c5d6c51e8@syzkaller.appspotmail.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;
as well as URLs for NNTP newsgroup(s).