1. 10 Oct, 2012 37 commits
    • Nestor Lopez Casado's avatar
      HID: logitech: fix mask to enable DJ mode · b66c949a
      Nestor Lopez Casado authored
      commit 76503166 upstream.
      
      The user can only experience the bug if she pairs 6 devices to a Unifying
      receiver. The sixth paired device would not work.
      
      The value changed is actually a bitmask that enables reporting from each
      paired device. As the sixth bit was not set, the sixth device reports are
      ignored by the receiver and never get to the driver.
      Signed-off-by: default avatarNestor Lopez Casado <nlopezcasad@logitech.com>
      
       drivers/hid/hid-logitech-dj.c |    2 +-
       1 files changed, 1 insertions(+), 1 deletions(-)
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b66c949a
    • Marc Kleine-Budde's avatar
      can: ti_hecc: fix oops during rmmod · 3d66356b
      Marc Kleine-Budde authored
      commit ab04c8bd upstream.
      
      This patch fixes an oops which occurs when unloading the driver, while the
      network interface is still up. The problem is that first the io mapping is
      teared own, then the CAN device is unregistered, resulting in accessing the
      hardware's iomem:
      
      [  172.744232] Unable to handle kernel paging request at virtual address c88b0040
      [  172.752441] pgd = c7be4000
      [  172.755645] [c88b0040] *pgd=87821811, *pte=00000000, *ppte=00000000
      [  172.762207] Internal error: Oops: 807 [#1] PREEMPT ARM
      [  172.767517] Modules linked in: ti_hecc(-) can_dev
      [  172.772430] CPU: 0    Not tainted  (3.5.0alpha-00037-g3554cc0 #126)
      [  172.778961] PC is at ti_hecc_close+0xb0/0x100 [ti_hecc]
      [  172.784423] LR is at __dev_close_many+0x90/0xc0
      [  172.789123] pc : [<bf00c768>]    lr : [<c033be58>]    psr: 60000013
      [  172.789123] sp : c5c1de68  ip : 00040081  fp : 00000000
      [  172.801025] r10: 00000001  r9 : c5c1c000  r8 : 00100100
      [  172.806457] r7 : c5d0a48c  r6 : c5d0a400  r5 : 00000000  r4 : c5d0a000
      [  172.813232] r3 : c88b0000  r2 : 00000001  r1 : c5d0a000  r0 : c5d0a000
      [  172.820037] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      [  172.827423] Control: 10c5387d  Table: 87be4019  DAC: 00000015
      [  172.833404] Process rmmod (pid: 600, stack limit = 0xc5c1c2f0)
      [  172.839447] Stack: (0xc5c1de68 to 0xc5c1e000)
      [  172.843994] de60:                   bf00c6b8 c5c1dec8 c5d0a000 c5d0a000 00200200 c033be58
      [  172.852478] de80: c5c1de44 c5c1dec8 c5c1dec8 c033bf2c c5c1de90 c5c1de90 c5d0a084 c5c1de44
      [  172.860992] dea0: c5c1dec8 c033c098 c061d3dc c5d0a000 00000000 c05edf28 c05edb34 c000d724
      [  172.869476] dec0: 00000000 c033c2f8 c5d0a084 c5d0a084 00000000 c033c370 00000000 c5d0a000
      [  172.877990] dee0: c05edb00 c033c3b8 c5d0a000 bf00d3ac c05edb00 bf00d7c8 bf00d7c8 c02842dc
      [  172.886474] df00: c02842c8 c0282f90 c5c1c000 c05edb00 bf00d7c8 c0283668 bf00d7c8 00000000
      [  172.894989] df20: c0611f98 befe2f80 c000d724 c0282d10 bf00d804 00000000 00000013 c0068a8c
      [  172.903472] df40: c5c538e8 685f6974 00636365 c61571a8 c5cb9980 c61571a8 c6158a20 c00c9bc4
      [  172.911987] df60: 00000000 00000000 c5cb9980 00000000 c5cb9980 00000000 c7823680 00000006
      [  172.920471] df80: bf00d804 00000880 c5c1df8c 00000000 000d4267 befe2f80 00000001 b6d90068
      [  172.928985] dfa0: 00000081 c000d5a0 befe2f80 00000001 befe2f80 00000880 b6d90008 00000008
      [  172.937469] dfc0: befe2f80 00000001 b6d90068 00000081 00000001 00000000 befe2eac 00000000
      [  172.945983] dfe0: 00000000 befe2b18 00023ba4 b6e6addc 60000010 befe2f80 a8e00190 86d2d344
      [  172.954498] [<bf00c768>] (ti_hecc_close+0xb0/0x100 [ti_hecc]) from [<c033be58>] (__dev__registered_many+0xc0/0x2a0)
      [  172.984161] [<c033c098>] (rollback_registered_many+0xc0/0x2a0) from [<c033c2f8>] (rollback_registered+0x20/0x30)
      [  172.994750] [<c033c2f8>] (rollback_registered+0x20/0x30) from [<c033c370>] (unregister_netdevice_queue+0x68/0x98)
      [  173.005401] [<c033c370>] (unregister_netdevice_queue+0x68/0x98) from [<c033c3b8>] (unregister_netdev+0x18/0x20)
      [  173.015899] [<c033c3b8>] (unregister_netdev+0x18/0x20) from [<bf00d3ac>] (ti_hecc_remove+0x60/0x80 [ti_hecc])
      [  173.026245] [<bf00d3ac>] (ti_hecc_remove+0x60/0x80 [ti_hecc]) from [<c02842dc>] (platform_drv_remove+0x14/0x18)
      [  173.036712] [<c02842dc>] (platform_drv_remove+0x14/0x18) from [<c0282f90>] (__device_release_driver+0x7c/0xbc)
      
      Cc: Anant Gole <anantgole@ti.com>
      Tested-by: default avatarJan Luebbe <jlu@pengutronix.de>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      3d66356b
    • Ira W. Snyder's avatar
      can: janz-ican3: fix support for older hardware revisions · df186ac1
      Ira W. Snyder authored
      commit e21093ef upstream.
      
      The Revision 1.0 Janz CMOD-IO Carrier Board does not have support for
      the reset registers. To support older hardware, the code is changed to
      use the hardware reset register on the Janz VMOD-ICAN3 hardware itself.
      Signed-off-by: default avatarIra W. Snyder <iws@ovro.caltech.edu>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      df186ac1
    • Wen Congyang's avatar
      tracing: Don't call page_to_pfn() if page is NULL · b72a2bd8
      Wen Congyang authored
      commit 85f2a2ef upstream.
      
      When allocating memory fails, page is NULL. page_to_pfn() will
      cause the kernel panicked if we don't use sparsemem vmemmap.
      
      Link: http://lkml.kernel.org/r/505AB1FF.8020104@cn.fujitsu.com
      
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Acked-by: default avatarMel Gorman <mel@csn.ul.ie>
      Reviewed-by: default avatarMinchan Kim <minchan@kernel.org>
      Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b72a2bd8
    • Anisse Astier's avatar
      Input: i8042 - disable mux on Toshiba C850D · b0162ce5
      Anisse Astier authored
      commit 8669cf67 upstream.
      
      On Toshiba Satellite C850D, the touchpad and the keyboard might randomly
      not work at boot. Preventing MUX mode activation solves this issue.
      Signed-off-by: default avatarAnisse Astier <anisse@astier.eu>
      Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b0162ce5
    • Søren holm's avatar
      asix: Support DLink DUB-E100 H/W Ver C1 · 75c747ec
      Søren holm authored
      commit ed3770a9 upstream.
      Signed-off-by: default avatarSøren Holm <sgh@sgh.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      [bwh: Backported to 3.2: adjust filename]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      75c747ec
    • Konrad Rzeszutek Wilk's avatar
      xen/boot: Disable BIOS SMP MP table search. · 0a193b14
      Konrad Rzeszutek Wilk authored
      commit bd49940a upstream.
      
      As the initial domain we are able to search/map certain regions
      of memory to harvest configuration data. For all low-level we
      use ACPI tables - for interrupts we use exclusively ACPI _PRT
      (so DSDT) and MADT for INT_SRC_OVR.
      
      The SMP MP table is not used at all. As a matter of fact we do
      not even support machines that only have SMP MP but no ACPI tables.
      
      Lets follow how Moorestown does it and just disable searching
      for BIOS SMP tables.
      
      This also fixes an issue on HP Proliant BL680c G5 and DL380 G6:
      
      9f->100 for 1:1 PTE
      Freeing 9f-100 pfn range: 97 pages freed
      1-1 mapping on 9f->100
      .. snip..
      e820: BIOS-provided physical RAM map:
      Xen: [mem 0x0000000000000000-0x000000000009efff] usable
      Xen: [mem 0x000000000009f400-0x00000000000fffff] reserved
      Xen: [mem 0x0000000000100000-0x00000000cfd1dfff] usable
      .. snip..
      Scan for SMP in [mem 0x00000000-0x000003ff]
      Scan for SMP in [mem 0x0009fc00-0x0009ffff]
      Scan for SMP in [mem 0x000f0000-0x000fffff]
      found SMP MP-table at [mem 0x000f4fa0-0x000f4faf] mapped at [ffff8800000f4fa0]
      (XEN) mm.c:908:d0 Error getting mfn 100 (pfn 5555555555555555) from L1 entry 0000000000100461 for l1e_owner=0, pg_owner=0
      (XEN) mm.c:4995:d0 ptwr_emulate: could not get_page_from_l1e()
      BUG: unable to handle kernel NULL pointer dereference at           (null)
      IP: [<ffffffff81ac07e2>] xen_set_pte_init+0x66/0x71
      . snip..
      Pid: 0, comm: swapper Not tainted 3.6.0-rc6upstream-00188-gb6fb969-dirty #2 HP ProLiant BL680c G5
      .. snip..
      Call Trace:
       [<ffffffff81ad31c6>] __early_ioremap+0x18a/0x248
       [<ffffffff81624731>] ? printk+0x48/0x4a
       [<ffffffff81ad32ac>] early_ioremap+0x13/0x15
       [<ffffffff81acc140>] get_mpc_size+0x2f/0x67
       [<ffffffff81acc284>] smp_scan_config+0x10c/0x136
       [<ffffffff81acc2e4>] default_find_smp_config+0x36/0x5a
       [<ffffffff81ac3085>] setup_arch+0x5b3/0xb5b
       [<ffffffff81624731>] ? printk+0x48/0x4a
       [<ffffffff81abca7f>] start_kernel+0x90/0x390
       [<ffffffff81abc356>] x86_64_start_reservations+0x131/0x136
       [<ffffffff81abfa83>] xen_start_kernel+0x65f/0x661
      (XEN) Domain 0 crashed: 'noreboot' set - not rebooting.
      
      which is that ioremap would end up mapping 0xff using _PAGE_IOMAP
      (which is what early_ioremap sticks as a flag) - which meant
      we would get MFN 0xFF (pte ff461, which is OK), and then it would
      also map 0x100 (b/c ioremap tries to get page aligned request, and
      it was trying to map 0xf4fa0 + PAGE_SIZE - so it mapped the next page)
      as _PAGE_IOMAP. Since 0x100 is actually a RAM page, and the _PAGE_IOMAP
      bypasses the P2M lookup we would happily set the PTE to 1000461.
      Xen would deny the request since we do not have access to the
      Machine Frame Number (MFN) of 0x100. The P2M[0x100] is for example
      0x80140.
      
      Fixes-Oracle-Bugzilla: https://bugzilla.oracle.com/bugzilla/show_bug.cgi?id=13665Acked-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      0a193b14
    • Luis R. Rodriguez's avatar
      cfg80211: fix possible circular lock on reg_regdb_search() · 22a40bd6
      Luis R. Rodriguez authored
      commit a85d0d7f upstream.
      
      When call_crda() is called we kick off a witch hunt search
      for the same regulatory domain on our internal regulatory
      database and that work gets kicked off on a workqueue, this
      is done while the cfg80211_mutex is held. If that workqueue
      kicks off it will first lock reg_regdb_search_mutex and
      later cfg80211_mutex but to ensure two CPUs will not contend
      against cfg80211_mutex the right thing to do is to have the
      reg_regdb_search() wait until the cfg80211_mutex is let go.
      
      The lockdep report is pasted below.
      
      cfg80211: Calling CRDA to update world regulatory domain
      
      ======================================================
      [ INFO: possible circular locking dependency detected ]
      3.3.8 #3 Tainted: G           O
      -------------------------------------------------------
      kworker/0:1/235 is trying to acquire lock:
       (cfg80211_mutex){+.+...}, at: [<816468a4>] set_regdom+0x78c/0x808 [cfg80211]
      
      but task is already holding lock:
       (reg_regdb_search_mutex){+.+...}, at: [<81646828>] set_regdom+0x710/0x808 [cfg80211]
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #2 (reg_regdb_search_mutex){+.+...}:
             [<800a8384>] lock_acquire+0x60/0x88
             [<802950a8>] mutex_lock_nested+0x54/0x31c
             [<81645778>] is_world_regdom+0x9f8/0xc74 [cfg80211]
      
      -> #1 (reg_mutex#2){+.+...}:
             [<800a8384>] lock_acquire+0x60/0x88
             [<802950a8>] mutex_lock_nested+0x54/0x31c
             [<8164539c>] is_world_regdom+0x61c/0xc74 [cfg80211]
      
      -> #0 (cfg80211_mutex){+.+...}:
             [<800a77b8>] __lock_acquire+0x10d4/0x17bc
             [<800a8384>] lock_acquire+0x60/0x88
             [<802950a8>] mutex_lock_nested+0x54/0x31c
             [<816468a4>] set_regdom+0x78c/0x808 [cfg80211]
      
      other info that might help us debug this:
      
      Chain exists of:
        cfg80211_mutex --> reg_mutex#2 --> reg_regdb_search_mutex
      
       Possible unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(reg_regdb_search_mutex);
                                     lock(reg_mutex#2);
                                     lock(reg_regdb_search_mutex);
        lock(cfg80211_mutex);
      
       *** DEADLOCK ***
      
      3 locks held by kworker/0:1/235:
       #0:  (events){.+.+..}, at: [<80089a00>] process_one_work+0x230/0x460
       #1:  (reg_regdb_work){+.+...}, at: [<80089a00>] process_one_work+0x230/0x460
       #2:  (reg_regdb_search_mutex){+.+...}, at: [<81646828>] set_regdom+0x710/0x808 [cfg80211]
      
      stack backtrace:
      Call Trace:
      [<80290fd4>] dump_stack+0x8/0x34
      [<80291bc4>] print_circular_bug+0x2ac/0x2d8
      [<800a77b8>] __lock_acquire+0x10d4/0x17bc
      [<800a8384>] lock_acquire+0x60/0x88
      [<802950a8>] mutex_lock_nested+0x54/0x31c
      [<816468a4>] set_regdom+0x78c/0x808 [cfg80211]
      Reported-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Tested-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      22a40bd6
    • Jeff Layton's avatar
      cifs: fix return value in cifsConvertToUTF16 · f2efd134
      Jeff Layton authored
      commit c73f6939 upstream.
      
      This function returns the wrong value, which causes the callers to get
      the length of the resulting pathname wrong when it contains non-ASCII
      characters.
      
      This seems to fix https://bugzilla.samba.org/show_bug.cgi?id=6767Reported-by: default avatarBaldvin Kovacs <baldvin.kovacs@gmail.com>
      Reported-and-Tested-by: default avatarNicolas Lefebvre <nico.lefebvre@gmail.com>
      Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      f2efd134
    • Guenter Roeck's avatar
      hwmon: (ad7314) Add 'name' sysfs attribute · 69102700
      Guenter Roeck authored
      commit 3ceefe43 upstream.
      
      The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
      in this driver.
      
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      69102700
    • Stephen M. Cameron's avatar
      hpsa: fix handling of protocol error · e95d3285
      Stephen M. Cameron authored
      commit 256d0eaa upstream.
      
      If a command status of CMD_PROTOCOL_ERR is received, this
      information should be conveyed to the SCSI mid layer, not
      dropped on the floor.  CMD_PROTOCOL_ERR may be received
      from the Smart Array for any commands destined for an external
      RAID controller such as a P2000, or commands destined for tape
      drives or CD/DVD-ROM drives, if for instance a cable is
      disconnected.  This mostly affects multipath configurations, as
      disconnecting a cable on a non-multipath configuration is not
      going to do anything good regardless of whether CMD_PROTOCOL_ERR
      is handled correctly or not.  Not handling CMD_PROTOCOL_ERR
      correctly in a multipath configaration involving external RAID
      controllers may cause data corruption, so this is quite a serious
      bug.  This bug should not normally cause a problem for direct
      attached disk storage.
      Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      e95d3285
    • Sachin Kamat's avatar
      DMA: PL330: Check the pointer returned by kzalloc · cd2ff826
      Sachin Kamat authored
      commit 61c6e753 upstream.
      
      kzalloc could return NULL. Hence add a check to avoid
      NULL pointer dereference.
      Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
      Acked-by: default avatarJassi Brar <jassisinghbrar@gmail.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
      [bwh: Backported to 3.2: adjust context and error label]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      cd2ff826
    • Guenter Roeck's avatar
      hwmon: (ads7871) Add 'name' sysfs attribute · d912bb41
      Guenter Roeck authored
      commit 4e21f4ea upstream.
      
      The 'name' sysfs attribute is mandatory for hwmon devices, but was missing
      in this driver.
      
      Cc: Paul Thomas <pthomas8589@gmail.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      Acked-by: default avatarPaul Thomas <pthomas8589@gmail.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      d912bb41
    • sreekanth.reddy@lsi.com's avatar
      mpt2sas: Fix for issue - Unable to boot from the drive connected to HBA · 8756f652
      sreekanth.reddy@lsi.com authored
      commit 10cce6d8 upstream.
      
      This patch checks whether HBA is SAS2008 B0 controller.
      if it is a SAS2008 B0 controller then it use IO-APIC interrupt instead of MSIX,
      as SAS2008 B0 controller doesn't support MSIX interrupts.
      
      [jejb: fix whitespace problems]
      Signed-off-by: default avatarSreekanth Reddy <sreekanth.reddy@lsi.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      8756f652
    • Eddie Wai's avatar
      bnx2i: Fixed NULL ptr deference for 1G bnx2 Linux iSCSI offload · 79167c43
      Eddie Wai authored
      commit d6532207 upstream.
      
      This patch fixes the following kernel panic invoked by uninitialized fields
      in the chip initialization for the 1G bnx2 iSCSI offload.
      
      One of the bits in the chip initialization is being used by the latest
      firmware to control overflow packets.  When this control bit gets enabled
      erroneously, it would ultimately result in a bad packet placement which would
      cause the bnx2 driver to dereference a NULL ptr in the placement handler.
      
      This can happen under certain stress I/O environment under the Linux
      iSCSI offload operation.
      
      This change only affects Broadcom's 5709 chipset.
      
      Unable to handle kernel NULL pointer dereference at 0000000000000008 RIP:
       [<ffffffff881f0e7d>] :bnx2:bnx2_poll_work+0xd0d/0x13c5
      Pid: 0, comm: swapper Tainted: G     ---- 2.6.18-333.el5debug #2
      RIP: 0010:[<ffffffff881f0e7d>]  [<ffffffff881f0e7d>] :bnx2:bnx2_poll_work+0xd0d/0x13c5
      RSP: 0018:ffff8101b575bd50  EFLAGS: 00010216
      RAX: 0000000000000005 RBX: ffff81007c5fb180 RCX: 0000000000000000
      RDX: 0000000000000ffc RSI: 00000000817e8000 RDI: 0000000000000220
      RBP: ffff81015bbd7ec0 R08: ffff8100817e9000 R09: 0000000000000000
      R10: ffff81007c5fb180 R11: 00000000000000c8 R12: 000000007a25a010
      R13: 0000000000000000 R14: 0000000000000005 R15: ffff810159f80558
      FS:  0000000000000000(0000) GS:ffff8101afebc240(0000) knlGS:0000000000000000
      CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
      CR2: 0000000000000008 CR3: 0000000000201000 CR4: 00000000000006a0
      Process swapper (pid: 0, threadinfo ffff8101b5754000, task ffff8101afebd820)
      Stack:  000000000000000b ffff810159f80000 0000000000000040 ffff810159f80520
       ffff810159f80500 00cf00cf8008e84b ffffc200100939e0 ffff810009035b20
       0000502900000000 000000be00000001 ffff8100817e7810 00d08101b575bea8
      Call Trace:
       <IRQ>  [<ffffffff8008e0d0>] show_schedstat+0x1c2/0x25b
       [<ffffffff881f1886>] :bnx2:bnx2_poll+0xf6/0x231
       [<ffffffff8000c9b9>] net_rx_action+0xac/0x1b1
       [<ffffffff800125a0>] __do_softirq+0x89/0x133
       [<ffffffff8005e30c>] call_softirq+0x1c/0x28
       [<ffffffff8006d5de>] do_softirq+0x2c/0x7d
       [<ffffffff8006d46e>] do_IRQ+0xee/0xf7
       [<ffffffff8005d625>] ret_from_intr+0x0/0xa
       <EOI>  [<ffffffff801a5780>] acpi_processor_idle_simple+0x1c5/0x341
       [<ffffffff801a573d>] acpi_processor_idle_simple+0x182/0x341
       [<ffffffff801a55bb>] acpi_processor_idle_simple+0x0/0x341
       [<ffffffff80049560>] cpu_idle+0x95/0xb8
       [<ffffffff80078b1c>] start_secondary+0x479/0x488
      Signed-off-by: default avatarEddie Wai <eddie.wai@broadcom.com>
      Reviewed-by: default avatarMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      79167c43
    • Wang Xingchao's avatar
      drm/i915: HDMI - Clear Audio Enable bit for Hot Plug · 82824750
      Wang Xingchao authored
      commit b98b6016 upstream.
      
      Clear Audio Enable bit to trigger unsolicated event to notify Audio
      Driver part the HDMI hot plug change. The patch fixed the bug when
      remove HDMI cable the bit was not cleared correctly.
      
      In intel_hdmi_dpms(), if intel_hdmi->has_audio been true, the "Audio enable bit" will
      be set to trigger unsolicated event to notify Alsa driver the change.
      
      intel_hdmi->has_audio will be reset to false from intel_hdmi_detect() after
      remove the hdmi cable, here's debug log:
      
      [  187.494153] [drm:output_poll_execute], [CONNECTOR:17:HDMI-A-1] status updated from 1 to 2
      [  187.525349] [drm:intel_hdmi_detect], HDMI: has_audio = 0
      
      so when comes back to intel_hdmi_dpms(), the "Audio enable bit" will not be cleared. And this
      cause the eld infomation and pin presence doesnot update accordingly in alsa driver side.
      
      This patch will also trigger unsolicated event to alsa driver to notify the hot plug event:
      
      [  187.853159] ALSA sound/pci/hda/patch_hdmi.c:772 HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1
      [  187.853268] ALSA sound/pci/hda/patch_hdmi.c:990 HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0
      Signed-off-by: default avatarWang Xingchao <xingchao.wang@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      82824750
    • Chris Wilson's avatar
      drm/i915: Reduce a pin-leak BUG into a WARN · 1f2c01da
      Chris Wilson authored
      commit 7e81a42e upstream.
      
      Pin-leaks persist and we get the perennial bug reports of machine
      lockups to the BUG_ON(pin_count==MAX). If we instead loudly report that
      the object cannot be pinned at that time it should prevent the driver from
      locking up, and hopefully restore a semblance of working whilst still
      leaving us a OOPS to debug.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      1f2c01da
    • Matthew Leach's avatar
      ARM: 7532/1: decompressor: reset SCTLR.TRE for VMSA ARMv7 cores · 622bba6d
      Matthew Leach authored
      commit e1e5b7e4 upstream.
      
      This patch zeroes the SCTLR.TRE bit prior to setting the mapping as
      cacheable for ARMv7 cores in the decompressor, ensuring that the
      memory region attributes are obtained from the C and B bits, not from
      the page tables.
      
      Cc: Nicolas Pitre <nico@fluxnic.net>
      Reviewed-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarMatthew Leach <matthew.leach@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      622bba6d
    • Nicolas Ferre's avatar
      dmaengine: at_hdmac: check that each sg data length is non-null · 28646c86
      Nicolas Ferre authored
      commit c4567976 upstream.
      
      Avoid the construction of a malformed DMA request sent to
      the DMA controller.
      Log message is for debug only because this condition is unlikely to
      append and may only trigger at driver development time.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      28646c86
    • Nicolas Ferre's avatar
      dmaengine: at_hdmac: fix comment in atc_prep_slave_sg() · 684408fa
      Nicolas Ferre authored
      commit c618a9be upstream.
      
      s/dma_memcpy/slave_sg/ and it is sg length that we are
      talking about.
      Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@linux.intel.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      684408fa
    • Hante Meuleman's avatar
      brcmfmac: Fix big endian host configuration data. · 3b63b57f
      Hante Meuleman authored
      commit e020a83d upstream.
      
      Fixes big endian host configuration parameters.
      Reviewed-by: default avatarArend Van Spriel <arend@broadcom.com>
      Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
      Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      3b63b57f
    • Hante Meuleman's avatar
      brcmfmac: fix big endian bug in i-scan. · 0fc97433
      Hante Meuleman authored
      commit ed205b36 upstream.
      
      ssid len is 32 bit and needs endian conversion for big endian systems.
      Signed-off-by: default avatarHante Meuleman <meuleman@broadcom.com>
      Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      0fc97433
    • Larry Finger's avatar
      rtlwifi: rtl8192ce: Log message that B_CUT device may not work · 22ccc4c1
      Larry Finger authored
      commit 022e1d06 upstream.
      
      There are a number of problems that occur for the latest version
      of the Realtek RTL8188CE device with the in-kernel driver. These
      include selection of the wrong firmware, and system lockup. A full
      fix is known, but is too invasive for inclusion in stable. This patch
      fixes the problem with loading the wrong firmware, and logs a message
      that the device may not work for kernels 3.6 and older.
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Anisse Astier <anisse@astier.eu>
      Cc: Li Chaoming <chaoming_li@realsil.com.cn>
      Tested-by: default avatarAnisse Astier <anisse@astier.eu>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      22ccc4c1
    • Toshi Kani's avatar
      hpwdt: Fix kdump issue in hpwdt · 6cd1dc6f
      Toshi Kani authored
      commit 308b135e upstream.
      
      kdump can be interrupted by watchdog timer when the timer is left
      activated on the crash kernel. Changed the hpwdt driver to disable
      watchdog timer at boot-time. This assures that watchdog timer is
      disabled until /dev/watchdog is opened, and prevents watchdog timer
      to be left running on the crash kernel.
      Signed-off-by: default avatarToshi Kani <toshi.kani@hp.com>
      Tested-by: default avatarLisa Mitchell <lisa.mitchell@hp.com>
      Signed-off-by: default avatarThomas Mingarelli <Thomas.Mingarelli@hp.com>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      6cd1dc6f
    • Yasunori Goto's avatar
      sched: Fix ancient race in do_exit() · fbbbb5c0
      Yasunori Goto authored
      commit b5740f4b upstream.
      
      try_to_wake_up() has a problem which may change status from TASK_DEAD to
      TASK_RUNNING in race condition with SMI or guest environment of virtual
      machine. As a result, exited task is scheduled() again and panic occurs.
      
      Here is the sequence how it occurs:
      
       ----------------------------------+-----------------------------
                                         |
                  CPU A                  |             CPU B
       ----------------------------------+-----------------------------
      
      TASK A calls exit()....
      
      do_exit()
      
        exit_mm()
          down_read(mm->mmap_sem);
      
          rwsem_down_failed_common()
      
            set TASK_UNINTERRUPTIBLE
            set waiter.task <= task A
            list_add to sem->wait_list
                 :
            raw_spin_unlock_irq()
            (I/O interruption occured)
      
                                            __rwsem_do_wake(mmap_sem)
      
                                              list_del(&waiter->list);
                                              waiter->task = NULL
                                              wake_up_process(task A)
                                                try_to_wake_up()
                                                   (task is still
                                                     TASK_UNINTERRUPTIBLE)
                                                    p->on_rq is still 1.)
      
                                                    ttwu_do_wakeup()
                                                       (*A)
                                                         :
           (I/O interruption handler finished)
      
            if (!waiter.task)
                schedule() is not called
                due to waiter.task is NULL.
      
            tsk->state = TASK_RUNNING
      
                :
                                                    check_preempt_curr();
                                                        :
        task->state = TASK_DEAD
                                                    (*B)
                                              <---    set TASK_RUNNING (*C)
      
           schedule()
           (exit task is running again)
           BUG_ON() is called!
       --------------------------------------------------------
      
      The execution time between (*A) and (*B) is usually very short,
      because the interruption is disabled, and setting TASK_RUNNING at (*C)
      must be executed before setting TASK_DEAD.
      
      HOWEVER, if SMI is interrupted between (*A) and (*B),
      (*C) is able to execute AFTER setting TASK_DEAD!
      Then, exited task is scheduled again, and BUG_ON() is called....
      
      If the system works on guest system of virtual machine, the time
      between (*A) and (*B) may be also long due to scheduling of hypervisor,
      and same phenomenon can occur.
      
      By this patch, do_exit() waits for releasing task->pi_lock which is used
      in try_to_wake_up(). It guarantees the task becomes TASK_DEAD after
      waking up.
      Signed-off-by: default avatarYasunori Goto <y-goto@jp.fujitsu.com>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Link: http://lkml.kernel.org/r/20120117174031.3118.E1E9C6FF@jp.fujitsu.comSigned-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      fbbbb5c0
    • Tejun Heo's avatar
      cpufreq/powernow-k8: workqueue user shouldn't migrate the kworker to another CPU · ec42753a
      Tejun Heo authored
      commit 6889125b upstream.
      
      powernowk8_target() runs off a per-cpu work item and if the
      cpufreq_policy->cpu is different from the current one, it migrates the
      kworker to the target CPU by manipulating current->cpus_allowed.  The
      function migrates the kworker back to the original CPU but this is
      still broken.  Workqueue concurrency management requires the kworkers
      to stay on the same CPU and powernowk8_target() ends up triggerring
      BUG_ON(rq != this_rq()) in try_to_wake_up_local() if it contends on
      fidvid_mutex and sleeps.
      
      It is unclear why this bug is being reported now.  Duncan says it
      appeared to be a regression of 3.6-rc1 and couldn't reproduce it on
      3.5.  Bisection seemed to point to 63d95a91 "workqueue: use @pool
      instead of @gcwq or @cpu where applicable" which is an non-functional
      change.  Given that the reproduce case sometimes took upto days to
      trigger, it's easy to be misled while bisecting.  Maybe something made
      contention on fidvid_mutex more likely?  I don't know.
      
      This patch fixes the bug by using work_on_cpu() instead if @pol->cpu
      isn't the same as the current one.  The code assumes that
      cpufreq_policy->cpu is kept online by the caller, which Rafael tells
      me is the case.
      
      stable: ed48ece2 ("workqueue: reimplement work_on_cpu() using
              system_wq") should be applied before this; otherwise, the
              behavior could be horrible.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-by: default avatarDuncan <1i5t5.duncan@cox.net>
      Tested-by: default avatarDuncan <1i5t5.duncan@cox.net>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47301Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      ec42753a
    • Tejun Heo's avatar
      workqueue: reimplement work_on_cpu() using system_wq · b15bea04
      Tejun Heo authored
      commit ed48ece2 upstream.
      
      The existing work_on_cpu() implementation is hugely inefficient.  It
      creates a new kthread, execute that single function and then let the
      kthread die on each invocation.
      
      Now that system_wq can handle concurrent executions, there's no
      advantage of doing this.  Reimplement work_on_cpu() using system_wq
      which makes it simpler and way more efficient.
      
      stable: While this isn't a fix in itself, it's needed to fix a
              workqueue related bug in cpufreq/powernow-k8.  AFAICS, this
              shouldn't break other existing users.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarJiri Kosina <jkosina@suse.cz>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b15bea04
    • Miklos Szeredi's avatar
      vfs: dcache: use DCACHE_DENTRY_KILLED instead of DCACHE_DISCONNECTED in d_kill() · 2ebf56f3
      Miklos Szeredi authored
      commit b161dfa6 upstream.
      
      IBM reported a soft lockup after applying the fix for the rename_lock
      deadlock.  Commit c83ce989 ("VFS: Fix the nfs sillyrename regression
      in kernel 2.6.38") was found to be the culprit.
      
      The nfs sillyrename fix used DCACHE_DISCONNECTED to indicate that the
      dentry was killed.  This flag can be set on non-killed dentries too,
      which results in infinite retries when trying to traverse the dentry
      tree.
      
      This patch introduces a separate flag: DCACHE_DENTRY_KILLED, which is
      only set in d_kill() and makes try_to_ascend() test only this flag.
      
      IBM reported successful test results with this patch.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      2ebf56f3
    • Stephen M. Cameron's avatar
      cciss: fix handling of protocol error · 937882c0
      Stephen M. Cameron authored
      commit 2453f5f9 upstream.
      
      If a command completes with a status of CMD_PROTOCOL_ERR, this
      information should be conveyed to the SCSI mid layer, not dropped
      on the floor.  Unlike a similar bug in the hpsa driver, this bug
      only affects tape drives and CD and DVD ROM drives in the cciss
      driver, and to induce it, you have to disconnect (or damage) a
      cable, so it is not a very likely scenario (which would explain
      why the bug has gone undetected for the last 10 years.)
      Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      937882c0
    • qiuxishi's avatar
      memory hotplug: fix section info double registration bug · 5a849a30
      qiuxishi authored
      commit f14851af upstream.
      
      There may be a bug when registering section info.  For example, on my
      Itanium platform, the pfn range of node0 includes the other nodes, so
      other nodes' section info will be double registered, and memmap's page
      count will equal to 3.
      
        node0: start_pfn=0x100,    spanned_pfn=0x20fb00, present_pfn=0x7f8a3, => 0x000100-0x20fc00
        node1: start_pfn=0x80000,  spanned_pfn=0x80000,  present_pfn=0x80000, => 0x080000-0x100000
        node2: start_pfn=0x100000, spanned_pfn=0x80000,  present_pfn=0x80000, => 0x100000-0x180000
        node3: start_pfn=0x180000, spanned_pfn=0x80000,  present_pfn=0x80000, => 0x180000-0x200000
      
        free_all_bootmem_node()
      	register_page_bootmem_info_node()
      		register_page_bootmem_info_section()
      
      When hot remove memory, we can't free the memmap's page because
      page_count() is 2 after put_page_bootmem().
      
        sparse_remove_one_section()
      	free_section_usemap()
      		free_map_bootmem()
      			put_page_bootmem()
      
      [akpm@linux-foundation.org: add code comment]
      Signed-off-by: default avatarXishi Qiu <qiuxishi@huawei.com>
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Acked-by: default avatarMel Gorman <mgorman@suse.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      5a849a30
    • Li Haifeng's avatar
      mm/page_alloc: fix the page address of higher page's buddy calculation · 814154c2
      Li Haifeng authored
      commit 0ba8f2d5 upstream.
      
      The heuristic method for buddy has been introduced since commit
      43506fad ("mm/page_alloc.c: simplify calculation of combined index
      of adjacent buddy lists").  But the page address of higher page's buddy
      was wrongly calculated, which will lead page_is_buddy to fail for ever.
      IOW, the heuristic method would be disabled with the wrong page address
      of higher page's buddy.
      
      Calculating the page address of higher page's buddy should be based
      higher_page with the offset between index of higher page and index of
      higher page's buddy.
      Signed-off-by: default avatarHaifeng Li <omycle@gmail.com>
      Signed-off-by: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
      Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
      Cc: KyongHo Cho <pullip.cho@samsung.com>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Minchan Kim <minchan.kim@gmail.com>
      Cc: Johannes Weiner <jweiner@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      814154c2
    • Kevin Hilman's avatar
      drivers/rtc/rtc-twl.c: ensure all interrupts are disabled during probe · fd370b1d
      Kevin Hilman authored
      commit 8dcebaa9 upstream.
      
      On some platforms, bootloaders are known to do some interesting RTC
      programming.  Without going into the obscurities as to why this may be
      the case, suffice it to say the the driver should not make any
      assumptions about the state of the RTC when the driver loads.  In
      particular, the driver probe should be sure that all interrupts are
      disabled until otherwise programmed.
      
      This was discovered when finding bursty I2C traffic every second on
      Overo platforms.  This I2C overhead was keeping the SoC from hitting
      deep power states.  The cause was found to be the RTC firing every
      second on the I2C-connected TWL PMIC.
      
      Special thanks to Felipe Balbi for suggesting to look for a rogue driver
      as the source of the I2C traffic rather than the I2C driver itself.
      
      Special thanks to Steve Sakoman for helping track down the source of the
      continuous RTC interrups on the Overo boards.
      Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Tested-by: default avatarSteve Sakoman <steve@sakoman.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Tested-by: default avatarShubhrajyoti Datta <omaplinuxkernel@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      fd370b1d
    • Paul Clements's avatar
      nbd: clear waiting_queue on shutdown · b6417788
      Paul Clements authored
      commit fded4e09 upstream.
      
      Fix a serious but uncommon bug in nbd which occurs when there is heavy
      I/O going to the nbd device while, at the same time, a failure (server,
      network) or manual disconnect of the nbd connection occurs.
      
      There is a small window between the time that the nbd_thread is stopped
      and the socket is shutdown where requests can continue to be queued to
      nbd's internal waiting_queue.  When this happens, those requests are
      never completed or freed.
      
      The fix is to clear the waiting_queue on shutdown of the nbd device, in
      the same way that the nbd request queue (queue_head) is already being
      cleared.
      Signed-off-by: default avatarPaul Clements <paul.clements@steeleye.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      [bwh: Backported to 3.2: local nbd_device pointers are called 'lo' not 'nbd']
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      b6417788
    • Jianguo Wu's avatar
      mm/ia64: fix a memory block size bug · 4fa89f93
      Jianguo Wu authored
      commit 05cf9639 upstream.
      
      I found following definition in include/linux/memory.h, in my IA64
      platform, SECTION_SIZE_BITS is equal to 32, and MIN_MEMORY_BLOCK_SIZE
      will be 0.
      
        #define MIN_MEMORY_BLOCK_SIZE     (1 << SECTION_SIZE_BITS)
      
      Because MIN_MEMORY_BLOCK_SIZE is int type and length of 32bits,
      so MIN_MEMORY_BLOCK_SIZE(1 << 32) will will equal to 0.
      Actually when SECTION_SIZE_BITS >= 31, MIN_MEMORY_BLOCK_SIZE will be wrong.
      This will cause wrong system memory infomation in sysfs.
      I think it should be:
      
        #define MIN_MEMORY_BLOCK_SIZE     (1UL << SECTION_SIZE_BITS)
      
      And "echo offline > memory0/state" will cause following call trace:
      
        kernel BUG at mm/memory_hotplug.c:885!
        sh[6455]: bugcheck! 0 [1]
        Pid: 6455, CPU 0, comm:                   sh
        psr : 0000101008526030 ifs : 8000000000000fa4 ip  : [<a0000001008c40f0>]    Not tainted (3.6.0-rc1)
        ip is at offline_pages+0x210/0xee0
        Call Trace:
          show_stack+0x80/0xa0
          show_regs+0x640/0x920
          die+0x190/0x2c0
          die_if_kernel+0x50/0x80
          ia64_bad_break+0x3d0/0x6e0
          ia64_native_leave_kernel+0x0/0x270
          offline_pages+0x210/0xee0
          alloc_pages_current+0x180/0x2a0
      Signed-off-by: default avatarJianguo Wu <wujianguo@huawei.com>
      Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      4fa89f93
    • Francesco Ruggeri's avatar
      fs/proc: fix potential unregister_sysctl_table hang · 1b0abe96
      Francesco Ruggeri authored
      commit 6bf61045 upstream.
      
      The unregister_sysctl_table() function hangs if all references to its
      ctl_table_header structure are not dropped.
      
      This can happen sometimes because of a leak in proc_sys_lookup():
      proc_sys_lookup() gets a reference to the table via lookup_entry(), but
      it does not release it when a subsequent call to sysctl_follow_link()
      fails.
      
      This patch fixes this leak by making sure the reference is always
      dropped on return.
      
      See also commit 076c3eed ("sysctl: Rewrite proc_sys_lookup
      introducing find_entry and lookup_entry") which reorganized this code in
      3.4.
      
      Tested in Linux 3.4.4.
      Signed-off-by: default avatarFrancesco Ruggeri <fruggeri@aristanetworks.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      1b0abe96
    • Dylan Reid's avatar
      ASoC: samsung dma - Don't indicate support for pause/resume. · 62ed89fa
      Dylan Reid authored
      commit 57b2d688 upstream.
      
      The pause and resume operations indicate that the stream can be
      un-paused/resumed from the exact location they were paused/suspended.
      This is not true for this driver, the pause and suspend triggers share
      the same code path with stop, they flush all pending DMA transfers.
      This drops all pending samples.  The pause_release/resume triggers are
      the same as start, except that prepare won't be called beforehand,
      nothing will be enqueued to the DMA engine and nothing will happen (no
      audio).  Removing the pause flag will let apps know that it isn't
      supported.  Removing the resume flag will cause user space to call
      prepare and start instead of resume, so audio will continue playing when
      the system wakes up.
      
      Before removing the pause and resume flags, I tested this on an exynos
      5250, using 'aplay -i'. Pause/un-pause leads to silence followed by a
      write error.  Suspend/resume testing led to the same result.  Removing
      the two flags fixes suspend/resume (since snd_pcm_prepare is called
      again). And leads to a proper reporting of pause not supported.
      Signed-off-by: default avatarDylan Reid <dgreid@chromium.org>
      Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      62ed89fa
    • Nicholas Bellinger's avatar
      target: Fix ->data_length re-assignment bug with SCSI overflow · 288a2e6e
      Nicholas Bellinger authored
      commit 4c054ba6 upstream.
      
      This patch fixes a long-standing bug with SCSI overflow handling
      where se_cmd->data_length was incorrectly being re-assigned to
      the larger CDB extracted allocation length, resulting in a number
      of fabric level errors that would end up causing a session reset
      in most cases.  So instead now:
      
       - Only re-assign se_cmd->data_length durining UNDERFLOW (to use the
         smaller value)
       - Use existing se_cmd->data_length for OVERFLOW (to use the smaller
         value)
      
      This fix has been tested with the following CDB to generate an
      SCSI overflow:
      
        sg_raw -r512 /dev/sdc 28 0 0 0 0 0 0 0 9 0
      
      Tested using iscsi-target, tcm_qla2xxx, loopback and tcm_vhost fabric
      ports.  Here is a bit more detail on each case:
      
       - iscsi-target: Bug with open-iscsi with overflow, sg_raw returns
                       -3584 bytes of data.
       - tcm_qla2xxx: Working as expected, returnins 512 bytes of data
       - loopback: sg_raw returns CHECK_CONDITION, from overflow rejection
                   in transport_generic_map_mem_to_cmd()
       - tcm_vhost: Same as loopback
      Reported-by: default avatarRoland Dreier <roland@purestorage.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      288a2e6e
  2. 19 Sep, 2012 3 commits