LU-18845 obdclass: NPE in with_imp_locked_nested
Unable to handle kernel NULL pointer dereference
at virtual address
0000000000000588
down_read+0x28/0x100
active_show+0x2c/0x90 [osp]
lustre_attr_show+0x1c/0x2c [obdclass]
active_show calls macro with_imp_locked with an
obd_device, which in turn gets a lock on
u.cli.cl_sem in obd_device. The exception is at offset 0x588,
and u.cli.cl_sem is at 0x588 in struct obd_device,
which confirms that a NULL obd was being used.
This fix adds checks for NULL obd to active_show.
Signed-off-by: Vandana Rungta <vrungta@amazon.com>
Change-Id: Ia0ff9e7a07f40bb7dd9c0d4cc0ecc38ea8d61d0b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58499
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Neil Brown <neil@brown.name>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>