04 Oct, 2011

40 commits

  • Greg Kroah-Hartman
     
  • commit 46724c2e023cb7ba5cd5000dee6481f0a15ebed9 upstream.

    BugLink: http://bugs.launchpad.net/bugs/854468
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    David Henningsson
     
  • commit 777eb1bf15b8532c396821774bf6451e563438f5 upstream.

    A kernel crash is observed when a mounted ext3/ext4 filesystem is
    physically removed. The problem is that blk_cleanup_queue() frees up
    some resources eg by calling elevator_exit(), which are not checked for
    in normal operation. So we should rather move these calls to the
    destructor function blk_release_queue() as at that point all remaining
    references are gone. However, in doing so we have to ensure that any
    externally supplied queue_lock is disconnected as the driver might free
    up the lock after the call of blk_cleanup_queue(),

    Signed-off-by: Hannes Reinecke
    Signed-off-by: Jens Axboe
    Signed-off-by: Greg Kroah-Hartman

    Hannes Reinecke
     
  • commit a0babc80eb375aad69dab4687c3b44c47d42f241 upstream.

    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Shmulik Ravid
     
  • commit f2eaeb58bf6995a979c413ea0cc73289533feacb upstream.

    Use register name to initialize attention mask

    Signed-off-by: Dmitry Kravkov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Dmitry Kravkov
     
  • commit 6c80c39d9a6986a566c30d797aae37bfb697eea3 upstream.

    If iwl_scan_initiate() fails for any reason,
    priv->scan_request and priv->scan_vif are left
    dangling. This can lead to a crash later when
    iwl_bg_scan_completed() tries to run a pending
    scan request.

    In practice, this seems to be very rare due to
    the STATUS_SCANNING check earlier. That check,
    however, is wrong -- it should allow a scan to
    be queued when a reset/roc scan is going on.
    When a normal scan is already going on, a new
    one can't be issued by mac80211, so that code
    can be removed completely. I introduced this
    bug when adding off-channel support in commit
    266af4c745952e9bebf687dd68af58df553cb59d.

    Reported-by: Peng Yan
    Signed-off-by: Johannes Berg
    Signed-off-by: Wey-Yi Guy
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Johannes Berg
     
  • commit 65d0f19e583e80e42b1c67c166bfc4dfdf6ab693 upstream.

    iwlegacy version of fix:

    commit effd4d9aece9184f526e6556786a94d335e38b71
    Author: Johannes Berg
    Date: Thu Sep 15 11:46:52 2011 -0700

    iwlagn: do not use interruptible waits

    Since the dawn of its time, iwlwifi has used
    interruptible waits to wait for synchronous
    commands and firmware loading.

    This leads to "interesting" bugs, because it
    can't actually handle the interruptions; for
    example when a command sending is interrupted
    it will assume the command completed fully,
    and then leave it pending, which leads to all
    kinds of trouble when the command finishes
    later.

    Since there's no easy way to gracefully deal
    with interruptions, fix the driver to not use
    interruptible waits.

    This at least fixes the error
    iwlagn 0000:02:00.0: Error: Response NULL in 'REPLY_SCAN_ABORT_CMD'

    I have seen in P2P testing, but it is likely
    that there are other errors caused by this.

    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Stanislaw Gruszka
     
  • commit 831d85471e761e190c3c8979b37540d699ae5812 upstream.

    Driver rtl8192cu assigns a new struct rtl_tcb_desc object, but fails to
    clear it.

    Signed-off-by: Larry Finger
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Larry Finger
     
  • commit 2e2a41d6ca07d1b2aa67015c35fd80701c98e867 upstream.

    iwlegacy version of fix:

    commit 282cdb325aea4ebbc42ce753b47cc96145eb54bc
    Author: Johannes Berg
    Date: Mon Sep 12 12:09:10 2011 -0700

    iwlagn: fix command queue timeout

    If the command queue is constantly busy,
    which can happen in P2P, the hangcheck
    timer will frequently find a command in
    it and will eventually reset the device
    because nothing sets the timestamp for
    this queue when commands are processed.

    Fix this by setting the timestamp when
    a command completes.

    iwlegacy does not support P2P, but this patch fix possible
    unneeded hardware resets, hence is needed.

    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Stanislaw Gruszka
     
  • commit e9f9530bb697f53dd620df290102359a3325bb23 upstream.

    During the endurance testing, rx frames are not getting DMAd from
    MAC whereas pcu rx frame counters are getting updated properly.
    As per systems team input updated the initval to fix rx dma stuck
    issue.

    Signed-off-by: Rajkumar Manoharan
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Rajkumar Manoharan
     
  • commit 1b9ca0272ffae212e726380f66777b30a56ed7a5 upstream.

    Incorrect variable was used in validating the akm_suites array from
    NL80211_ATTR_AKM_SUITES. In addition, there was no explicit
    validation of the array length (we only have room for
    NL80211_MAX_NR_AKM_SUITES).

    This can result in a buffer write overflow for stack variables with
    arbitrary data from user space. The nl80211 commands using the affected
    functionality require GENL_ADMIN_PERM, so this is only exposed to admin
    users.

    Signed-off-by: Jouni Malinen
    Signed-off-by: John W. Linville
    Signed-off-by: Greg Kroah-Hartman

    Jouni Malinen
     
  • commit 3538a001ea7db13fa1be2966b71f69d808acff01 upstream.

    qla4xxx driver needs to be linked with libiscsi.o to fix
    build errors. This happens when no other drivers that use
    libiscsi.o are enabled.

    ERROR: "iscsi_conn_stop" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_conn_get_addr_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_session_teardown" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_host_alloc" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_conn_start" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_conn_send_pdu" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_session_get_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_conn_get_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_set_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_session_failure" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_complete_pdu" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_session_setup" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_conn_bind" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_conn_setup" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
    ERROR: "iscsi_itt_to_task" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!

    Signed-off-by: Randy Dunlap
    Reviewed-by: Mike Christie
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     
  • commit 24926dadc41cc566e974022b0e66231b82c6375f upstream.

    In an enclosure model where there are chaining expanders to a large body
    of storage, it was discovered that libsas, responding to a broadcast
    event change, would only revalidate the domain of first child expander
    in the list.

    The issue is that the pointer value to the discovered source device was
    used to break out of the loop, rather than the content of the pointer.

    This still remains non-compliant as the revalidate domain code is
    supposed to loop through all child expanders, and not stop at the first
    one it finds that reports a change count. However, the design of this
    routine does not allow multiple device discoveries and that would be a
    more complicated set of patches reserved for another day. We are fixing
    the glaring bug rather than refactoring the code.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Mark Salyzyn
     
  • commit d0efab26f89506387a1bde898556660e06d7eb15 upstream.

    scsi reset on hardware with enabled MSI interrupts generates WARNING message

    [11027.798722] aacraid: Host adapter abort request (0,0,0,0)
    [11027.798814] aacraid: Host adapter reset request. SCSI hang ?
    [11087.762237] aacraid: SCSI bus appears hung
    [11135.082543] ------------[ cut here ]------------
    [11135.082646] WARNING: at drivers/pci/msi.c:658 pci_enable_msi_block+0x251/0x290()

    Signed-off-by: Vasily Averin
    Acked-by: Mark Salyzyn
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Vasily Averin
     
  • commit 96067723e46b0dd24ae7b934085ab4eff4d26a1b upstream.

    Following reports on the list, it looks like the 3e-9xxx driver will leak dma
    mappings every time we get a transient queueing error back from the card.
    This is because it maps the sg list in the routine that sends the command, but
    doesn't unmap again in the transient failure path (even though the command is
    sent back to the block layer). Fix by unmapping before returning the status.

    Reported-by: Chris Boot
    Tested-by: Chris Boot
    Acked-by: Adam Radford
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    James Bottomley
     
  • commit e48f129c2f200dde8899f6ea5c6e7173674fc482 upstream.

    This oops was reported recently:
    d:mon> e
    cpu 0xd: Vector: 300 (Data Access) at [c0000000fd4c7120]
    pc: d00000000076f194: .t3_l2t_get+0x44/0x524 [cxgb3]
    lr: d000000000b02108: .init_act_open+0x150/0x3d4 [cxgb3i]
    sp: c0000000fd4c73a0
    msr: 8000000000009032
    dar: 0
    dsisr: 40000000
    current = 0xc0000000fd640d40
    paca = 0xc00000000054ff80
    pid = 5085, comm = iscsid
    d:mon> t
    [c0000000fd4c7450] d000000000b02108 .init_act_open+0x150/0x3d4 [cxgb3i]
    [c0000000fd4c7500] d000000000e45378 .cxgbi_ep_connect+0x784/0x8e8 [libcxgbi]
    [c0000000fd4c7650] d000000000db33f0 .iscsi_if_rx+0x71c/0xb18
    [scsi_transport_iscsi2]
    [c0000000fd4c7740] c000000000370c9c .netlink_data_ready+0x40/0xa4
    [c0000000fd4c77c0] c00000000036f010 .netlink_sendskb+0x4c/0x9c
    [c0000000fd4c7850] c000000000370c18 .netlink_sendmsg+0x358/0x39c
    [c0000000fd4c7950] c00000000033be24 .sock_sendmsg+0x114/0x1b8
    [c0000000fd4c7b50] c00000000033d208 .sys_sendmsg+0x218/0x2ac
    [c0000000fd4c7d70] c00000000033f55c .sys_socketcall+0x228/0x27c
    [c0000000fd4c7e30] c0000000000086a4 syscall_exit+0x0/0x40

    Neil Horman
     
  • commit 4508378b9523e22a2a0175d8bf64d932fb10a67d upstream.

    Commit 246e87a93934 ("memcg: fix get_scan_count() for small targets")
    fixes the memcg/kswapd behavior against small targets and prevent vmscan
    priority too high.

    But the implementation is too naive and adds another problem to small
    memcg. It always force scan to 32 pages of file/anon and doesn't handle
    swappiness and other rotate_info. It makes vmscan to scan anon LRU
    regardless of swappiness and make reclaim bad. This patch fixes it by
    adjusting scanning count with regard to swappiness at el.

    At a test "cat 1G file under 300M limit." (swappiness=20)
    before patch
    scanned_pages_by_limit 360919
    scanned_anon_pages_by_limit 180469
    scanned_file_pages_by_limit 180450
    rotated_pages_by_limit 31
    rotated_anon_pages_by_limit 25
    rotated_file_pages_by_limit 6
    freed_pages_by_limit 180458
    freed_anon_pages_by_limit 19
    freed_file_pages_by_limit 180439
    elapsed_ns_by_limit 429758872
    after patch
    scanned_pages_by_limit 180674
    scanned_anon_pages_by_limit 24
    scanned_file_pages_by_limit 180650
    rotated_pages_by_limit 35
    rotated_anon_pages_by_limit 24
    rotated_file_pages_by_limit 11
    freed_pages_by_limit 180634
    freed_anon_pages_by_limit 0
    freed_file_pages_by_limit 180634
    elapsed_ns_by_limit 367119089
    scanned_pages_by_system 0

    the numbers of scanning anon are decreased(as expected), and elapsed time
    reduced. By this patch, small memcgs will work better.
    (*) Because the amount of file-cache is much bigger than anon,
    recalaim_stat's rotate-scan counter make scanning files more.

    Signed-off-by: KAMEZAWA Hiroyuki
    Cc: Daisuke Nishimura
    Cc: Michal Hocko
    Cc: Ying Han
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    KAMEZAWA Hiroyuki
     
  • commit 61a6a108d15213f5ee06332e1e7766d3860e4453 upstream.

    Before clearing the probing flag in the error exit path, check that the
    chip pointer is not NULL.

    Signed-off-by: Thomas Pfaff
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pfaff
     
  • commit 6656b15d675c9c6a049db48d50994b3cd4e76bd6 upstream.

    This patch is necessary to make internal speakers work on this chip.

    BugLink: http://bugs.launchpad.net/bugs/854468
    Tested-by: Alex Wolfson
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    David Henningsson
     
  • commit 5fe6e0151dbd969f5fbcd94d05c968b76d76952b upstream.

    When the headphone pin is assigned as primary output to line_out_pins[],
    the automatic HP-pin assignment by ASSID must be suppressed. Otherwise
    a wrong pin might be assigned to the headphone and breaks the auto-mute.

    Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104

    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 9058020cd9ae3423d6fe7de591698dc96b6701aa upstream.

    Currently the the internal oscillator is powered down when entering BIAS_OFF
    state, but not re-enabled when going back to BIAS_STANDBY. As a result the
    CODEC will stop working after suspend if the internal oscillator is used to
    generate the sysclock signal. This patch fixes it by clearing the appropriate
    bit in the power down register when the CODEC is re-enabled.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Lars-Peter Clausen
     
  • commit 34c869855a28af3c6031d29e2267b5a3cce0d67d upstream.

    Attempt to change McBSP CLKS source while another stream is active is not
    safe after commit d135865 ("OMAP: McBSP: implement functional clock
    switching via clock framework") in 2.6.37.

    CLKS parent clock switching using clock framework have to idle the McBSP
    before switching and then activate it again. This short break can cause a
    DMA transaction error to already running stream which halts and recovers
    only by closing and restarting the stream.

    This goes more fatal after commit e2fa61d ("OMAP3: l3: Introduce
    l3-interconnect error handling driver") in 2.6.39 where l3 driver detects a
    severe timeout error and does BUG_ON().

    Fix this by not changing any configuration in omap_mcbsp_dai_set_dai_sysclk
    if the McBSP is already active. This test should have been here just from
    the beginning anyway.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Jarkko Nikula
     
  • commit caca9510ff4e5d842c0589110243d60927836222 upstream.

    In commit a144c6a6c924 ("PM: Print a warning if firmware is requested
    when tasks are frozen") we not only printed a warning if somebody tried
    to load the firmware when tasks are frozen - we also failed the load.

    But that check was done before the check for built-in firmware, and then
    when we disallowed usermode helpers during bootup (commit 288d5abec831:
    "Boot up with usermodehelper disabled"), that actually means that
    built-in modules can no longer load their firmware even if the firmware
    is built in too. Which used to work, and some people depended on it for
    the R100 driver.

    So move the test for usermodehelper_is_disabled() down, to after
    checking the built-in firmware.

    This should fix:

    https://bugzilla.kernel.org/show_bug.cgi?id=40952

    Reported-by: James Cloos
    Bisected-by: Elimar Riesebieter
    Cc: Michel Dänzer
    Cc: Rafael Wysocki
    Cc: Greg Kroah-Hartman
    Cc: Valdis Kletnieks
    Signed-off-by: Linus Torvalds
    Cc: Borislav Petkov
    Cc: Lucas Villa Real
    Signed-off-by: Greg Kroah-Hartman

    Linus Torvalds
     
  • commit df77abcafc8dc881b6c9347548651777088e4b27 upstream.

    The SMP implementation of __futex_atomic_op clobbers oldval with the
    status flag from the exclusive store. This causes it to always read as
    zero when performing the FUTEX_OP_CMP_* operation.

    This patch updates the ARM __futex_atomic_op implementations to take a
    tmp argument, allowing us to store the strex status flag without
    overwriting the register containing oldval.

    Reported-by: Minho Ban
    Reviewed-by: Nicolas Pitre
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Will Deacon
     
  • commit f630c1bdfbf8fe423325beaf60027cfc7fd7c610 upstream.

    This patch implements a workaround for erratum 764369 affecting
    Cortex-A9 MPCore with two or more processors (all current revisions).
    Under certain timing circumstances, a data cache line maintenance
    operation by MVA targeting an Inner Shareable memory region may fail to
    proceed up to either the Point of Coherency or to the Point of
    Unification of the system. This workaround adds a DSB instruction before
    the relevant cache maintenance functions and sets a specific bit in the
    diagnostic control register of the SCU.

    Signed-off-by: Will Deacon
    Signed-off-by: Catalin Marinas
    Tested-by: Mark Rutland
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Will Deacon
     
  • commit d8e89b47e00ee80e920761145144640aac4cf71a upstream.

    If the attempt to map a page for DMA fails (eg, because we're out of
    mapping space) then we must not hold on to the page we allocated for
    DMA - doing so will result in a memory leak.

    Reported-by: Bryan Phillippe
    Tested-by: Bryan Phillippe
    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     
  • commit cc41d586e8b4d76164fe7731c1c49be6cc5fc7e6 upstream.

    Signed (negative) temperatures were not handled correctly.

    Signed-off-by: Roland Stigge
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Roland Stigge
     
  • commit b5a95fe7ef464a67fab6ff870aa740739e788f90 upstream.

    Do not set io_req->sc_cmd to NULL until bnx2fc_unmap_sg_list() is called to
    enable it to unmap the DMA mappings.

    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • commit d36b3279e157641c345b12eddb3db78fb42da80f upstream.

    Deleting NPIV port causes a kernel panic when the NPIV port is in the same zone
    as the physical port and shares the same LUN. This happens due to the fact that
    vport destroy and unsolicited ELS are scheduled to run on the same workqueue,
    and vport destroy destroys the lport and the unsolicited ELS tries to access
    the invalid lport. This patch fixes this issue by maintaining a list of valid
    lports and verifying if the lport is valid or not before accessing it.

    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: James Bottomley
    Signed-off-by: Greg Kroah-Hartman

    Bhanu Prakash Gollapudi
     
  • commit 7625eb2f2fff7bfae41d3119b472c20b48874895 upstream.

    Based on earlier patch from Neil Horman

    If iSCSI is not supported on a bnx2 device, bnx2_cnic_probe() will
    return NULL and the cnic device will not be visible to bnx2i. This
    will prevent bnx2i from registering and then unregistering during
    cnic_start() and cause the warning message:

    bnx2 0003:01:00.1: eth1: Failed waiting for ULP up call to complete

    Signed-off-by: Michael Chan
    Cc: Neil Horman
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Michael Chan
     
  • commit db1d350fcb156b58f66a67680617077bcacfe6fc upstream.

    During NETDEV_UP, we use symbol_get() to get the net driver's cnic
    probe function. This sometimes doesn't work if NETDEV_UP happens
    right after NETDEV_REGISTER and the net driver is still running module
    init code. As a result, the cnic device may not be discovered. We
    fix this by probing on all NETDEV events if the device's netif_running
    state is up.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Michael Chan
     
  • commit 11f23aa8ccd56786f0a6f04211cf59b3fab2ce08 upstream.

    This reduces the likelihood of port re-use when re-loading the driver.

    Signed-off-by: Eddie Wai
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Eddie Wai
     
  • commit 101c40c8cb0d10c30f423805f9f5b7a75956832d upstream.

    During iSCSI connection terminations, if the target is also terminating
    at about the same time, the firmware may not complete the driver's
    request to close or reset the connection. This is fixed by handling
    other events (instead of the expected completion event) as an indication
    that the driver's request has been rejected.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Michael Chan
     
  • commit 93736656138e6d2f39f19c1d68f9ef81cfc9dd66 upstream.

    We need to keep looping until cnic_get_kcqes() returns 0. cnic_get_kcqes()
    returns a maximum of 64 entries. If there are more entries in the queue
    and we don't loop back, the remaining entries may not be serviced for a
    long time.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Michael Chan
     
  • commit 3765fefaee2da83f10829fa64a74e6b7360350cb upstream.

    Since the d_off in the first dirent for "." (that originates from
    the 4th argument "offset" of filldir() for the 2nd dirent for "..")
    is wrongly assigned in btrfs_real_readdir(), telldir returns same
    offset for different locations.

    | # mkfs.btrfs /dev/sdb1
    | # mount /dev/sdb1 fs0
    | # cd fs0
    | # touch file0 file1
    | # ../test
    | telldir: 0
    | readdir: d_off = 2, d_name = "."
    | telldir: 2
    | readdir: d_off = 2, d_name = ".."
    | telldir: 2
    | readdir: d_off = 3, d_name = "file0"
    | telldir: 3
    | readdir: d_off = 2147483647, d_name = "file1"
    | telldir: 2147483647

    To fix this problem, pass filp->f_pos (which is loff_t) instead.

    | # ../test
    | telldir: 0
    | readdir: d_off = 1, d_name = "."
    | telldir: 1
    | readdir: d_off = 2, d_name = ".."
    | telldir: 2
    | readdir: d_off = 3, d_name = "file0"
    :

    At the moment the "offset" for "." is unused because there is no
    preceding dirent, however it is better to pass filp->f_pos to follow
    grammatical usage.

    Signed-off-by: Hidetoshi Seto
    Signed-off-by: Chris Mason
    Cc: Grazvydas Ignotas
    Signed-off-by: Greg Kroah-Hartman

    Hidetoshi Seto
     
  • commit c37279b92aba2893578f61076cd2eef5c5fa0e99 upstream.

    Commit 9676001559fce06e37c7dc230ab275f605556176
    ("ALSA: fm801: add error handling if auto-detect fails") seems to
    break systems that were previously working without a tuner.

    As a bonus, this should fix init and cleanup for the case where the
    tuner is explicitly disabled.

    Reported-and-tested-by: Hor Jiun Shyong
    References: http://bugs.debian.org/641946
    Signed-off-by: Ben Hutchings
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     
  • commit 2ba34e43ba0469086d1ff81c13a9aa9070c1a0e1 upstream.

    Commit 9676001559fce06e37c7dc230ab275f605556176
    ("ALSA: fm801: add error handling if auto-detect fails") added
    incorrect error handling.

    Once we have successfully called snd_device_new(), the cleanup
    function fm801_free() will automatically be called by snd_card_free()
    and we must *not* also call fm801_free() directly.

    Reported-by: Hor Jiun Shyong
    References: http://bugs.debian.org/641946
    Signed-off-by: Ben Hutchings
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Ben Hutchings
     
  • commit fdfc61594e6de21c23f955818ef78bcab9bafe40 upstream.

    DVOOutputControl checks the value of of bios scratch reg 3
    on some tables and assumes the encoder is already enabled
    if the DFP2_ACTIVE bit is set. Clear that bit so the table
    sets the DDIA enable bit properly.

    Signed-off-by: Alex Deucher
    Signed-off-by: Dave Airlie
    Signed-off-by: Greg Kroah-Hartman

    Alex Deucher
     
  • commit 362e4e49abe53e89d87455dfcd7c1bbaf08a839d upstream.

    The Terratec Aureon 5.1 USB sound card support is broken since kernel
    2.6.39.
    2.6.39 introduced power management support for USB sound cards that added
    a probing flag in struct snd_usb_audio.

    During the probe of the card it gives following error message :

    usb 7-2: new full speed USB device number 2 using uhci_hcd
    cannot find UAC_HEADER
    snd-usb-audio: probe of 7-2:1.3 failed with error -5
    input: USB Audio as
    /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.3/input/input6
    generic-usb 0003:0CCD:0028.0001: input: USB HID v1.00 Device [USB Audio]
    on usb-0000:00:1d.1-2/input3

    I can not comment about that "cannot find UAC_HEADER" error, but until
    2.6.38 the card worked anyway.
    With 2.6.39 chip->probing remains 1 on error exit, and any later ioctl
    stops in snd_usb_autoresume with -ENODEV.

    Signed-off-by: Thomas Pfaff
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Thomas Pfaff
     
  • commit adb091846318f86e4f46c7d6a7b40d2f478abdbe upstream.

    64bit PowerPC debuginfo files have an empty function descriptor section.
    I hit a SEGV when perf tried to use this section for symbol resolution.

    To fix this we need to check the section is valid and we can do this by
    checking for type SHT_PROGBITS.

    Cc:
    Cc: Ingo Molnar
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Eric B Munson
    Link: http://lkml.kernel.org/r/20110824065242.895239970@samba.org
    Signed-off-by: Anton Blanchard
    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: Greg Kroah-Hartman

    Anton Blanchard