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: <20220411103312.GX3293@kadam>
Date:   Mon, 11 Apr 2022 13:33:12 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Vihas Makwana <makvihas@...il.com>
Cc:     Larry Finger <Larry.Finger@...inger.net>,
        Phillip Potter <phil@...lpotter.co.uk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Michael Straube <straube.linux@...il.com>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Pavel Skripkin <paskripkin@...il.com>
Subject: Re: [PATCH v2 5/7] staging: r8188eu: drop unnecessary wrapper
 _rtw_free_mlme_priv

On Mon, Apr 11, 2022 at 03:51:34PM +0530, Vihas Makwana wrote:
> -void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
> -{
> -
> -	rtw_free_mlme_priv_ie_data(pmlmepriv);
> -
> -	if (pmlmepriv) {
> -		vfree(pmlmepriv->free_bss_buf);
> -	}
> -
> -}
> -
>  struct	wlan_network *_rtw_alloc_network(struct	mlme_priv *pmlmepriv)/* _queue *free_queue) */
>  {
>  	struct	wlan_network	*pnetwork;
> @@ -290,7 +279,11 @@ int rtw_init_mlme_priv(struct adapter *padapter)/* struct	mlme_priv *pmlmepriv)
>  
>  void rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
>  {
> -	_rtw_free_mlme_priv(pmlmepriv);
> +	rtw_free_mlme_priv_ie_data(pmlmepriv);
> +
> +	if (pmlmepriv) {

Not related to your patch, but this check makes no sense.  The
rtw_free_mlme_priv_ie_data() function dereference pmlmepriv
unconditionally so it would have already crashed.


> +		vfree(pmlmepriv->free_bss_buf);
> +	}
>  }

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ