lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <92a53663-0359-5e87-2561-340a8719521c@acm.org>
Date:   Wed, 15 Mar 2023 09:51:23 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Yu Kuai <yukuai1@...weicloud.com>, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, hare@...e.de, axboe@...nel.dk,
        sconnor@...estorage.com, michael.christie@...cle.com,
        brian@...estorage.com, yukuai3@...wei.com
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        yi.zhang@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH -next] scsi: scsi_dh_alua: fix memleak for 'qdata' in
 alua_activate()

On 3/14/23 23:21, Yu Kuai wrote:
> diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
> index 362fa631f39b..a226dc1b65d7 100644
> --- a/drivers/scsi/device_handler/scsi_dh_alua.c
> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c
> @@ -1145,10 +1145,12 @@ static int alua_activate(struct scsi_device *sdev,
>   	rcu_read_unlock();
>   	mutex_unlock(&h->init_mutex);
>   
> -	if (alua_rtpg_queue(pg, sdev, qdata, true))
> +	if (alua_rtpg_queue(pg, sdev, qdata, true)) {
>   		fn = NULL;
> -	else
> +	} else {
> +		kfree(qdata);
>   		err = SCSI_DH_DEV_OFFLINED;
> +	}
>   	kref_put(&pg->kref, release_port_group);
>   out:
>   	if (fn)

Reviewed-by: Bart Van Assche <bvanassche@....org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ