aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-notifier-error-inject.c
diff options
context:
space:
mode:
authorMinchan Kim <[email protected]>2017-01-10 16:58:21 -0800
committerLinus Torvalds <[email protected]>2017-01-10 18:31:55 -0800
commitb09ab054b69b07077bd3292f67e777861ac796e5 (patch)
treeac9dfa56c3fc89a908eb97c6cc491236637cf93e /lib/netdev-notifier-error-inject.c
parente7ccfc4ccb703e0f033bd4617580039898e912dd (diff)
zram: support BDI_CAP_STABLE_WRITES
zram has used per-cpu stream feature from v4.7. It aims for increasing cache hit ratio of scratch buffer for compressing. Downside of that approach is that zram should ask memory space for compressed page in per-cpu context which requires stricted gfp flag which could be failed. If so, it retries to allocate memory space out of per-cpu context so it could get memory this time and compress the data again, copies it to the memory space. In this scenario, zram assumes the data should never be changed but it is not true without stable page support. So, If the data is changed under us, zram can make buffer overrun so that zsmalloc free object chain is broken so system goes crash like below https://bugzilla.suse.com/show_bug.cgi?id=997574 This patch adds BDI_CAP_STABLE_WRITES to zram for declaring "I am block device needing *stable write*". Fixes: da9556a2367c ("zram: user per-cpu compression streams") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Minchan Kim <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Hyeoncheol Lee <[email protected]> Cc: <[email protected]> Cc: Sangseok Lee <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Darrick J. Wong <[email protected]> Cc: <[email protected]> [4.7+] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions