In the Linux kernel, the following vulnerability has been resolved: ublk: detach gendisk from ublk device if adddisk() fails Inside ublkabortrequests(), gendisk is grabbed for aborting all inflight requests. And ublkabortrequests() is called when exiting the uring context or handling timeout. If adddisk() fails, the gendisk may have been freed when calling ublkabortrequests(), so use-after-free can be caused when getting disk's reference in ublkabortrequests(). Fixes the bug by detaching gendisk from ublk device if add_disk() fails.