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:	Tue, 18 Oct 2011 18:57:24 +0200
From:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	sameo@...ux.intel.com, peter.ujfalusi@...com,
	aghayal@...eaurora.org, david@...deman.nu, Shubhrajyoti@...com,
	saaguirre@...com, jic23@....ac.uk, hemanthv@...com,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCHv3 6/7] input/cma3000_d0x: Unwind reverse order of init

Hello Dmitry

 You are right, and also could be a good idea to init the irq, only
after the input device has been registered. Dont you think so?

  Thanks

On Tue, Oct 18, 2011 at 18:53, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> On Tuesday, October 18, 2011 08:48:05 AM Ricardo Ribalda Delgado wrote:
>> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
>> ---
>>  drivers/input/misc/cma3000_d0x.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/input/misc/cma3000_d0x.c
>> b/drivers/input/misc/cma3000_d0x.c index bbda34c..96a46d4 100644
>> --- a/drivers/input/misc/cma3000_d0x.c
>> +++ b/drivers/input/misc/cma3000_d0x.c
>> @@ -459,8 +459,8 @@ EXPORT_SYMBOL(cma3000_init);
>>
>>  void cma3000_exit(struct cma3000_accl_data *data)
>>  {
>> -     free_irq(data->irq, data);
>>       input_unregister_device(data->input_dev);
>> +     free_irq(data->irq, data);
>>       kfree(data);
>>  }
>>  EXPORT_SYMBOL(cma3000_exit);
>
> No, the original is much safer. Unless you 110% sure you won't get
> an interrupt between unregistering device (which is most likely
> will free the associated data structure) and freeing irq it is
> better to leave it as is.
>
> Thanks.
>
> --
> Dmitry
>



-- 
Ricardo Ribalda
--
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