staging: zram: fix invalid memory references during disk write
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=50081Signed-off-by: NNitin Gupta <ngupta@vflare.org> Cc: stable <stable@vger.kernel.org> Reported-by: NMihail Kasadjikov <hamer.mk@gmail.com> Reported-by: NTomas M <tomas@slax.org> Reviewed-by: NMinchan Kim <minchan@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
想要评论请 注册 或 登录