1. 08 Mar, 2017 9 commits
  2. 07 Mar, 2017 29 commits
  3. 06 Mar, 2017 2 commits
    • Eric W. Biederman's avatar
      ucount: Remove the atomicity from ucount->count · 040757f7
      Eric W. Biederman authored
      Always increment/decrement ucount->count under the ucounts_lock.  The
      increments are there already and moving the decrements there means the
      locking logic of the code is simpler.  This simplification in the
      locking logic fixes a race between put_ucounts and get_ucounts that
      could result in a use-after-free because the count could go zero then
      be found by get_ucounts and then be freed by put_ucounts.
      
      A bug presumably this one was found by a combination of syzkaller and
      KASAN.  JongWhan Kim reported the syzkaller failure and Dmitry Vyukov
      spotted the race in the code.
      
      Cc: stable@vger.kernel.org
      Fixes: f6b2db1a ("userns: Make the count of user namespaces per user")
      Reported-by: default avatarJongHwan Kim <zzoru007@gmail.com>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Reviewed-by: default avatarAndrei Vagin <avagin@gmail.com>
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      040757f7
    • Michael Ellerman's avatar
      powerpc: Sort the selects under CONFIG_PPC · a7d2475a
      Michael Ellerman authored
      We have a big list of selects under CONFIG_PPC, and currently they're
      completely unsorted. This means people tend to add new selects at the
      bottom of the list, and so two commits which both add a new select will
      often conflict.
      
      Instead sort it alphabetically. This is nicer in and of itself, but also
      means two commits that add a new select will have a greater chance of
      not conflicting.
      
      Add a note at the top and bottom asking people to keep it sorted.
      
      And while we're here pad out the 'if' expressions to make them stand
      out.
      Suggested-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      a7d2475a