RE: [PATCH 2/2] scsi: ufs: set bsg_queue to NULL after remove

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

 



> 
> Currently, this does not cause any issues, but I believe it is necessary to set
> bsg_queue to NULL after removing it to prevent potential use-after-free (UAF)
> access.
OK.

> 
> Signed-off-by: Guixin Liu <kanie@xxxxxxxxxxxxxxxxx>
Reviewed-by: Avri Altman <avri.altman@xxxxxxx>

> ---
>  drivers/ufs/core/ufs_bsg.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/ufs/core/ufs_bsg.c b/drivers/ufs/core/ufs_bsg.c index
> 58023f735c19..8d4ad0a3f2cf 100644
> --- a/drivers/ufs/core/ufs_bsg.c
> +++ b/drivers/ufs/core/ufs_bsg.c
> @@ -216,6 +216,7 @@ void ufs_bsg_remove(struct ufs_hba *hba)
>                 return;
> 
>         bsg_remove_queue(hba->bsg_queue);
> +       hba->bsg_queue = NULL;
> 
>         device_del(bsg_dev);
>         put_device(bsg_dev);
> --
> 2.43.0






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux