lofi: delayed mapping deletion can panic due to NULL ls_stacked_vp
panic message: BAD TRAP: type=e (#pf Page fault) rp=fffffe0008a20420 addr=28 occurred in module "genunix" due to a NULL pointer dereference
vnodetopath_common+0x290(0, 0, fffffe06623b2554, 400, fffffe065bb1a810, 0)
vnodetopath+0x24(0, 0, fffffe06623b2554, 400, fffffe065bb1a810)
lofi_get_info+0x191(8100000000, 80457dc, 4c4605, fffffe065bb1a810, 100401)
When mapping is deleted while still in use (lofiadm -d -f) the mapping will be removed, ls_stacked_vp is set to NULL and if we now call vnodetopath(), the system will panic.
Testing done: confirmed, we do not get panic any more.
Updated by Electric Monk about 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit e31da75739e46b82cd7fdd6e51590fefa97cc9c0 Author: Toomas Soome <email@example.com> Date: 2021-05-21T21:48:06.000Z 13826 lofi: delayed mapping deletion can panic due to NULL ls_stacked_vp Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Reviewed by: Gordon Ross <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>