1. 07 5月, 2014 34 次提交
  2. 06 5月, 2014 6 次提交
    • D
      slab: Fix off by one in object max number tests. · 30321c7b
      David Miller 提交于
      If freelist_idx_t is a byte, SLAB_OBJ_MAX_NUM should be 255 not 256, and
      likewise if freelist_idx_t is a short, then it should be 65535 not
      65536.
      
      This was leading to all kinds of random crashes on sparc64 where
      PAGE_SIZE is 8192.  One problem shown was that if spinlock debugging was
      enabled, we'd get deadlocks in copy_pte_range() or do_wp_page() with the
      same cpu already holding a lock it shouldn't hold, or the lock belonging
      to a completely unrelated process.
      
      Fixes: a41adfaa ("slab: introduce byte sized index for the freelist of a slab")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      30321c7b
    • J
      slab: fix the type of the index on freelist index accessor · 7cc68973
      Joonsoo Kim 提交于
      Commit a41adfaa ("slab: introduce byte sized index for the freelist
      of a slab") changes the size of freelist index and also changes
      prototype of accessor function to freelist index.  And there was a
      mistake.
      
      The mistake is that although it changes the size of freelist index
      correctly, it changes the size of the index of freelist index
      incorrectly.  With patch, freelist index can be 1 byte or 2 bytes, that
      means that num of object on on a slab can be more than 255.  So we need
      more than 1 byte for the index to find the index of free object on
      freelist.  But, above patch makes this index type 1 byte, so slab which
      have more than 255 objects cannot work properly and in consequence of
      it, the system cannot boot.
      
      This issue was reported by Steven King on m68knommu which would use
      2 bytes freelist index:
      
        https://lkml.org/lkml/2014/4/16/433
      
      To fix is easy.  To change the type of the index of freelist index on
      accessor functions is enough to fix this bug.  Although 2 bytes is
      enough, I use 4 bytes since it have no bad effect and make things more
      easier.  This fix was suggested and tested by Steven in his original
      report.
      Signed-off-by: NJoonsoo Kim <iamjoonsoo.kim@lge.com>
      Reported-and-acked-by: NSteven King <sfking@fdwdc.com>
      Acked-by: NChristoph Lameter <cl@linux.com>
      Tested-by: NJames Hogan <james.hogan@imgtec.com>
      Tested-by: NDavid Miller <davem@davemloft.net>
      Cc: Pekka Enberg <penberg@kernel.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7cc68973
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 2080cee4
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) e1000e computes header length incorrectly wrt vlans, fix from Vlad
          Yasevich.
      
       2) ns_capable() check in sock_diag netlink code, from Andrew
          Lutomirski.
      
       3) Fix invalid queue pairs handling in virtio_net, from Amos Kong.
      
       4) Checksum offloading busted in sxgbe driver due to incorrect
          descriptor layout, fix from Byungho An.
      
       5) Fix build failure with SMC_DEBUG set to 2 or larger, from Zi Shen
          Lim.
      
       6) Fix uninitialized A and X registers in BPF interpreter, from Alexei
          Starovoitov.
      
       7) Fix arch dependencies of candence driver.
      
       8) Fix netlink capabilities checking tree-wide, from Eric W Biederman.
      
       9) Don't dump IFLA_VF_PORTS if netlink request didn't ask for it in
          IFLA_EXT_MASK, from David Gibson.
      
      10) IPV6 FIB dump restart doesn't handle table changes that happen
          meanwhile, causing the code to loop forever or emit dups, fix from
          Kumar Sandararajan.
      
      11) Memory leak on VF removal in bnx2x, from Yuval Mintz.
      
      12) Bug fixes for new Altera TSE driver from Vince Bridgers.
      
      13) Fix route lookup key in SCTP, from Xugeng Zhang.
      
      14) Use BH blocking spinlocks in SLIP, as per a similar fix to CAN/SLCAN
          driver.  From Oliver Hartkopp.
      
      15) TCP doesn't bump retransmit counters in some code paths, fix from
          Eric Dumazet.
      
      16) Clamp delayed_ack in tcp_cubic to prevent theoretical divides by
          zero.  Fix from Liu Yu.
      
      17) Fix locking imbalance in error paths of HHF packet scheduler, from
          John Fastabend.
      
      18) Properly reference the transport module when vsock_core_init() runs,
          from Andy King.
      
      19) Fix buffer overflow in cdc_ncm driver, from Bjørn Mork.
      
      20) IP_ECN_decapsulate() doesn't see a correct SKB network header in
          ip_tunnel_rcv(), fix from Ying Cai.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (132 commits)
        net: macb: Fix race between HW and driver
        net: macb: Remove 'unlikely' optimization
        net: macb: Re-enable RX interrupt only when RX is done
        net: macb: Clear interrupt flags
        net: macb: Pass same size to DMA_UNMAP as used for DMA_MAP
        ip_tunnel: Set network header properly for IP_ECN_decapsulate()
        e1000e: Restrict MDIO Slow Mode workaround to relevant parts
        e1000e: Fix issue with link flap on 82579
        e1000e: Expand workaround for 10Mb HD throughput bug
        e1000e: Workaround for dropped packets in Gig/100 speeds on 82579
        net/mlx4_core: Don't issue PCIe speed/width checks for VFs
        net/mlx4_core: Load the Eth driver first
        net/mlx4_core: Fix slave id computation for single port VF
        net/mlx4_core: Adjust port number in qp_attach wrapper when detaching
        net: cdc_ncm: fix buffer overflow
        Altera TSE: ALTERA_TSE should depend on HAS_DMA
        vsock: Make transport the proto owner
        net: sched: lock imbalance in hhf qdisc
        net: mvmdio: Check for a valid interrupt instead of an error
        net phy: Check for aneg completion before setting state to PHY_RUNNING
        ...
      2080cee4
    • L
      Merge tag 'usb-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 783e9e8e
      Linus Torvalds 提交于
      Pull USB fixes from Greg KH:
       "Here are some small fixes and device ids for 3.15-rc4.
      
        All have been in linux-next just fine"
      
      * tag 'usb-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: Nokia 5300 should be treated as unusual dev
        USB: Nokia 305 should be treated as unusual dev
        fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6
        usb: storage: shuttle_usbat: fix discs being detected twice
        usb: qcserial: add a number of Dell devices
        USB: OHCI: fix problem with global suspend on ATI controllers
        usb: gadget: at91-udc: fix irq and iomem resource retrieval
        usb: phy: fsm: change "|" to "||" for condition OTG_STATE_A_WAIT_BCON at statemachine
        usb: phy: fsm: update OTG HNP state transition
      783e9e8e
    • L
      Merge tag 'tty-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · df862f62
      Linus Torvalds 提交于
      Pull tty/serial fixes from Greg KH:
       "Here are some tty and serial driver fixes for things reported
        recently"
      
      * tag 'tty-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        tty: Fix lockless tty buffer race
        Revert "tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc"
        drivers/tty/hvc: don't free hvc_console_setup after init
        n_tty: Fix n_tty_write crash when echoing in raw mode
        tty: serial: 8250_core.c Bug fix for Exar chips.
      df862f62
    • L
      Merge tag 'staging-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · a1e74464
      Linus Torvalds 提交于
      Pull staging / iio fixes from Greg KH:
       "Here are some small IIO driver fixes for 3.15-rc4 that resolve some
        reported issues"
      
      * tag 'staging-3.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        iio: adc: Nothing in ADC should be a bool CONFIG
        iio: exynos_adc: use indio_dev->dev structure to handle child nodes
        iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference
        staging:iio:ad2s1200 fix missing parenthesis in a for statment.
      a1e74464