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)
commitca9b688c1c9a21635cfc8af8b68565b154185196
treebfc9eed8a9099503645b467733707246b246ed19
parentb4dc2b8c694ead005b828f5fb7fa1134db5b6275
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