summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorEric Wheeler <git@linux.ewheeler.net>2016-06-17 15:01:54 -0700
committerEric Wheeler <git@linux.ewheeler.net>2016-08-18 20:28:23 -0700
commitd9dc1702b297ec4a6bb9c0326a70641b322ba886 (patch)
tree02965bf0fab5b546fe3d4f822bb3ce240ff36884 /tools/perf/scripts/python/export-to-postgresql.py
parent694d0d0bb2030d2e36df73e2d23d5770511dbc8d (diff)
bcache: register_bcache(): call blkdev_put() when cache_alloc() fails
register_cache() is supposed to return an error string on error so that register_bcache() will will blkdev_put and cleanup other user counters, but it does not set 'char *err' when cache_alloc() fails (eg, due to memory pressure) and thus register_bcache() performs no cleanup. register_bcache() <----------\ <- no jump to err_close, no blkdev_put() | | +->register_cache() | <- fails to set char *err | | +->cache_alloc() ---/ <- returns error This patch sets `char *err` for this failure case so that register_cache() will cause register_bcache() to correctly jump to err_close and do cleanup. This was tested under OOM conditions that triggered the bug. Signed-off-by: Eric Wheeler <bcache@linux.ewheeler.net> Cc: Kent Overstreet <kent.overstreet@gmail.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions