summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJérôme Glisse <jglisse@redhat.com>2019-04-26 08:23:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-02 10:40:28 +0300
commit0f2739be115bb3edc70fc67f52b7767cb3490069 (patch)
tree6d0d892c70d915bfba9bc365f2a076089b523b6e /lib
parentaec0d4aad4613ea834b65070aba62ced4ec4e540 (diff)
downloadlinux-0f2739be115bb3edc70fc67f52b7767cb3490069.tar.xz
zram: pass down the bvec we need to read into in the work struct
commit e153abc0739ff77bd89c9ba1688cdb963464af97 upstream. When scheduling work item to read page we need to pass down the proper bvec struct which points to the page to read into. Before this patch it uses a randomly initialized bvec (only if PAGE_SIZE != 4096) which is wrong. Note that without this patch on arch/kernel where PAGE_SIZE != 4096 userspace could read random memory through a zram block device (thought userspace probably would have no control on the address being read). Link: http://lkml.kernel.org/r/20190408183219.26377-1-jglisse@redhat.com Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Nitin Gupta <ngupta@vflare.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions