• Frederic Weisbecker's avatar
    mem_class: Drop the bkl from memory_open() · 205153aa
    Frederic Weisbecker authored
    The generic open callback for the mem class devices is "protected" by
    the bkl.
    
    Let's look at the datas manipulated inside memory_open:
    
    - inode and file: safe
    - the devlist: safe because it is constant
    - the memdev classes inside this array are safe too (constant)
    
    After we find out which memdev file operation we need to use, we call
    its open callback. Depending on the targeted memdev, we call either
    open_port() that doesn't manipulate any racy data (just a capable()
    check), or we call nothing.
    
    So it's safe to remove the big kernel lock there.
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <1255113062-5835-1-git-send-email-fweisbec@gmail.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    205153aa
mem.c 19.7 KB