Files
android_kernel_xiaomi_sm8450/include/linux
Ming Lei 1db4909e76 blk-mq: not embed .mq_kobj and ctx->kobj into queue instance
Even though .mq_kobj, ctx->kobj and q->kobj share same lifetime
from block layer's view, actually they don't because userspace may
grab one kobject anytime via sysfs.

This patch fixes the issue by the following approach:

1) introduce 'struct blk_mq_ctxs' for holding .mq_kobj and managing
all ctxs

2) free all allocated ctxs and the 'blk_mq_ctxs' instance in release
handler of .mq_kobj

3) grab one ref of .mq_kobj before initializing each ctx->kobj, so that
.mq_kobj is always released after all ctxs are freed.

This patch fixes kernel panic issue during booting when DEBUG_KOBJECT_RELEASE
is enabled.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Cc: "jianchao.wang" <jianchao.w.wang@oracle.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2018-11-21 05:57:56 -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-05-26 09:16:44 +02:00
2018-06-15 18:10:01 -03:00
2018-11-01 19:59:53 -06:00
2018-11-19 19:03:44 -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-09-06 15:12:24 -06:00
2018-10-26 16:26:32 -07:00
2018-06-15 18:10:01 -03:00
2018-08-22 10:52:48 -07:00
2018-09-11 14:11:54 +02:00
2018-07-12 10:04:29 -04:00
2018-11-19 19:03:50 -07:00
2018-07-27 09:57:23 +10:00
2018-06-28 20:32:51 +09:00
2018-11-06 13:59:08 +01: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-06-22 13:43:27 +09:00
2018-06-21 12:33:21 +02:00
2018-07-12 21:35:28 +02:00
2018-06-05 08:50:16 -04:00
2018-06-07 17:34:35 -07:00
2018-10-31 08:54:14 -07:00
2018-06-07 17:34:39 -07:00
2018-10-17 13:56:58 -07:00
2018-08-22 10:52:45 -07:00
2018-07-10 17:22:35 +02:00
2018-06-07 17:34:36 -07:00
2018-10-21 10:46:39 -04:00
2018-09-18 17:52:15 -05:00
2018-07-19 11:34:23 +01:00
2018-10-26 16:26:35 -07:00
2018-10-01 23:14:10 -07:00
2018-07-21 10:43:12 -05:00
2018-10-08 22:53:10 +11:00
2018-08-22 10:52:46 -07:00
2018-10-26 16:26:32 -07:00
2018-05-31 00:13:56 +08:00
2018-07-20 01:11:45 +02:00
2018-08-02 17:33:06 -04:00
2018-09-28 14:20:59 +02:00
2018-09-25 20:17:35 -07:00
2018-06-29 08:48:06 -06:00
2018-06-07 17:34:35 -07:00
2018-07-07 17:25:23 +02:00
2018-07-03 09:20:44 +02:00
2018-08-16 12:14:42 -07:00
2018-06-20 11:35:56 +02: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-09-11 14:11:51 +02:00
2018-10-21 10:46:46 -04:00