• Colin Cross's avatar
    freezer: add unsafe versions of freezable helpers for NFS · ac88fa16
    Colin Cross authored
    
    
    NFS calls the freezable helpers with locks held, which is unsafe
    and will cause lockdep warnings when 6aa9707 "lockdep: check
    that no locks held at freeze time" is reapplied (it was reverted
    in dbf520a).  NFS shouldn't be doing this, but it has
    long-running syscalls that must hold a lock but also shouldn't
    block suspend.  Until NFS freeze handling is rewritten to use a
    signal to exit out of the critical section, add new *_unsafe
    versions of the helpers that will not run the lockdep test when
    6aa9707 is reapplied, and call them from NFS.
    
    In practice the likley result of holding the lock while freezing
    is that a second task blocked on the lock will never freeze,
    aborting suspend, but it is possible to manufacture a case using
    the cgroup freezer, the lock, and the suspend freezer to create
    a deadlock.  Silencing the lockdep warning here will allow
    problems to be found in other drivers that may have a more
    serious deadlock risk, and prevent new problems from being added.
    
    Change-Id: Ia17d32cdd013a6517bdd5759da900970a4427170
    Signed-off-by: default avatarColin Cross <ccross@android.com>
    Acked-by: default avatarPavel Machek <pavel@ucw.cz>
    Acked-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    ac88fa16
inode.c 48.3 KB