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  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]
Date:   Sat, 25 Nov 2017 07:40:14 +0300
From:   Dan Carpenter <>
        Johannes Berg <>
Subject: Re: [PATCH 2/2] staging: rtl8188eu: Fix private WEXT IOCTL calls

Thanks for doing this.

This needs to be folded in with the earlier patch you send and then
resend it as a V2 patch.

I added Johannes to the CC list again because this is sort of his
fault...  To be honest, I'm a little bit puzzled.  I would have thought
Johannes's change would have made some code unused and that we could
delete it now.  I haven't looked at this.

> -	if (ret == 0 && (copy_to_user(wrqu->data.pointer, param, wrqu->data.length)))
> +	if (pmlmepriv->htpriv.ht_option == false)
> +		psta->htpriv.ht_option = false;
> +
> +	update_sta_info_apmode(padapter, psta);
> +
> +	ret = 0;
> +
> +	if (copy_to_user(wrqu->data.pointer, param, wrqu->data.length))
>  		ret = -EFAULT;
> -	return ret;
> +	err_free_param:
> +		kfree(param);
> +		return ret;
>  }

Please keep the success path and failure paths separate like I did in
the example code that I wrote in my email.  Don't indent the labels.  It
should look like this:

	update_sta_info_apmode(padapter, psta);

	if (copy_to_user(wrqu->data.pointer, param, wrqu->data.length)) {
		ret = -EFAULT;
		goto err_free_param;

	return 0;

	return ret;

dan carpenter

Powered by blists - more mailing lists