Re: [PATCH 1/1] cdrom: Call cdrom_mrw_exit from cdrom_release function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (25/07/23 00:19), Phillip Potter wrote:
> Remove the cdrom_mrw_exit call from unregister_cdrom, as it invokes
> block commands that can fail due to a NULL pointer dereference from the
> call happening too late, during the unloading of the driver (e.g.
> unplugging of USB optical drives).
> 
> Instead perform the call inside cdrom_release, thus also removing the
> need for the exit function pointer inside the cdrom_device_info struct.
> 
> Reported-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>
> Closes: https://lore.kernel.org/linux-block/uxgzea5ibqxygv3x7i4ojbpvcpv2wziorvb3ns5cdtyvobyn7h@y4g4l5ezv2ec
> Suggested-by: Jens Axboe <axboe@xxxxxxxxx>
> Link: https://lore.kernel.org/linux-block/6686fe78-a050-4a1d-aa27-b7bf7ca6e912@xxxxxxxxx
> Tested-by: Phillip Potter <phil@xxxxxxxxxxxxxxxx>
> Signed-off-by: Phillip Potter <phil@xxxxxxxxxxxxxxxx>

FWIW,
Tested-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>  # with LG GP65

Thanks!




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux