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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 06 Jan 2014 17:18:19 +0100
From:	Daniel Borkmann <dborkman@...hat.com>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
CC:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: netdev_kobject_init: annotate with __init

On 01/06/2014 04:13 PM, Sergei Shtylyov wrote:
> Hello.
>
> On 06-01-2014 4:20, Daniel Borkmann wrote:
>
>> netdev_kobject_init() is only being called from __init context,
>> that is, net_dev_init(), so annotate it with __init as well, thus
>> the kernel can take this as a hint that the function is used only
>> during the initialization phase and free up used memory resources
>> after its invocation.
>
>> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
> [...]
>
>> diff --git a/net/core/net-sysfs.h b/net/core/net-sysfs.h
>> index bd7751e..2745a1b 100644
>> --- a/net/core/net-sysfs.h
>> +++ b/net/core/net-sysfs.h
>> @@ -1,7 +1,7 @@
>>   #ifndef __NET_SYSFS_H__
>>   #define __NET_SYSFS_H__
>>
>> -int netdev_kobject_init(void);
>> +int __init netdev_kobject_init(void);
>
>     There's no need to also annotate function prototype.

Hm, is that general convention? Having this in a header file
annotated (even if not strictly necessary) would probably
better prevent from possible misuse resp. section mismatches
if people forget to look into the actual c file where the
function is being defined.

> WBR, Sergei
>
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ