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:	Fri, 20 Jun 2008 02:28:20 +0400
From:	Dmitry <dbaryshkov@...il.com>
To:	"Ivo van Doorn" <ivdoorn@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] RFKILL: fix input layer initialisation

Hi,

2008/6/19 Ivo van Doorn <ivdoorn@...il.com>:
> On Thursday 19 June 2008, Dmitry Baryshkov wrote:
>> Initialise correctly last fields, so tasks can be actually executed
>>
>> Also move rfkill-input initialisation to subsys level so that it's
>> available before generic drivers probing occurs.
>>
>> Signed-off-by: Dmitry Baryshkov <dbaryshkov@...il.com>
>> ---
>>  net/rfkill/rfkill-input.c |    7 ++++++-
>>  1 files changed, 6 insertions(+), 1 deletions(-)
>>
>> diff --git a/net/rfkill/rfkill-input.c b/net/rfkill/rfkill-input.c
>> index e4b051d..e4540fc 100644
>> --- a/net/rfkill/rfkill-input.c
>> +++ b/net/rfkill/rfkill-input.c
>> @@ -181,6 +181,11 @@ static struct input_handler rfkill_handler = {
>>
>>  static int __init rfkill_handler_init(void)
>>  {
>> +     unsigned long last_run = jiffies - msecs_to_jiffies(500);
>> +     rfkill_wlan.last = last_run;
>> +     rfkill_bt.last = last_run;
>> +     rfkill_uwb.last = last_run;
>> +     rfkill_wimax.last = last_run;
>
> I'm not really fan of this approach
> Can't this not be done someway in the DEFINE_RFKILL_TASK macro
> where the entire structure is initialized?
> That way it will automatically be set for all new rfkill task structures later.

IMHO it can't. the jiffies - mset_to_jiffies isn't a constant
initialiser; gcc won't permit such a thing

>
>>       return input_register_handler(&rfkill_handler);
>>  }
>>
>> @@ -190,5 +195,5 @@ static void __exit rfkill_handler_exit(void)
>>       flush_scheduled_work();
>>  }
>>
>> -module_init(rfkill_handler_init);
>> +subsys_initcall(rfkill_handler_init);
>>  module_exit(rfkill_handler_exit);
>
> This sounds good.
>
> Ivo
>



-- 
With best wishes
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists