summaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorDennis Zhou (Facebook) <dennisszhou@gmail.com>2018-08-31 16:22:44 -0400
committerJens Axboe <axboe@kernel.dk>2018-08-31 14:48:58 -0600
commit3111885015b458c97b4cf272e2a87f1d6f0ed06a (patch)
tree828379a8a4a92e45414f08b05a9e143d72e7d7ea /drivers/block/nbd.c
parent59b57717fff8b562825d9d25e0180ad7e8048ca9 (diff)
downloadlinux-3111885015b458c97b4cf272e2a87f1d6f0ed06a.tar.bz2
blkcg: use tryget logic when associating a blkg with a bio
There is a very small change a bio gets caught up in a really unfortunate race between a task migration, cgroup exiting, and itself trying to associate with a blkg. This is due to css offlining being performed after the css->refcnt is killed which triggers removal of blkgs that reach their blkg->refcnt of 0. To avoid this, association with a blkg should use tryget and fallback to using the root_blkg. Fixes: 08e18eab0c579 ("block: add bi_blkg to the bio for cgroups") Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Dennis Zhou <dennisszhou@gmail.com> Cc: Jiufei Xue <jiufei.xue@linux.alibaba.com> Cc: Joseph Qi <joseph.qi@linux.alibaba.com> Cc: Tejun Heo <tj@kernel.org> Cc: Josef Bacik <josef@toxicpanda.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/nbd.c')
0 files changed, 0 insertions, 0 deletions