summaryrefslogtreecommitdiff
path: root/drivers/md/dm-io.c
diff options
context:
space:
mode:
authorGreg Thelen <gthelen@google.com>2014-07-31 09:07:19 -0700
committerMike Snitzer <snitzer@redhat.com>2014-08-01 12:07:21 -0400
commitd8c712ea471ce7a4fd1734ad2211adf8469ddddc (patch)
treed662f6b63cbd1cf2d3177ec870237c677d1c5313 /drivers/md/dm-io.c
parent64aa90f26c06e1cb2aacfb98a7d0eccfbd6c1a91 (diff)
dm bufio: fully initialize shrinker
1d3d4437eae1 ("vmscan: per-node deferred work") added a flags field to struct shrinker assuming that all shrinkers were zero filled. The dm bufio shrinker is not zero filled, which leaves arbitrary kmalloc() data in flags. So far the only defined flags bit is SHRINKER_NUMA_AWARE. But there are proposed patches which add other bits to shrinker.flags (e.g. memcg awareness). Rather than simply initializing the shrinker, this patch uses kzalloc() when allocating the dm_bufio_client to ensure that the embedded shrinker and any other similar structures are zeroed. This fixes theoretical over aggressive shrinking of dm bufio objects. If the uninitialized dm_bufio_client.shrinker.flags contains SHRINKER_NUMA_AWARE then shrink_slab() would call the dm shrinker for each numa node rather than just once. This has been broken since 3.12. Signed-off-by: Greg Thelen <gthelen@google.com> Acked-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Cc: stable@vger.kernel.org # v3.12+
Diffstat (limited to 'drivers/md/dm-io.c')
0 files changed, 0 insertions, 0 deletions