A lwp device isn't really a dt device, so it shouldn't be
marked as such. This causes a KASAN warning when obd_setup()
attempts to access dt device fields using lu2dt_dev():
BUG: KASAN: slab-out-of-bounds in obd_setup+0x208/0x4b0 [obdclass]
Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ib52b0f93c35a7d966314b6375ee963bc59f86abb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55825
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
struct lu_device_type_operations;
-/**
+/*
* Tag bits for device type. They are used to distinguish certain groups of
* device types.
*/
enum lu_device_tag {
- /** this is meta-data device */
+ /* this device doesn't implement any particular API */
+ LU_DEVICE_MISC = 0,
+ /* this is meta-data device */
LU_DEVICE_MD = BIT(0),
- /** this is data device */
+ /* this is data device */
LU_DEVICE_DT = BIT(1),
- /** data device in the client stack */
+ /* data device in the client stack */
LU_DEVICE_CL = BIT(2)
};
};
struct lu_device_type lwp_device_type = {
- .ldt_tags = LU_DEVICE_DT,
+ .ldt_tags = LU_DEVICE_MISC,
.ldt_name = LUSTRE_LWP_NAME,
.ldt_ops = &lwp_device_type_ops,
.ldt_ctx_tags = LCT_MD_THREAD