1. 15 May, 2014 33 commits
  2. 09 May, 2014 2 commits
    • Nicholas Bellinger's avatar
      iser-target: Add missing se_cmd put for WRITE_PENDING in tx_comp_err · 1c5c8ceb
      Nicholas Bellinger authored
      commit 03e7848a upstream.
      
      This patch fixes a bug where outstanding RDMA_READs with WRITE_PENDING
      status require an extra target_put_sess_cmd() in isert_put_cmd() code
      when called from isert_cq_tx_comp_err() + isert_cq_drain_comp_llist()
      context during session shutdown.
      
      The extra kref PUT is required so that transport_generic_free_cmd()
      invokes the last target_put_sess_cmd() -> target_release_cmd_kref(),
      which will complete(&se_cmd->cmd_wait_comp) the outstanding se_cmd
      descriptor with WRITE_PENDING status, and awake the completion in
      target_wait_for_sess_cmds() to invoke TFO->release_cmd().
      
      The bug was manifesting itself in target_wait_for_sess_cmds() where
      a se_cmd descriptor with WRITE_PENDING status would end up sleeping
      indefinately.
      
      (Fix up v3.12.y context changes - nab)
      Acked-by: default avatarSagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: <stable@vger.kernel.org> #3.10+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      1c5c8ceb
    • Nicholas Bellinger's avatar
      iser-target: Match FRMR descriptors to available session tags · ce2a2e7f
      Nicholas Bellinger authored
      commit f46d6a8a upstream.
      
      This patch changes isert_conn_create_fastreg_pool() to follow
      logic in iscsi_target_locate_portal() for determining how many
      FRMR descriptors to allocate based upon the number of possible
      per-session command slots that are available.
      
      This addresses an OOPs in isert_reg_rdma() where due to the
      use of ISCSI_DEF_XMIT_CMDS_MAX could end up returning a bogus
      fast_reg_descriptor when the number of active tags exceeded
      the original hardcoded max.
      
      Note this also includes moving isert_conn_create_fastreg_pool()
      from isert_connect_request() to isert_put_login_tx() before
      posting the final Login Response PDU in order to determine the
      se_nacl->queue_depth (eg: number of tags) per session the target
      will be enforcing.
      
      v2 changes:
        - Move isert_conn->conn_fr_pool list_head init into
          isert_conn_request()
      v3 changes:
        - Drop unnecessary list_empty() check in isert_reg_rdma()
          (Sagi)
      
      (Fix up v3.12.y context changes - nab)
      
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: <stable@vger.kernel.org> #3.12+
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      ce2a2e7f
  3. 05 May, 2014 5 commits
    • Hui Wang's avatar
      ALSA: hda - automute via amp instead of pinctl on some AIO models · 5c9b463c
      Hui Wang authored
      commit 493a52a9 upstream.
      
      On some AIO (All In One) models with the codec alc668
      (Vendor ID: 0x10ec0668) on it, when we plug a headphone into the jack,
      the system will switch the output to headphone and set the speaker to
      automute as well as change the speaker Pin-ctls from 0x40 to 0x00,
      this will bring loud noise to the headphone.
      
      I tried to disable the corresponding EAPD, but it did not help to
      eliminate the noise.
      
      According to Takashi's suggestion, we use amp operation to replace the
      pinctl modification for the automute, this really eliminate the noise.
      
      BugLink: https://bugs.launchpad.net/bugs/1268468
      Cc: David Henningsson <david.henningsson@canonical.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      5c9b463c
    • Bart Van Assche's avatar
      dlm: Avoid that dlm_release_lockspace() incorrectly returns -EBUSY · 7aa1bde8
      Bart Van Assche authored
      commit a97f4a66 upstream.
      
      When dlm_release_lockspace(ls, 1) is invoked on a busy system
      immediately after the last dlm_unlock() AST has finished it can occur
      that lkb_idr_is_local() is invoked for the unlocked LKB since removal
      from ls_lkbidr only occurs after the AST has returned. If that happens
      dlm_release_lockspace(ls, 1) will return -EBUSY instead of releasing
      the lockspace. Fix this race condition by changing lkb_idr_is_local()
      such that it only returns true for LKB's that have not yet been
      unlocked.
      Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      7aa1bde8
    • Jiri Slaby's avatar
      Linux 3.12.19 · 3756888c
      Jiri Slaby authored
      3756888c
    • Oleg Nesterov's avatar
      exit: call disassociate_ctty() before exit_task_namespaces() · 61fae6df
      Oleg Nesterov authored
      commit c39df5fa upstream.
      
      Commit 8aac6270 ("move exit_task_namespaces() outside of
      exit_notify()") breaks pppd and the exiting service crashes the kernel:
      
          BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
          IP: ppp_register_channel+0x13/0x20 [ppp_generic]
          Call Trace:
            ppp_asynctty_open+0x12b/0x170 [ppp_async]
            tty_ldisc_open.isra.2+0x27/0x60
            tty_ldisc_hangup+0x1e3/0x220
            __tty_hangup+0x2c4/0x440
            disassociate_ctty+0x61/0x270
            do_exit+0x7f2/0xa50
      
      ppp_register_channel() needs ->net_ns and current->nsproxy == NULL.
      
      Move disassociate_ctty() before exit_task_namespaces(), it doesn't make
      sense to delay it after perf_event_exit_task() or cgroup_exit().
      
      This also allows to use task_work_add() inside the (nontrivial) code
      paths in disassociate_ctty().
      
      Investigated by Peter Hurley.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Reported-by: default avatarSree Harsha Totakura <sreeharsha@totakura.in>
      Cc: Peter Hurley <peter@hurleysoftware.com>
      Cc: Sree Harsha Totakura <sreeharsha@totakura.in>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andrey Vagin <avagin@openvz.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      61fae6df
    • Oleg Nesterov's avatar
      wait: fix reparent_leader() vs EXIT_DEAD->EXIT_ZOMBIE race · f3e9310e
      Oleg Nesterov authored
      commit dfccbb5e upstream.
      
      wait_task_zombie() first does EXIT_ZOMBIE->EXIT_DEAD transition and
      drops tasklist_lock.  If this task is not the natural child and it is
      traced, we change its state back to EXIT_ZOMBIE for ->real_parent.
      
      The last transition is racy, this is even documented in 50b8d257
      "ptrace: partially fix the do_wait(WEXITED) vs EXIT_DEAD->EXIT_ZOMBIE
      race".  wait_consider_task() tries to detect this transition and clear
      ->notask_error but we can't rely on ptrace_reparented(), debugger can
      exit and do ptrace_unlink() before its sub-thread sets EXIT_ZOMBIE.
      
      And there is another problem which were missed before: this transition
      can also race with reparent_leader() which doesn't reset >exit_signal if
      EXIT_DEAD, assuming that this task must be reaped by someone else.  So
      the tracee can be re-parented with ->exit_signal != SIGCHLD, and if
      /sbin/init doesn't use __WALL it becomes unreapable.
      
      Change reparent_leader() to update ->exit_signal even if EXIT_DEAD.
      Note: this is the simple temporary hack for -stable, it doesn't try to
      solve all problems, it will be reverted by the next changes.
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Reported-by: default avatarJan Kratochvil <jan.kratochvil@redhat.com>
      Reported-by: default avatarMichal Schmidt <mschmidt@redhat.com>
      Tested-by: default avatarMichal Schmidt <mschmidt@redhat.com>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Cc: Lennart Poettering <lpoetter@redhat.com>
      Cc: Roland McGrath <roland@hack.frob.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      f3e9310e