[lkml]   [2012]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] selinux: init target class when add avc callback
    On Tue, 06 Mar 2012 19:41:33 -0500
    Eric Paris <> wrote:

    > __initcall() functions aren't serialized? I guess that would be bad and
    > we would need a lock. I wonder if there are other places I assumed
    > __initcall() would be serialized (note that all of these call sites are
    > built in and not modules if that makes a difference)

    There's plenty of code in the kernel which assumes that initcalls
    are singly-threaded. And init/main.c:do_initcalls() is very
    singly-threaded! It's less clear when the initcall is executed by
    modprobe, but presumably there's something in the module code which
    prevents concurrent execution of module_init() functions.

    So I think the list management code is acceptable, as long as we ensure
    that the function is only ever called from initcall functions. We can
    add a comment, but a neat way of ensuring this is to mark the function
    __init. This saves memory and will cause a build-time warning if we
    screw up.

    My point was that given that this function is only ever called from
    initcalls, that weak GFP_ATOMIC could/should be replaced with

     \ /
      Last update: 2012-03-07 01:51    [W:0.018 / U:4.092 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site