1. 14 Apr, 2014 30 commits
  2. 03 Apr, 2014 7 commits
  3. 31 Mar, 2014 3 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.4.85 · 72cb2a7f
      Greg Kroah-Hartman authored
      72cb2a7f
    • Konstantin Khlebnikov's avatar
      ipc/msg: fix race around refcount · 79dd68bf
      Konstantin Khlebnikov authored
      [fixed differently in 6062a8dc upstream.]
      
      In older kernels (before v3.10) ipc_rcu_hdr->refcount was non-atomic int.
      There was possuble double-free bug: do_msgsnd() calls ipc_rcu_putref() under
      msq->q_perm->lock and RCU, while freequeue() calls it while it holds only
      'rw_mutex', so there is no sinchronization between them. Two function
      decrements '2' non-atomically, they both can get '0' as result.
      
      do_msgsnd()					freequeue()
      
      msq = msg_lock_check(ns, msqid);
      ...
      ipc_rcu_getref(msq);
      msg_unlock(msq);
      schedule();
      						(caller locks spinlock)
      						expunge_all(msq, -EIDRM);
      						ss_wakeup(&msq->q_senders, 1);
      						msg_rmid(ns, msq);
      						msg_unlock(msq);
      ipc_lock_by_ptr(&msq->q_perm);
      ipc_rcu_putref(msq);				ipc_rcu_putref(msq);
      < both may get get --(...)->refcount == 0 >
      
      This patch locks ipc_lock and RCU around ipc_rcu_putref in freequeue.
      ( RCU protects memory for spin_unlock() )
      
      Similar bugs might be in other users of ipc_rcu_putref().
      
      In the mainline this has been fixed in v3.10 indirectly in commmit
      6062a8dc
      ("ipc,sem: fine grained locking for semtimedop") by Rik van Riel.
      That commit optimized locking and converted refcount into atomic.
      
      I'm not sure that anybody should care about this bug: it's very-very unlikely
      and no longer exists in actual mainline. I've found this just by looking into
      the code, probably this never happens in real life.
      Signed-off-by: default avatarKonstantin Khlebnikov <k.khlebnikov@samsung.com>
      79dd68bf
    • Sarah Sharp's avatar
      xhci: Fix resume issues on Renesas chips in Samsung laptops · ebaacf5c
      Sarah Sharp authored
      commit 1aa9578c upstream.
      
      Don Zickus <dzickus@redhat.com> writes:
      
      Some co-workers of mine bought Samsung laptops that had mostly usb3 ports.
      Those ports did not resume correctly (the driver would timeout communicating
      and fail).  This led to frustration as suspend/resume is a common use for
      laptops.
      
      Poking around, I applied the reset on resume quirk to this chipset and the
      resume started working.  Reloading the xhci_hcd module had been the temporary
      workaround.
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: default avatarDon Zickus <dzickus@redhat.com>
      Tested-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ebaacf5c