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

Skip to content
Commit 9f60aeac authored by Nitin Gupta's avatar Nitin Gupta Committed by Mark Salyzyn
Browse files

staging: zram: fix invalid memory references during disk write

(cherry pick from commit 397c6066)

Fixes a bug introduced by commit c8f2f0db ("zram: Fix handling
of incompressible pages") which caused invalid memory references
during disk write. Invalid references could occur in two cases:
 - Incoming data expands on compression: In this case, reference was
made to kunmap()'ed bio page.
 - Partial (non PAGE_SIZE) write with incompressible data: In this
case, reference was made to a kfree()'ed buffer.

Fixes bug 50081:
https://bugzilla.kernel.org/show_bug.cgi?id=50081



Signed-off-by: default avatarNitin Gupta <ngupta@vflare.org>
Cc: stable <stable@vger.kernel.org>
Reported-by: default avatarMihail Kasadjikov <hamer.mk@gmail.com>
Reported-by: default avatarTomas M <tomas@slax.org>
Reviewed-by: default avatarMinchan Kim <minchan@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 24810447
Change-Id: Ia6558c1f89896522679f99472d801b1060dc3628
parent 81f0cd52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment