]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: Avoid accessing unmapped kernel address
authorLi Zefan <lizf@cn.fujitsu.com>
Wed, 16 Feb 2011 06:06:41 +0000 (06:06 +0000)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Feb 2011 20:37:58 +0000 (15:37 -0500)
commit2f4f07f720d39ade8c28d275551c6625db478c2c
treebfc9eed8a9099503645b467733707246b246ed19
parent2b66a198481dd808f923e160b105ba06839c37dd
Btrfs: Avoid accessing unmapped kernel address

When decompressing a chunk of data, we'll copy the data out to
a working buffer if the data is stored in more than one page,
otherwise we'll use the mapped page directly to avoid memory
copy.

In the latter case, we'll end up accessing the kernel address
after we've unmapped the page in a corner case.

Reported-by: Juan Francisco Cantero Hurtado <iam@juanfra.info>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/lzo.c