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:	Wed, 20 Jun 2007 13:29:14 -0700
From:	Roland Dreier <rdreier@...co.com>
To:	Jack Stone <jack@...keye.stone.uk.eu.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Spinlock init

 > can rwlock_init and spin_lock_init be used outside of functions declared
 > __init. The spinlock documentation suggests that it can't but I'd like
 > someone to confirm that.

Those function can be used in any function.  A function is declared
__init if it only runs during the kernel startup, so that the memory
holding the code for __init functions can be freed once startup is
done.  However, spin_lock_init() is just used to initialize a freshly
allocated spinlock, and spinlocks may be allocated at any time, even
long after the kernel is done starting up.  A quick look throught
kernel source code will show many, many examples where
spin_lock_init(), rwlock_init(), mutex_init(), etc. are called from
non-__init functions.


 - R.
-
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