1. 17 8月, 2013 7 次提交
    • L
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 2620bf06
      Linus Torvalds 提交于
      Pull ARM fixes from Russell King:
       "The usual collection of random fixes.  Also some further fixes to the
        last set of security fixes, and some more from Will (which you may
        already have in a slightly different form)"
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7807/1: kexec: validate CPU hotplug support
        ARM: 7812/1: rwlocks: retry trylock operation if strex fails on free lock
        ARM: 7811/1: locks: use early clobber in arch_spin_trylock
        ARM: 7810/1: perf: Fix array out of bounds access in armpmu_map_hw_event()
        ARM: 7809/1: perf: fix event validation for software group leaders
        ARM: Fix FIQ code on VIVT CPUs
        ARM: Fix !kuser helpers case
        ARM: Fix the world famous typo with is_gate_vma()
      2620bf06
    • L
      Merge branch 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 359d16ca
      Linus Torvalds 提交于
      Pull m68k fixes from Geert Uytterhoeven:
       "These are two critical fixes, needed by distro kernels, and thus also
        destined for stable:
      
         - The do_div() commit fixes a crash in mounting btrfs volumes, which
           was a regression from 3.2,
      
         - The ARAnyM fix allows to have NatFeat drivers as loadable modules,
           which is needed for initrds"
      
      * 'for-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: Truncate base in do_div()
        m68k/atari: ARAnyM - Fix NatFeat module support
      359d16ca
    • L
      Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux · 0f7dd1aa
      Linus Torvalds 提交于
      Pull clock controller fixes from Michael Turquette:
       "Two small fixes for the Zynq clock controller introduced in 3.11-rc1
        and another Exynos clock patch which fixes a regression that prevents
        the video pipeline from functioning on that platform"
      
      * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux:
        clk: exynos4: Add CLK_GET_RATE_NOCACHE flag for the Exynos4x12 ISP clocks
        clk/zynq/clkc: Add CLK_SET_RATE_PARENT flag to ethernet muxes
        clk/zynq/clkc: Add dedicated spinlock for the SWDT
      0f7dd1aa
    • L
      Merge tag 'pm-3.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 2d2843e6
      Linus Torvalds 提交于
      Pull power management fix from Rafael Wysocki:
       "The removal of delayed_work_pending() checks from kernel/power/qos.c
        done in 3.9 introduced a deadlock in pm_qos_work_fn().
      
        Fix from Stephen Boyd"
      
      * tag 'pm-3.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / QoS: Fix workqueue deadlock when using pm_qos_update_request_timeout()
      2d2843e6
    • L
      Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · f43c6064
      Linus Torvalds 提交于
      Pull sound fixes from Takashi Iwai:
       "This batch contains a few USB audio fixes, a couple of HD-audio
        quirks, various small ASoC driver fixes in addition to an ASoC core
        fix that may lead to memory corruption.
      
        Unfortunately slightly more volume than the previous pull request, but
        all are reasonable regression fixes"
      
      * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Add a fixup for Gateway LT27
        ASoC: tegra: fix Tegra30 I2S capture parameter setup
        ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam C525
        ALSA: hda - Fix missing mute controls for CX5051
        ALSA: usb-audio: fix automatic Roland/Yamaha MIDI detection
        ALSA: 6fire: make buffers DMA-able (midi)
        ALSA: 6fire: make buffers DMA-able (pcm)
        ALSA: hda - Add pinfix for LG LW25 laptop
        ASoC: cs42l52: Add new TLV for Beep Volume
        ASoC: cs42l52: Reorder Min/Max and update to SX_TLV for Beep Volume
        ASoC: dapm: Fix empty list check in dapm_new_mux()
        ASoC: sgtl5000: fix buggy 'Capture Attenuate Switch' control
        ASoC: sgtl5000: prevent playback to be muted when terminating concurrent capture
      f43c6064
    • L
      Merge tag 'usb-3.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 89cb9ae2
      Linus Torvalds 提交于
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 3.11-rc6 that have accumulated.
      
        Nothing huge, a EHCI fix that solves a much-reported audio USB
        problem, some usb-serial driver endian fixes and other minor fixes, a
        wireless USB oops fix, and two new quirks"
      
      * tag 'usb-3.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: keyspan: fix null-deref at disconnect and release
        USB: mos7720: fix broken control requests
        usb: add two quirky touchscreen
        USB: ti_usb_3410_5052: fix big-endian firmware handling
        USB: adutux: fix big-endian device-type reporting
        USB: usbtmc: fix big-endian probe of Rigol devices
        USB: mos7840: fix big-endian probe
        USB-Serial: Fix error handling of usb_wwan
        wusbcore: fix kernel panic when disconnecting a wireless USB->serial device
        USB: EHCI: accept very late isochronous URBs
      89cb9ae2
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ddea368c
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix SKB leak in 8139cp, from Dave Jones.
      
       2) Fix use of *_PAGES interfaces with mlx5 firmware, from Moshe Lazar.
      
       3) RCU conversion of macvtap introduced two races, fixes by Eric
          Dumazet
      
       4) Synchronize statistic flows in bnx2x driver to prevent corruption,
          from Dmitry Kravkov
      
       5) Undo optimization in IP tunneling, we were using the inner IP header
          in some cases to inherit the IP ID, but that isn't correct in some
          circumstances.  From Pravin B Shelar
      
       6) Use correct struct size when parsing netlink attributes in
          rtnl_bridge_getlink().  From Asbjoern Sloth Toennesen
      
       7) Length verifications in tun_get_user() are bogus, from Weiping Pan
          and Dan Carpenter
      
       8) Fix bad merge resolution during 3.11 networking development in
          openvswitch, albeit a harmless one which added some unreachable
          code.  From Jesse Gross
      
       9) Wrong size used in flexible array allocation in openvswitch, from
          Pravin B Shelar
      
      10) Clear out firmware capability flags the be2net driver isn't ready to
          handle yet, from Sarveshwar Bandi
      
      11) Revert DMA mapping error checking addition to cxgb3 driver, it's
          buggy.  From Alexey Kardashevskiy
      
      12) Fix regression in packet scheduler rate limiting when working with a
          link layer of ATM.  From Jesper Dangaard Brouer
      
      13) Fix several errors in TCP Cubic congestion control, in particular
          overflow errors in timestamp calculations.  From Eric Dumazet and
          Van Jacobson
      
      14) In ipv6 routing lookups, we need to backtrack if subtree traversal
          don't result in a match.  From Hannes Frederic Sowa
      
      15) ipgre_header() returns incorrect packet offset.  Fix from Timo Teräs
      
      16) Get "low latency" out of the new MIB counter names.  From Eliezer
          Tamir
      
      17) State check in ndo_dflt_fdb_del() is inverted, from Sridhar
          Samudrala
      
      18) Handle TCP Fast Open properly in netfilter conntrack, from Yuchung
          Cheng
      
      19) Wrong memcpy length in pcan_usb driver, from Stephane Grosjean
      
      20) Fix dealock in TIPC, from Wang Weidong and Ding Tianhong
      
      21) call_rcu() call to destroy SCTP transport is done too early and
          might result in an oops.  From Daniel Borkmann
      
      22) Fix races in genetlink family dumps, from Johannes Berg
      
      23) Flags passed into macvlan by the user need to be validated properly,
          from Michael S Tsirkin
      
      24) Fix skge build on 32-bit, from Stephen Hemminger
      
      25) Handle malformed TCP headers properly in xt_TCPMSS, from Pablo Neira
          Ayuso
      
      26) Fix handling of stacked vlans in vlan_dev_real_dev(), from Nikolay
          Aleksandrov
      
      27) Eliminate MTU calculation overflows in esp{4,6}, from Daniel
          Borkmann
      
      28) neigh_parms need to be setup before calling the ->ndo_neigh_setup()
          method.  From Veaceslav Falico
      
      29) Kill out-of-bounds prefetch in fib_trie, from Eric Dumazet
      
      30) Don't dereference MLD query message if the length isn't value in the
          bridge multicast code, from Linus Lüssing
      
      31) Fix VXLAN IGMP join regression due to an inverted check, from Cong
          Wang
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (70 commits)
        net/mlx5_core: Support MANAGE_PAGES and QUERY_PAGES firmware command changes
        tun: signedness bug in tun_get_user()
        qlcnic: Fix diagnostic interrupt test for 83xx adapters
        qlcnic: Fix beacon state return status handling
        qlcnic: Fix set driver version command
        net: tg3: fix NULL pointer dereference in tg3_io_error_detected and tg3_io_slot_reset
        net_sched: restore "linklayer atm" handling
        drivers/net/ethernet/via/via-velocity.c: update napi implementation
        Revert "cxgb3: Check and handle the dma mapping errors"
        be2net: Clear any capability flags that driver is not interested in.
        openvswitch: Reset tunnel key between input and output.
        openvswitch: Use correct type while allocating flex array.
        openvswitch: Fix bad merge resolution.
        tun: compare with 0 instead of total_len
        rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header
        ethernet/arc/arc_emac - fix NAPI "work > weight" warning
        ip_tunnel: Do not use inner ip-header-id for tunnel ip-header-id.
        bnx2x: prevent crash in shutdown flow with CNIC
        bnx2x: fix PTE write access error
        bnx2x: fix memory leak in VF
        ...
      ddea368c
  2. 16 8月, 2013 9 次提交
  3. 15 8月, 2013 17 次提交
  4. 14 8月, 2013 7 次提交
    • A
      m68k: Truncate base in do_div() · ea077b1b
      Andreas Schwab 提交于
      Explicitly truncate the second operand of do_div() to 32 bits to guard
      against bogus code calling it with a 64-bit divisor.
      
      [Thorsten]
      
      After upgrading from 3.2 to 3.10, mounting a btrfs volume fails with:
      
      btrfs: setting nodatacow, compression disabled
      btrfs: enabling auto recovery
      btrfs: disk space caching is enabled
      *** ZERO DIVIDE ***   FORMAT=2
      Current process id is 722
      BAD KERNEL TRAP: 00000000
      Modules linked in: evdev mac_hid ext4 crc16 jbd2 mbcache btrfs xor lzo_compress zlib_deflate raid6_pq crc32c libcrc32c
      PC: [<319535b2>] __btrfs_map_block+0x11c/0x119a [btrfs]
      SR: 2000  SP: 30c1fab4  a2: 30f0faf0
      d0: 00000000    d1: 00001000    d2: 00000000    d3: 00000000
      d4: 00010000    d5: 00000000    a0: 3085c72c    a1: 3085c72c
      Process mount (pid: 722, task=30f0faf0)
      Frame format=2 instr addr=319535ae
      Stack from 30c1faec:
              00000000 00000020 00000000 00001000 00000000 01401000 30253928 300ffc00
              00a843ac 3026f640 00000000 00010000 0009e250 00d106c0 00011220 00000000
              00001000 301c6830 0009e32a 000000ff 00000009 3085c72c 00000000 00000000
              30c1fd14 00000000 00000020 00000000 30c1fd14 0009e26c 00000020 00000003
              00000000 0009dd8a 300b0b6c 30253928 00a843ac 00001000 00000000 00000000
              0000a008 3194e76a 30253928 00a843ac 00001000 00000000 00000000 00000002
      Call Trace: [<00001000>] kernel_pg_dir+0x0/0x1000
      
          [...]
      
      Code: 222e ff74 2a2e ff5c 2c2e ff60 4c45 1402 <2d40> ff64 2d41 ff68 2205 4c2e 1800 ff68 4c04 0800 2041 d1c0 2206 4c2e 1400 ff68
      
      [Geert]
      
      As diagnosed by Andreas, fs/btrfs/volumes.c:__btrfs_map_block()
      calls
      
          do_div(stripe_nr, stripe_len);
      
      with stripe_len u64, while do_div() assumes the divisor is a 32-bit number.
      
      Due to the lack of truncation in the m68k-specific implementation of
      do_div(), the division is performed using the upper 32-bit word of
      stripe_len, which is zero.
      
      This was introduced by commit 53b381b3
      ("Btrfs: RAID5 and RAID6"), which changed the divisor from
      map->stripe_len (struct map_lookup.stripe_len is int) to a 64-bit temporary.
      Reported-by: NThorsten Glaser <tg@debian.org>
      Signed-off-by: NAndreas Schwab <schwab@linux-m68k.org>
      Tested-by: NThorsten Glaser <tg@debian.org>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: stable@vger.kernel.org
      ea077b1b
    • G
      m68k/atari: ARAnyM - Fix NatFeat module support · e8184e10
      Geert Uytterhoeven 提交于
      As pointed out by Andreas Schwab, pointers passed to ARAnyM NatFeat calls
      should be physical addresses, not virtual addresses.
      
      Fortunately on Atari, physical and virtual kernel addresses are the same,
      as long as normal kernel memory is concerned, so this usually worked fine
      without conversion.
      
      But for modules, pointers to literal strings are located in vmalloc()ed
      memory. Depending on the version of ARAnyM, this causes the nf_get_id()
      call to just fail, or worse, crash ARAnyM itself with e.g.
      
          Gotcha! Illegal memory access. Atari PC = $968c
      
      This is a big issue for distro kernels, who want to have all drivers as
      loadable modules in an initrd.
      
      Add a wrapper for nf_get_id() that copies the literal to the stack to
      work around this issue.
      Reported-by: NThorsten Glaser <tg@debian.org>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: stable@vger.kernel.org
      e8184e10
    • W
      tun: compare with 0 instead of total_len · d9bf5f13
      Weiping Pan 提交于
      Since we set "len = total_len" in the beginning of tun_get_user(),
      so we should compare the new len with 0, instead of total_len,
      or the if statement always returns false.
      Signed-off-by: NWeiping Pan <wpan@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9bf5f13
    • A
      rtnetlink: rtnl_bridge_getlink: Call nlmsg_find_attr() with ifinfomsg header · 3e805ad2
      Asbjoern Sloth Toennesen 提交于
      Fix the iproute2 command `bridge vlan show`, after switching from
      rtgenmsg to ifinfomsg.
      
      Let's start with a little history:
      
      Feb 20:   Vlad Yasevich got his VLAN-aware bridge patchset included in
                the 3.9 merge window.
                In the kernel commit 6cbdceeb, he added attribute support to
                bridge GETLINK requests sent with rtgenmsg.
      
      Mar 6th:  Vlad got this iproute2 reference implementation of the bridge
                vlan netlink interface accepted (iproute2 9eff0e5c)
      
      Apr 25th: iproute2 switched from using rtgenmsg to ifinfomsg (63338dca)
                http://patchwork.ozlabs.org/patch/239602/
                http://marc.info/?t=136680900700007
      
      Apr 28th: Linus released 3.9
      
      Apr 30th: Stephen released iproute2 3.9.0
      
      The `bridge vlan show` command haven't been working since the switch to
      ifinfomsg, or in a released version of iproute2. Since the kernel side
      only supports rtgenmsg, which iproute2 switched away from just prior to
      the iproute2 3.9.0 release.
      
      I haven't been able to find any documentation, about neither rtgenmsg
      nor ifinfomsg, and in which situation to use which, but kernel commit
      88c5b5ce seams to suggest that ifinfomsg should be used.
      
      Fixing this in kernel will break compatibility, but I doubt that anybody
      have been using it due to this bug in the user space reference
      implementation, at least not without noticing this bug. That said the
      functionality is still fully functional in 3.9, when reversing iproute2
      commit 63338dca.
      
      This could also be fixed in iproute2, but thats an ugly patch that would
      reintroduce rtgenmsg in iproute2, and from searching in netdev it seams
      like rtgenmsg usage is discouraged. I'm assuming that the only reason
      that Vlad implemented the kernel side to use rtgenmsg, was because
      iproute2 was using it at the time.
      Signed-off-by: NAsbjoern Sloth Toennesen <ast@fiberby.net>
      Reviewed-by: NVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e805ad2
    • Y
      fs/proc/task_mmu.c: fix buffer overflow in add_page_map() · 8c829622
      yonghua zheng 提交于
      Recently we met quite a lot of random kernel panic issues after enabling
      CONFIG_PROC_PAGE_MONITOR.  After debuggind we found this has something
      to do with following bug in pagemap:
      
      In struct pagemapread:
      
        struct pagemapread {
            int pos, len;
            pagemap_entry_t *buffer;
            bool v2;
        };
      
      pos is number of PM_ENTRY_BYTES in buffer, but len is the size of
      buffer, it is a mistake to compare pos and len in add_page_map() for
      checking buffer is full or not, and this can lead to buffer overflow and
      random kernel panic issue.
      
      Correct len to be total number of PM_ENTRY_BYTES in buffer.
      
      [akpm@linux-foundation.org: document pagemapread.pos and .len units, fix PM_ENTRY_BYTES definition]
      Signed-off-by: NYonghua Zheng <younghua.zheng@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8c829622
    • C
      arch: *: Kconfig: add "kernel/Kconfig.freezer" to "arch/*/Kconfig" · 57a1a197
      Chen Gang 提交于
      All architectures include "kernel/Kconfig.freezer" except three left, so
      let them include it too, or 'allmodconfig' will report error.
      
      The related errors: (with allmodconfig for openrisc):
      
          CC      kernel/cgroup_freezer.o
        kernel/cgroup_freezer.c: In function 'freezer_css_online':
        kernel/cgroup_freezer.c:133:15: error: 'system_freezing_cnt' undeclared (first use in this function)
        kernel/cgroup_freezer.c:133:15: note: each undeclared identifier is reported only once for each function it appears in
        kernel/cgroup_freezer.c: In function 'freezer_css_offline':
        kernel/cgroup_freezer.c:157:15: error: 'system_freezing_cnt' undeclared (first use in this function)
        kernel/cgroup_freezer.c: In function 'freezer_attach':
        kernel/cgroup_freezer.c:200:4: error: implicit declaration of function 'freeze_task'
        kernel/cgroup_freezer.c: In function 'freezer_apply_state':
        kernel/cgroup_freezer.c:371:16: error: 'system_freezing_cnt' undeclared (first use in this function)
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      Cc: Richard Kuo <rkuo@codeaurora.org>
      Cc: Jonas Bonn <jonas@southpole.se>
      Cc: Chen Liqin <liqin.chen@sunplusct.com>
      Cc: Lennox Wu <lennox.wu@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      57a1a197
    • J
      ocfs2: fix null pointer dereference in ocfs2_dir_foreach_blk_id() · d6394b59
      Jeff Liu 提交于
      Fix a NULL pointer deference while removing an empty directory, which
      was introduced by commit 3704412b ("[readdir] convert ocfs2").
      
        BUG: unable to handle kernel NULL pointer dereference at (null)
        IP: [<(null)>]           (null)
        PGD 6da85067 PUD 6da89067 PMD 0
        Oops: 0010 [#1] SMP
        CPU: 0 PID: 6564 Comm: rmdir Tainted: G           O 3.11.0-rc1 #4
        RIP: 0010:[<0000000000000000>]  [<          (null)>]           (null)
        Call Trace:
          ocfs2_dir_foreach+0x49/0x50 [ocfs2]
          ocfs2_empty_dir+0x12c/0x3e0 [ocfs2]
          ocfs2_unlink+0x56e/0xc10 [ocfs2]
          vfs_rmdir+0xd5/0x140
          do_rmdir+0x1cb/0x1e0
          SyS_rmdir+0x16/0x20
          system_call_fastpath+0x16/0x1b
        Code:  Bad RIP value.
        RIP  [<          (null)>]           (null)
        RSP <ffff88006daddc10>
        CR2: 0000000000000000
      
      [dan.carpenter@oracle.com: fix pointer math]
      Signed-off-by: NJie Liu <jeff.liu@oracle.com>
      Reported-by: NDavid Weber <wb@munzinger.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Joel Becker <jlbec@evilplan.org>
      Cc: Mark Fasheh <mfasheh@suse.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d6394b59