Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1158db35 authored by Jaegeuk Kim's avatar Jaegeuk Kim Committed by Neeraj Soni
Browse files

security: pfk: use page_mapping to avoid wrong memory access



This patch fixes potentially wrong memory access when doing ICE operations.

Change-Id: I4893d106877f6313bbcd2218d7c4ad12f63a0cbe
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@google.com>
Signed-off-by: default avatarNeeraj Soni <neersoni@codeaurora.org>
parent 84680317
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -220,11 +220,7 @@ static struct inode *pfk_bio_get_inode(const struct bio *bio)
	if (!page_mapping(bio->bi_io_vec->bv_page))
		return NULL;

	if (!bio->bi_io_vec->bv_page->mapping->host)

		return NULL;

	return bio->bi_io_vec->bv_page->mapping->host;
	return page_mapping(bio->bi_io_vec->bv_page)->host;
}

/**