Search Linux Wireless

Re: [PATCH resend] airo: return from set_wep_key() when key length is zero

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

 



On Fri, 2010-02-26 at 15:10 +0100, Stanislaw Gruszka wrote:
> Even if keylen == 0 is a bug and should not really happen, better avoid
> possibility of passing bad value to firmware.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>

I actually told John to just apply your first patch via IRC, but perhaps
he hasn't done that yet.  I cannot reproduce the issue that Chris
encountered with my PCMCIA 350 using 5.60 firmware, and I bricked my
card loading 5.40 firmware (same as Chris) onto it.

I couldn't find any failures your original patch on my 5.60 device, my
objections were simply code flow and semantics.  So I'll ack the
original patch.

Dan


> ---
>  drivers/net/wireless/airo.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
> index 2a9f029..01bffc2 100644
> --- a/drivers/net/wireless/airo.c
> +++ b/drivers/net/wireless/airo.c
> @@ -5254,7 +5254,8 @@ static int set_wep_key(struct airo_info *ai, u16 index, const char *key,
>  	WepKeyRid wkr;
>  	int rc;
>  
> -	WARN_ON(keylen == 0);
> +	if (WARN_ON(keylen == 0))
> +		return -1;
>  
>  	memset(&wkr, 0, sizeof(wkr));
>  	wkr.len = cpu_to_le16(sizeof(wkr));


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux