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: <alpine.LNX.2.00.1301281601370.23853@pobox.suse.cz>
Date:	Mon, 28 Jan 2013 16:02:10 +0100 (CET)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Simon Wood <simon@...gewell.org>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	rosegardener@...eode.co.uk
Subject: Re: [PATCH 4/4] USB: HID: SRW-S1 Add support controlling all LEDs
 simultaneously

On Thu, 24 Jan 2013, Simon Wood wrote:

> From: simon <simon@...on-virtual-machine.(none)>
> 
> This patch to the SRW-S1 driver adds the ability to control all
> LEDs simultaneously as testing showed that it was slow (noticably!!)
> when seting or clearing all the LEDs in turn.
> 
> It adds a 'RPMALL' LED, whose behavoir is asserted to all the LEDs in
> the bar graph, individual LEDs can subsequently be turned on/off
> individually.
> 
> Signed-off-by: Simon Wood <simon@...gewell.org>
> tested-by: John Murphy <rosegardener@...eode.co.uk>
[ ... snip ... ]

> @@ -219,13 +255,34 @@ static int srws1_probe(struct hid_device *hdev,
>  
>  	/* register led subsystem */
>  	drv_data->led_state = 0;
> -	for (i = 0; i < SRWS1_NUMBER_LEDS; i++)
> +	for (i = 0; i < SRWS1_NUMBER_LEDS + 1; i++)
>  		drv_data->led[i] = NULL;
>  
>  	srws1_set_leds(hdev, 0);
>  
> -	name_sz = strlen(hdev->uniq) + 15;
> +	name_sz = strlen(hdev->uniq) + 16;
> +
> +	/* 'ALL', for setting all LEDs simultaneously */
> +	led = kzalloc(sizeof(struct led_classdev)+name_sz, GFP_KERNEL);

Is this memory ever freed?

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ