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]
Date:	Mon, 29 Oct 2007 08:38:08 -0700
From:	"Hohndel, Dirk" <hohndel@...ux.intel.com>
To:	"Dmitry Torokhov" <dmitry.torokhov@...il.com>
Cc:	"Jeff Garzik" <jeff@...zik.org>, "Jiri Kosina" <jikos@...os.cz>,
	linux-input@...ey.karlin.mff.cuni.cz, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] INPUT: fix hidinput_connect ignoring retval from input_register_device


On Oct 29, 2007, at 8:33 AM, Dmitry Torokhov wrote:

> On 10/29/07, Dirk Hohndel <hohndel@...ux.intel.com> wrote:
>>
>> Actually, the more I look at the code that bails when it runs out  
>> of memory,
>> the more I wonder about that.
>>
>>        hidinput = kzalloc(sizeof(*hidinput), GFP_KERNEL);
>>        input_dev = input_allocate_device();
>>        if (!hidinput || !input_dev) {
>>                kfree(hidinput);
>>                input_free_device(input_dev);
>>
>> This either passes a NULL pointer to kfree or to  
>> input_free_device. That's
>> not nice.
>>
>
> No, that's allright. input_free_device() takes after kfree() so that
> it safe to call it with NULL pointer.

Ahh - should have checked that.

Will the rest of the patch work with the call to hidinput_disconnect?  
If yes then
I'll send a cleaned up version that removes the unnecessary checks in  
the case here...

/D	
-
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