Files
kernel/include/linux
Dennis Zhou 0273ac349f blkcg: handle dying request_queue when associating a blkg
Between v3 [1] and v4 [2] of the blkg association series, the
association point moved from generic_make_request_checks(), which is
called after the request enters the queue, to bio_set_dev(), which is when
the bio is formed before submit_bio(). When the request_queue goes away,
the blkgs supporting the request_queue are destroyed and then the
q->root_blkg is set to %NULL.

This patch adds a %NULL check to blkg_tryget_closest() to prevent the
NPE caused by the above. It also adds a guard to see if the
request_queue is dying when creating a blkg to prevent creating a blkg
for a dead request_queue.

[1] https://lore.kernel.org/lkml/20180911184137.35897-1-dennisszhou@gmail.com/
[2] https://lore.kernel.org/lkml/20181126211946.77067-1-dennis@kernel.org/

Fixes: 5cdf2e3fea ("blkcg: associate blkg when associating a device")
Reported-and-tested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-12-12 17:43:33 -07:00
..
2018-10-31 10:57:43 -07:00
2018-10-18 15:41:21 -07:00
2018-10-16 11:13:50 +02:00
2018-10-31 19:24:21 +01:00
2018-12-07 22:26:38 -07:00
2018-11-07 13:44:59 -07:00
2018-11-07 13:44:59 -07:00
2018-10-19 13:24:31 -07:00
2018-10-19 13:24:31 -07:00
2018-10-26 16:26:32 -07:00
2018-11-19 19:03:50 -07:00
2018-11-10 08:03:52 -07:00
2018-10-21 10:46:33 -04:00
2018-11-07 13:42:32 -07:00
2018-11-19 19:03:46 -07:00
2018-10-31 08:54:14 -07:00
2018-10-17 13:56:58 -07:00
2018-12-07 22:26:58 -07:00
2018-10-21 10:46:39 -04:00
2018-10-26 16:26:35 -07:00
2018-10-01 23:14:10 -07:00
2018-10-08 22:53:10 +11:00
2018-09-28 14:20:59 +02:00
2018-09-25 20:17:35 -07:00
2018-12-03 17:03:58 -07:00
2018-09-29 22:47:49 -04:00
2018-10-11 09:16:44 -07:00
2018-09-25 20:33:24 +02:00
2018-10-24 00:41:07 +01:00
2018-11-05 16:38:10 -05:00