> From: Haruka Kuze <[email protected]> > > OP-TEE has a reference of RPMB device it used. So, it can route > frames through the device after rpmb_dev_unregister() is called. > Therefore, the parent device passed to route_frames() can be > already freed, for example, mmc_blk_remove_rpmb_part() drops the > last reference after rpmb unregister. > > This patch clears the route_frames when the device is going to > be removed by getting new rwsem and makes rpmb_route_frames() > return -ENODEV if the device is gone. > > Fixes: 1e9046e3a154 ("rpmb: add Replay Protected Memory Block (RPMB) > subsystem") > Assisted-by: LLM > Signed-off-by: Haruka Kuze <[email protected]>
Sashiko has reviewed this patch and found no issues. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
