1. 07 Oct, 2012 1 commit
    • Willy Tarreau's avatar
      drm/i915: remove useless BUG_ON which caused a regression in 3.5. · c77d7162
      Willy Tarreau authored
      starting an old X server causes a kernel BUG since commit 1b50247a:
      
      ------------[ cut here ]------------
      kernel BUG at drivers/gpu/drm/i915/i915_gem.c:3661!
      invalid opcode: 0000 [#1] SMP
      Modules linked in: snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss uvcvideo
      +videobuf2_core videodev videobuf2_vmalloc videobuf2_memops uhci_hcd ath9k mac80211 snd_hda_codec_realtek ath9k_common microcode
      +ath9k_hw psmouse serio_raw sg ath cfg80211 atl1c lpc_ich mfd_core ehci_hcd snd_hda_intel snd_hda_codec snd_hwdep snd_pcm rtc_cmos
      +snd_timer snd evdev eeepc_laptop snd_page_alloc sparse_keymap
      
      Pid: 2866, comm: X Not tainted 3.5.6-rc1-eeepc #1 ASUSTeK Computer INC. 1005HA/1005HA
      EIP: 0060:[<c12dc291>] EFLAGS: 00013297 CPU: 0
      EIP is at i915_gem_entervt_ioctl+0xf1/0x110
      EAX: f5941df4 EBX: f5940000 ECX: 00000000 EDX: 00020000
      ESI: f5835400 EDI: 00000000 EBP: f51d7e38 ESP: f51d7e20
       DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      CR0: 8005003b CR2: b760e0a0 CR3: 351b6000 CR4: 000007d0
      DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
      DR6: ffff0ff0 DR7: 00000400
      Process X (pid: 2866, ti=f51d6000 task=f61af8d0 task.ti=f51d6000)
      Stack:
       00000001 00000000 f5835414 f51d7e84 f5835400 f54f85c0 f51d7f10 c12b530b
       00000001 c151b139 c14751b6 c152e030 00000b32 00006459 00000059 0000e200
       00000001 00000000 00006459 c159ddd0 c12dc1a0 ffffffea 00000000 00000000
      Call Trace:
       [<c12b530b>] drm_ioctl+0x2eb/0x440
       [<c12dc1a0>] ? i915_gem_init+0xe0/0xe0
       [<c1052b2b>] ? enqueue_hrtimer+0x1b/0x50
       [<c1053321>] ? __hrtimer_start_range_ns+0x161/0x330
       [<c10530b3>] ? lock_hrtimer_base+0x23/0x50
       [<c1053163>] ? hrtimer_try_to_cancel+0x33/0x70
       [<c12b5020>] ? drm_version+0x90/0x90
       [<c10ca171>] vfs_ioctl+0x31/0x50
       [<c10ca2e4>] do_vfs_ioctl+0x64/0x510
       [<c10535de>] ? hrtimer_nanosleep+0x8e/0x100
       [<c1052c20>] ? update_rmtp+0x80/0x80
       [<c10ca7c9>] sys_ioctl+0x39/0x60
       [<c1433949>] syscall_call+0x7/0xb
      Code: 83 c4 0c 5b 5e 5f 5d c3 c7 44 24 04 2c 05 53 c1 c7 04 24 6f ef 47 c1 e8 6e e0 fd ff c7 83 38 1e 00 00 00 00 00 00 e9 3f ff ff
      +ff <0f> 0b eb fe 0f 0b eb fe 8d b4 26 00 00 00 00 0f 0b eb fe 8d b6
      EIP: [<c12dc291>] i915_gem_entervt_ioctl+0xf1/0x110 SS:ESP 0068:f51d7e20
      ---[ end trace dd332ec083cbd513 ]---
      
      The crash happens here in i915_gem_entervt_ioctl() :
      
          3659          BUG_ON(!list_empty(&dev_priv->mm.active_list));
          3660          BUG_ON(!list_empty(&dev_priv->mm.flushing_list));
       -> 3661          BUG_ON(!list_empty(&dev_priv->mm.inactive_list));
          3662          mutex_unlock(&dev->struct_mutex);
      
      Quoting Chris :
        "That BUG_ON there is silly and can simply be removed. The check is to
         verify that no batches were submitted to the kernel whilst the UMS/GEM
         client was suspended - to which the BUG_ONs are a crude approximation.
         Furthermore, the checks are too late, since it means we attempted to
         program the hardware whilst it was in an invalid state, the BUG_ONs are
         the least of your concerns at that point."
      
      Note that this regression has been introduced in
      
      commit 1b50247a
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Tue Apr 24 15:47:30 2012 +0100
      
          drm/i915: Remove the list of pinned inactive objects
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
      [danvet: Added note about the regressing commit and cc: stable.]
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      c77d7162
  2. 04 Oct, 2012 6 commits
  3. 03 Oct, 2012 1 commit
  4. 02 Oct, 2012 8 commits
  5. 27 Sep, 2012 2 commits
  6. 26 Sep, 2012 3 commits
  7. 24 Sep, 2012 3 commits
    • Daniel Vetter's avatar
      Merge tag 'v3.6-rc7' into drm-intel-next-queued · 398b7a1b
      Daniel Vetter authored
      Manual backmerge of -rc7 to resolve a silent conflict leading to
      compile failure in drivers/gpu/drm/i915/intel_hdmi.c.
      
      This is due to the bugfix in -rc7:
      
      commit b98b6016
      Author: Wang Xingchao <xingchao.wang@intel.com>
      Date:   Thu Sep 13 07:43:22 2012 +0800
      
          drm/i915: HDMI - Clear Audio Enable bit for Hot Plug
      
      Since this code moved around a lot in -next git put that snippet at
      the wrong spot. I've tried to fix this by making the conflict explicit
      by merging a version for next with:
      
      commit 3cce574f
      Author: Wang Xingchao <xingchao.wang@intel.com>
      Date:   Thu Sep 13 11:19:00 2012 +0800
      
          drm/i915: HDMI - Clear Audio Enable bit for Hot Plug unconditionally
      
      But that failed to solve the entire problem. To avoid pushing out
      further -nightly branch to our QA where this is broken, do the
      backmerge and manually add the stuff git adds to -next from the patch
      in -fixes.
      
      Note that this doesn't show up in git's merge diff (and hence is also
      not handled by git rerere), which adds to the reasons why I'd like to
      fix this with a verbose backmerge. The git merge diff only shows a
      bunch of trivial conflicts of the "code changed in lines next to each
      another" kind.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      398b7a1b
    • Paulo Zanoni's avatar
      drm/i915: BUG() on unexpected HDMI register · 57df2ae9
      Paulo Zanoni authored
      This should never happen, but the silent "return" makes me wonder
      every time I try to debug InfoFrame bugs, so promote this to BUG() to
      make sure people will complain if we ever break this.
      Signed-off-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      57df2ae9
    • Linus Torvalds's avatar
      Linux 3.6-rc7 · 979570e0
      Linus Torvalds authored
      979570e0
  8. 23 Sep, 2012 8 commits
    • Linus Torvalds's avatar
      Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild · 56bae802
      Linus Torvalds authored
      Pull kbuild fixes from Michal Marek:
       "There are two more kbuild fixes for 3.6.
      
        One fixes a race between x86's archscripts target and the rule
        (re)building scripts/basic/fixdep.  The second is a fix for the
        previous attempt at fixing make firmware_install with make 3.82.
        This new solution should work with any version of GNU make"
      
      * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
        x86/kbuild: archscripts depends on scripts_basic
        firmware: fix directory creation rule matching with make 3.80
      56bae802
    • Linus Torvalds's avatar
      Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging · 0737c8d7
      Linus Torvalds authored
      Pull hwmon subsystem fixes from Jean Delvare.
      
      * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
        hwmon: (fam15h_power) Tweak runavg_range on resume
        hwmon: (coretemp) Use get_online_cpus to avoid races involving CPU hotplug
        hwmon: (via-cputemp) Use get_online_cpus to avoid races involving CPU hotplug
      0737c8d7
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 0bf7a705
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of four essential fixes: two oops related (bnx2i,
        virtio-scsi), one data corruption related (hpsa) and one failure to
        boot due to interrupt routing issues (mpt2ss).
      
        Signed-off-by: James Bottomley <JBottomley@Parallels.com>"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] hpsa: fix handling of protocol error
        [SCSI] mpt2sas: Fix for issue - Unable to boot from the drive connected to HBA
        [SCSI] bnx2i: Fixed NULL ptr deference for 1G bnx2 Linux iSCSI offload
        [SCSI] scsi: virtio-scsi: Fix address translation failure of HighMem pages used by sg list
      0bf7a705
    • Shaun Ruffell's avatar
      edac_mc: edac_mc_free() cannot assume mem_ctl_info is registered in sysfs. · faa2ad09
      Shaun Ruffell authored
      Fix potential NULL pointer dereference in edac_unregister_sysfs() on
      system boot introduced in 3.6-rc1.
      
      Since commit 7a623c03 ("edac: rewrite the sysfs code to use struct
      device") edac_mc_alloc() no longer initializes embedded kobjects in
      struct mem_ctl_info.  Therefore edac_mc_free() can no longer simply
      decrement a kobject reference count to free the allocated memory unless
      the memory controller driver module had also called edac_mc_add_mc().
      
      Now edac_mc_free() will check if the newly embedded struct device has
      been registered with sysfs before using either the standard device
      release functions or freeing the data structures itself with logic
      pulled out of the error path of edac_mc_alloc().
      
      The BUG this patch resolves for me:
      
        BUG: unable to handle kernel NULL pointer dereference at   (null)
        EIP is at __wake_up_common+0x1a/0x6a
        Process modprobe (pid: 933, ti=f3dc6000 task=f3db9520 task.ti=f3dc6000)
        Call Trace:
          complete_all+0x3f/0x50
          device_pm_remove+0x23/0xa2
          device_del+0x34/0x142
          edac_unregister_sysfs+0x3b/0x5c [edac_core]
          edac_mc_free+0x29/0x2f [edac_core]
          e7xxx_probe1+0x268/0x311 [e7xxx_edac]
          e7xxx_init_one+0x56/0x61 [e7xxx_edac]
          local_pci_probe+0x13/0x15
        ...
      
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
      Signed-off-by: default avatarShaun Ruffell <sruffell@digium.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      faa2ad09
    • Fengguang Wu's avatar
      edac_mc: fix messy kfree calls in the error path · ef6e7816
      Fengguang Wu authored
      coccinelle warns about:
      
      + drivers/edac/edac_mc.c:429:9-23: ERROR: reference preceded by free on line 429
      
         421         if (mci->csrows) {
       > 422                 for (chn = 0; chn < tot_channels; chn++) {
         423                         csr = mci->csrows[chn];
         424                         if (csr) {
       > 425                                 for (chn = 0; chn < tot_channels; chn++)
         426                                          kfree(csr->channels[chn]);
         427                                  kfree(csr);
         428                          }
       > 429                          kfree(mci->csrows[i]);
         430                  }
         431                  kfree(mci->csrows);
         432          }
      
      and that code block seem to mess things up in several ways (double free, memory
      leak, out-of-bound reads etc.):
      
      L422: The iterator "chn" and bound "tot_channels" are totally wrong. Should be
            "row" and "tot_csrows" respectively. Which means either memory leak, or
            out-of-bound reads (which if does not trigger an immediate page fault
            error, will further lead to kfree() on random addresses).
      
      L425: The inner loop is reusing the same iterator "chn" as the outer loop,
            which could lead to premature end of the outer loop, and hence memory leak.
      
      L429: The array index 'i' in mci->csrows[i] is a temporary value used in
            previous loops, and won't change at all in the current loop. Which
            means either out-of-bound read and possibly kfree(random number), or the
            same mci->csrows[i] get freed once and again, and possibly double free
            for the kfree(csr) in L427.
      
      L426/L427: a kfree(csr->channels) is needed in between to avoid leaking the memory.
      
      The buggy code was introduced by commit de3910eb ("edac: change the mem
      allocation scheme to make Documentation/kobject.txt happy") in the 3.6-rc1
      merge window. Fix it by freeing up resources in this order:
      
        free csrows[i]->channels[j]
        free csrows[i]->channels
        free csrows[i]
        free csrows
      
      CC: Mauro Carvalho Chehab <mchehab@redhat.com>
      CC: Shaun Ruffell <sruffell@digium.com>
      Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ef6e7816
    • Andreas Herrmann's avatar
      hwmon: (fam15h_power) Tweak runavg_range on resume · 5f0ecb90
      Andreas Herrmann authored
      The quirk introduced with commit
      00250ec9 (hwmon: fam15h_power: fix
      bogus values with current BIOSes) is not only required during driver
      load but also when system resumes from suspend. The BIOS might set the
      previously recommended (but unsuitable) initilization value for the
      running average range register during resume.
      Signed-off-by: default avatarAndreas Herrmann <andreas.herrmann3@amd.com>
      Tested-by: default avatarAndreas Hartmann <andihartmann@01019freenet.de>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: stable@vger.kernel.org # 3.0+
      5f0ecb90
    • Silas Boyd-Wickizer's avatar
      hwmon: (coretemp) Use get_online_cpus to avoid races involving CPU hotplug · 641f1456
      Silas Boyd-Wickizer authored
      coretemp_init loops with for_each_online_cpu, adding platform_devices
      and sysfs interfaces, then calls register_hotcpu_notifier.  There is a
      race if a CPU is offlined or onlined after the loop, but before
      register_hotcpu_notifier.  The race might result in the absence of a
      platform_device+sysfs interface for an online CPU, or the presence of
      a platform_device+sysfs interface for an offline CPU.  A similar race
      occurs during coretemp_exit, after the module calls
      unregister_hotcpu_notifier, but before it unregisters all devices, a
      CPU might offline and a device for an offline CPU will exist for a
      short while.
      
      This fix surrounds for_each_online_cpu and register_hotcpu_notifier
      with get_online_cpus+put_online_cpus; and surrounds
      unregister_hotcpu_notifier and device unregistering with
      get_online_cpus+put_online_cpus.
      
      Build tested.
      Signed-off-by: default avatarSilas Boyd-Wickizer <sbw@mit.edu>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      641f1456
    • Silas Boyd-Wickizer's avatar
      hwmon: (via-cputemp) Use get_online_cpus to avoid races involving CPU hotplug · 1ec3ddfd
      Silas Boyd-Wickizer authored
      via_cputemp_init loops with for_each_online_cpu, adding
      platform_devices, then calls register_hotcpu_notifier.  If a CPU is
      offlined between the loop and register_hotcpu_notifier, then later
      onlined, via_cputemp_device_add will attempt to add platform devices
      with the same ID.  A similar race occurs during via_cputemp_exit,
      after the module calls unregister_hotcpu_notifier, a CPU might offline
      and a device will exist for a CPU that is offline.
      
      This fix surrounds for_each_online_cpu and register_hotcpu_notifier
      with get_online_cpus+put_online_cpus; and surrounds
      unregister_hotcpu_notifier and device unregistering with
      get_online_cpus+put_online_cpus.
      
      Build tested.
      Signed-off-by: default avatarSilas Boyd-Wickizer <sbw@mit.edu>
      Acked-by: default avatarHarald Welte <laforge@gnumonks.org>
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      1ec3ddfd
  9. 22 Sep, 2012 6 commits
  10. 21 Sep, 2012 2 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · abef3bd7
      Linus Torvalds authored
      Pull networking updates from David Miller:
       "More bug fixes, nothing gets past these guys"
      
       1) More kernel info leaks found by Mathias Krause, this time in the
          IPSEC configuration layers.
      
       2) When IPSEC policies change, we do not properly make sure that cached
          routes (which could now be stale) throughout the system will be
          revalidated.  Fix this by generalizing the generation count
          invalidation scheme used by ipv4.  From Nicolas Dichtel.
      
       3) When repairing TCP sockets, we need to allow to restore not just the
          send window scale, but the receive one too.  Extend the existing
          interface to achieve this in a backwards compatible way.  From
          Andrey Vagin.
      
       4) A fix for FCOE scatter gather feature validation erroneously caused
          scatter gather to be disabled for things like AOE too.  From Ed L
          Cashin.
      
       5) Several cases of mishandling of error pointers, from Mathias Krause,
          Wei Yongjun, and Devendra Naga.
      
       6) Fix gianfar build, from Richard Cochran.
      
       7) CAP_NET_* failures should return -EPERM not -EACCES, from Zhao
          Hongjiang.
      
       8) Hardware reset fix in janz-ican3 CAN driver, from Ira W Snyder.
      
       9) Fix oops during rmmod in ti_hecc CAN driver, from Marc Kleine-Budde.
      
      10) The removal of the conditional compilation of the clk support code
          in the stmmac driver broke things.  This is because the interfaces
          used are the ones that don't also perform the enable/disable of the
          clk.  Fix from Stefan Roese.
      
      11) The QFQ packet scheduler can record out of range virtual start
          times, resulting later in misbehavior and even crashes.  Fix from
          Paolo Valente.
      
      12) If MSG_WAITALL is used with IOAT DMA under TCP, we can wedge the
          receiver when the advertised receive window goes to zero.  Detect
          this case and force the processing of the IOAT DMA queue when it
          happens to avoid getting stuck.  Fix from Michal Kubecek.
      
      13) batman-adv assumes that test_bit() returns only 0 or 1, but this is
          not true for x86 (which returns -1 or 0, via the 'sbb' instruction).
          Fix from Linus Lussing.
      
      14) Fix small packet corruption in e1000, from Tushar Dave.
      
      15) make_blackhole() in the IPSEC policy code can do one read unlock too
          many, fix from Li RongQing.
      
      16) The new tcp_try_coalesce() code introduced a bug in TCP URG
          handling, fix from Eric Dumazet.
      
      17) Fix memory leak in __netif_receive_skb() when doing zerocopy and
          when hit an OOM condition.  From Michael S Tsirkin.
      
      18) netxen blindly deferences pdev->bus->self, which is not guarenteed
          to be non-NULL.  Fix from Nikolay Aleksandrov.
      
      19) Fix a performance regression caused by mistakes in ipv6 checksum
          validation in the bnx2x driver, fix from Michal Schmidt.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (45 commits)
        net/stmmac: Use clk_prepare_enable and clk_disable_unprepare
        net: change return values from -EACCES to -EPERM
        net/irda: sh_sir: fix return value check in sh_sir_set_baudrate()
        stmmac: fix return value check in stmmac_open_ext_timer()
        gianfar: fix phc index build failure
        ipv6: fix return value check in fib6_add()
        bnx2x: remove false warning regarding interrupt number
        can: ti_hecc: fix oops during rmmod
        can: janz-ican3: fix support for older hardware revisions
        net: do not disable sg for packets requiring no checksum
        aoe: assert AoE packets marked as requiring no checksum
        at91ether: return PTR_ERR if call to clk_get fails
        xfrm_user: don't copy esn replay window twice for new states
        xfrm_user: ensure user supplied esn replay window is valid
        xfrm_user: fix info leak in copy_to_user_tmpl()
        xfrm_user: fix info leak in copy_to_user_policy()
        xfrm_user: fix info leak in copy_to_user_state()
        xfrm_user: fix info leak in copy_to_user_auth()
        net: qmi_wwan: adding Huawei E367, ZTE MF683 and Pantech P4200
        tcp: restore rcv_wscale in a repair mode (v2)
        ...
      abef3bd7
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 6219844e
      Linus Torvalds authored
      Pull sparc updates from David Miller:
      
      1) Debugging builds on 32-bit sparc need to handle the R_SPARC_DISP32
         relocation, not just 64-bit sparc.  From Andreas Larsson.
      
      2) Wei Yongjun noticed that module_alloc() on sparc can return an
         error pointer, but that's not allowed.  module_alloc() should
         return only a valid pointer, or NULL.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc: fix the return value of module_alloc()
        sparc32: Enable the relocation target R_SPARC_DISP32 for sparc32
      6219844e