1. 23 Feb, 2012 3 commits
  2. 22 Feb, 2012 7 commits
  3. 21 Feb, 2012 10 commits
    • David S. Miller's avatar
      ipv4: ping: Fix recvmsg MSG_OOB error handling. · a5e7424d
      David S. Miller authored
      Don't return an uninitialized variable as the error, return
      -EOPNOTSUPP instead.
      Reported-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a5e7424d
    • Greg Rose's avatar
      rtnetlink: Fix problem with buffer allocation · 115c9b81
      Greg Rose authored
      Implement a new netlink attribute type IFLA_EXT_MASK.  The mask
      is a 32 bit value that can be used to indicate to the kernel that
      certain extended ifinfo values are requested by the user application.
      At this time the only mask value defined is RTEXT_FILTER_VF to
      indicate that the user wants the ifinfo dump to send information
      about the VFs belonging to the interface.
      
      This patch fixes a bug in which certain applications do not have
      large enough buffers to accommodate the extra information returned
      by the kernel with large numbers of SR-IOV virtual functions.
      Those applications will not send the new netlink attribute with
      the interface info dump request netlink messages so they will
      not get unexpectedly large request buffers returned by the kernel.
      
      Modifies the rtnl_calcit function to traverse the list of net
      devices and compute the minimum buffer size that can hold the
      info dumps of all matching devices based upon the filter passed
      in via the new netlink attribute filter mask.  If no filter
      mask is sent then the buffer allocation defaults to NLMSG_GOODSIZE.
      
      With this change it is possible to add yet to be defined netlink
      attributes to the dump request which should make it fairly extensible
      in the future.
      Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      115c9b81
    • Michel Machado's avatar
      neighbour: Fixed race condition at tbl->nht · 84338a6c
      Michel Machado authored
      When the fixed race condition happens:
      
      1. While function neigh_periodic_work scans the neighbor hash table
      pointed by field tbl->nht, it unlocks and locks tbl->lock between
      buckets in order to call cond_resched.
      
      2. Assume that function neigh_periodic_work calls cond_resched, that is,
      the lock tbl->lock is available, and function neigh_hash_grow runs.
      
      3. Once function neigh_hash_grow finishes, and RCU calls
      neigh_hash_free_rcu, the original struct neigh_hash_table that function
      neigh_periodic_work was using doesn't exist anymore.
      
      4. Once back at neigh_periodic_work, whenever the old struct
      neigh_hash_table is accessed, things can go badly.
      Signed-off-by: default avatarMichel Machado <michel@digirati.com.br>
      Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84338a6c
    • Yevgeny Petrilin's avatar
      mlx4: Setting new port types after all interfaces unregistered · 3d8f9308
      Yevgeny Petrilin authored
      In port type change flow, need to set the new port types only after
      all interfaces have finished the unregister process.
      Otherwise, during unregister, one of the interfaces might issue a SET_PORT
      command with wrong port types, it can cause bad FW behavior.
      Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d8f9308
    • Yevgeny Petrilin's avatar
      mlx4: Replacing pool_lock with mutex · 730c41d5
      Yevgeny Petrilin authored
      Under the spinlock we call request_irq(), which allocates memory with GFP_KERNEL,
      This causes the following trace when DEBUG_SPINLOCK is enabled, it can cause
      the following trace:
      
       BUG: spinlock wrong CPU on CPU#2, ethtool/2595
       lock: ffff8801f9cbc2b0, .magic: dead4ead, .owner: ethtool/2595, .owner_cpu: 0
       Pid: 2595, comm: ethtool Not tainted 3.0.18 #2
       Call Trace:
       spin_bug+0xa2/0xf0
       do_raw_spin_unlock+0x71/0xa0
       _raw_spin_unlock+0xe/0x10
       mlx4_assign_eq+0x12b/0x190 [mlx4_core]
       mlx4_en_activate_cq+0x252/0x2d0 [mlx4_en]
       ? mlx4_en_activate_rx_rings+0x227/0x370 [mlx4_en]
       mlx4_en_start_port+0x189/0xb90 [mlx4_en]
       mlx4_en_set_ringparam+0x29a/0x340 [mlx4_en]
       dev_ethtool+0x816/0xb10
       ? dev_get_by_name_rcu+0xa4/0xe0
       dev_ioctl+0x2b5/0x470
       handle_mm_fault+0x1cd/0x2d0
       sock_do_ioctl+0x5d/0x70
       sock_ioctl+0x79/0x2f0
       do_vfs_ioctl+0x8c/0x340
       sys_ioctl+0xa1/0xb0
       system_call_fastpath+0x16/0x1b
      
      Replacing with mutex, which is enough in this case.
      Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      730c41d5
    • Dave Jones's avatar
      zaurus: Add ID for C-750/C-760/C-860/SL-C3000 PDA in MDLM mode · 15103aa7
      Dave Jones authored
      In 16adf5d0 I removed an over-broad
      alias that caused zaurus.ko to bind to unrelated devices.
      I had a report that at least one valid case no longer auto-loads because of this.
      This patch adds an ID for that case.
      Reported-by: default avatarRaphael Wimmer <raphael.wimmer@ur.de>
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      15103aa7
    • Jozsef Kadlecsik's avatar
      netfilter: ctnetlink: fix soft lockup when netlink adds new entries · af14cca1
      Jozsef Kadlecsik authored
      Marcell Zambo and Janos Farago noticed and reported that when
      new conntrack entries are added via netlink and the conntrack table
      gets full, soft lockup happens. This is because the nf_conntrack_lock
      is held while nf_conntrack_alloc is called, which is in turn wants
      to lock nf_conntrack_lock while evicting entries from the full table.
      
      The patch fixes the soft lockup with limiting the holding of the
      nf_conntrack_lock to the minimum, where it's absolutely required.
      Signed-off-by: default avatarJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      af14cca1
    • Joerg Willmann's avatar
      netfilter: ebtables: fix alignment problem in ppc · 88ba136d
      Joerg Willmann authored
      ebt_among extension of ebtables uses __alignof__(_xt_align) while the
      corresponding kernel module uses __alignof__(ebt_replace) to determine
      the alignment in EBT_ALIGN().
      
      These are the results of these values on different platforms:
      
      x86 x86_64 ppc
      __alignof__(_xt_align) 4 8 8
      __alignof__(ebt_replace) 4 8 4
      
      ebtables fails to add rules which use the among extension.
      
      I'm using kernel 2.6.33 and ebtables 2.0.10-4
      
      According to Bart De Schuymer, userspace alignment was changed to
      _xt_align to fix an alignment issue on a userspace32-kernel64 system
      (he thinks it was for an ARM device). So userspace must be right.
      The kernel alignment macro needs to change so it also uses _xt_align
      instead of ebt_replace. The userspace changes date back from
      June 29, 2009.
      Signed-off-by: default avatarJoerg Willmann <joe@clnt.de>
      Signed-off by: Bart De Schuymer <bdschuym@pandora.be>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      88ba136d
    • Jack Morgenstein's avatar
      mlx4_core: Do not map BF area if capability is 0 · 3d747473
      Jack Morgenstein authored
      BF can be disabled in some cases, the capability field, bf_reg_size is set
      to zero in this case. Don't map the BF area in this case, it would cause
      failures.  In addition, leaving the BF area unmapped
      also alerts the ETH driver to not use BF.
      Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d747473
    • David S. Miller's avatar
  4. 20 Feb, 2012 2 commits
  5. 19 Feb, 2012 6 commits
  6. 18 Feb, 2012 12 commits
    • Linus Torvalds's avatar
      Linux 3.3-rc4 · b01543df
      Linus Torvalds authored
      b01543df
    • Linus Torvalds's avatar
      Merge tag 'fixes-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · be2874cb
      Linus Torvalds authored
      These are the bug fixes that have accumulated since 3.3-rc3 in arm-soc.
      The majority of them are regression fixes for stuff that broke during
      the merge 3.3 window.
      
      The notable ones are:
      
      * The at91 ata drivers both broke because of an earlier cleanup patch that
        some other patches were based on. Jean-Christophe decided to remove
        the legacy at91_ide driver and fix the new-style at91-pata driver while
        keeping the cleanup patch. I almost rejected the patches for being too
        late and too big but in the end decided to accept them because they
        fix a regression.
      
      * A patch fixing build breakage from the sysdev-to-device conversion
        colliding with other changes touches a number of mach-s3c files.
      
      * b0654037 "ARM: orion: Fix Orion5x GPIO regression from MPP cleanup"
        is a mechanical change that unfortunately touches a lot of lines
        that should up in the diffstat.
      
      * tag 'fixes-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
        ARM: at91: drop ide driver in favor of the pata one
        pata/at91: use newly introduced SMC accessors
        ARM: at91: add accessor to manage SMC
        ARM: at91:rtc/rtc-at91sam9: ioremap register bank
        ARM: at91: USB AT91 gadget registration for module
        ep93xx: fix build of vision_ep93xx.c
        ARM: OMAP2xxx: PM: fix OMAP2xxx-specific UART idle bug in v3.3
        ARM: orion: Fix USB phy for orion5x.
        ARM: orion: Fix Orion5x GPIO regression from MPP cleanup
        ARM: EXYNOS: Add cpu-offset property in gic device tree node
        ARM: EXYNOS: Bring exynos4-dt up to date
        ARM: OMAP3: cm-t35: fix section mismatch warning
        ARM: OMAP2: Fix the OMAP2 only build break seen with 2011+ ARM tool-chains
        ARM: tegra: paz00: fix wrong UART port on mini-pcie plug
        ARM: tegra: paz00: fix wrong SD1 power gpio
        i2c: tegra: Add devexit_p() for remove
        ARM: EXYNOS: Correct M-5MOLS sensor clock frequency on Universal C210 board
        ARM: EXYNOS: Correct framebuffer window size on Nuri board
        ARM: SAMSUNG: Fix missing api-change from subsys_interface change
        ARM: EXYNOS: Fix "warning: initialization from incompatible pointer type"
        ...
      be2874cb
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 584216b7
      Linus Torvalds authored
      1) VETH_INFO_PEER netlink attribute needs to have it's size validated,
         from Thomas Graf.
      
      2) 'poll' module option of bnx2x driver crashes the machine, just remove
         it.  From Michal Schmidt.
      
      3) ks8851_mll driver reads the irq number from two places, but only
         initializes one of them, oops.  Use only one location and fix this
         problem, from Jan Weitzel.
      
      4) Fix buffer overrun and unicast sterring bugs in mellanox mlx4 driver,
         from Eugenia Emantayev.
      
      5) Swapped kcalloc() args in RxRPC and mlx4, from Axel Lin.
      
      6) PHY MDIO device name regression fixes from Florian Fainelli.
      
      7) If the wake event IRQ line is different from the netdevice one, we
         have to properly route it to the stmmac interrupt handler.  From
         Francesco Virlinzi.
      
      8) Fix rwlock lock initialization ordering bug in mac80211, from
         Mohammed Shafi Shajakhan.
      
      9) TCP lost_cnt can get out of sync, and in fact go negative, in certain
         circumstances.  Fix the way we specify what sequence range to operate
         on in tcp_sacktag_one() to fix this bug.  From Neal Cardwell.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
        net/ethernet: ks8851_mll fix irq handling
        veth: Enforce minimum size of VETH_INFO_PEER
        stmmac: update the driver version to Feb 2012 (v2)
        stmmac: move hw init in the probe (v2)
        stmmac: request_irq when use an ext wake irq line (v2)
        stmmac: do not discard frame on dribbling bit assert
        ipheth: Add iPhone 4S
        mlx4: add unicast steering entries to resource_tracker
        mlx4: fix QP tree trashing
        mlx4: fix buffer overrun
        3c59x: shorten timer period for slave devices
        netpoll: netpoll_poll_dev() should access dev->flags
        RxRPC: Fix kcalloc parameters swapped
        bnx2x: remove the 'poll' module option
        tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK
        ks8851: Fix NOHZ local_softirq_pending 08 warning
        bnx2x: fix bnx2x_storm_stats_update() on big endian
        ixp4xx-eth: fix PHY name to match MDIO bus name
        octeon: fix PHY name to match MDIO bus name
        fec: fix PHY name to match fixed MDIO bus name
        ...
      584216b7
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · bff98bfc
      Linus Torvalds authored
      Fixes a bootstrapping issue for some registers when a less commonly used
      method for register cache initialisation is used.  Only affects a fairly
      small proportion of users that both don't use explicit register defaults
      and do use the cache.
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: Fix cache defaults initialization from raw cache defaults
      bff98bfc
    • Linus Torvalds's avatar
      Merge tag 'ecryptfs-3.3-rc4-fixes' of... · 46860666
      Linus Torvalds authored
      Merge tag 'ecryptfs-3.3-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
      
      Fixes maximum filename length and filesystem type reporting in statfs() calls
      and also fixes stale inode mode bits on eCryptfs inodes after a POSIX ACL was
      set on the lower filesystem's inode.
      
      * tag 'ecryptfs-3.3-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
        ecryptfs: remove the second argument of k[un]map_atomic()
        eCryptfs: Copy up lower inode attrs after setting lower xattr
        eCryptfs: Improve statfs reporting
      46860666
    • Linus Torvalds's avatar
      Merge tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 7857b996
      Linus Torvalds authored
      pinctrl fixes for v3.3
      
      * tag 'pinctrl-for-torvalds-20120216' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: restore pin naming
      7857b996
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 06ca7c43
      Linus Torvalds authored
      Here are a few more fixes for powerpc.  Some are regressions, the rest
      is simple/obvious/nasty enough that I deemed it good to go now.
      
      Here's also step one of deprecating legacy iSeries support: we are
      removing it from the main defconfig.
      
      Nobody seems to be using it anymore and the code is nasty to maintain,
      (involves horrible hacks in various low level areas of the kernel) so we
      plan to actually rip it out at some point.  For now let's just avoid
      building it by default.  Stephen will proceed to do the actual removal
      later (probably 3.4 or 3.5).
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc/perf: power_pmu_start restores incorrect values, breaking frequency events
        powerpc/adb: Use set_current_state()
        powerpc: Disable interrupts early in Program Check
        powerpc: Remove legacy iSeries from ppc64_defconfig
        powerpc/fsl/pci: Fix PCIe fixup regression
        powerpc: Fix kernel log of oops/panic instruction dump
      06ca7c43
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci · 7bcd5b46
      Linus Torvalds authored
      One regression fix for SR-IOV on PPC and a couple of misc fixes from
      Yinghai.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci:
        PCI: Fix pci cardbus removal
        PCI: set pci sriov page size before reading SRIOV BAR
        PCI: workaround hard-wired bus number V2
      7bcd5b46
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 58e44baf
      Linus Torvalds authored
      3 radeon fixes, I have some exynos fixes to push later but I'll queue
      them separately once I've looked them over a bit.
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/radeon/kms: fix MSI re-arm on rv370+
        drm/radeon/kms/atom: bios scratch reg handling updates
        drm/radeon/kms: drop lock in return path of radeon_fence_count_emitted.
      58e44baf
    • Linus Torvalds's avatar
    • Linus Torvalds's avatar
      i387: re-introduce FPU state preloading at context switch time · 34ddc81a
      Linus Torvalds authored
      After all the FPU state cleanups and finally finding the problem that
      caused all our FPU save/restore problems, this re-introduces the
      preloading of FPU state that was removed in commit b3b0870e ("i387:
      do not preload FPU state at task switch time").
      
      However, instead of simply reverting the removal, this reimplements
      preloading with several fixes, most notably
      
       - properly abstracted as a true FPU state switch, rather than as
         open-coded save and restore with various hacks.
      
         In particular, implementing it as a proper FPU state switch allows us
         to optimize the CR0.TS flag accesses: there is no reason to set the
         TS bit only to then almost immediately clear it again.  CR0 accesses
         are quite slow and expensive, don't flip the bit back and forth for
         no good reason.
      
       - Make sure that the same model works for both x86-32 and x86-64, so
         that there are no gratuitous differences between the two due to the
         way they save and restore segment state differently due to
         architectural differences that really don't matter to the FPU state.
      
       - Avoid exposing the "preload" state to the context switch routines,
         and in particular allow the concept of lazy state restore: if nothing
         else has used the FPU in the meantime, and the process is still on
         the same CPU, we can avoid restoring state from memory entirely, just
         re-expose the state that is still in the FPU unit.
      
         That optimized lazy restore isn't actually implemented here, but the
         infrastructure is set up for it.  Of course, older CPU's that use
         'fnsave' to save the state cannot take advantage of this, since the
         state saving also trashes the state.
      
      In other words, there is now an actual _design_ to the FPU state saving,
      rather than just random historical baggage.  Hopefully it's easier to
      follow as a result.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      34ddc81a
    • Linus Torvalds's avatar
      i387: move TS_USEDFPU flag from thread_info to task_struct · f94edacf
      Linus Torvalds authored
      This moves the bit that indicates whether a thread has ownership of the
      FPU from the TS_USEDFPU bit in thread_info->status to a word of its own
      (called 'has_fpu') in task_struct->thread.has_fpu.
      
      This fixes two independent bugs at the same time:
      
       - changing 'thread_info->status' from the scheduler causes nasty
         problems for the other users of that variable, since it is defined to
         be thread-synchronous (that's what the "TS_" part of the naming was
         supposed to indicate).
      
         So perfectly valid code could (and did) do
      
      	ti->status |= TS_RESTORE_SIGMASK;
      
         and the compiler was free to do that as separate load, or and store
         instructions.  Which can cause problems with preemption, since a task
         switch could happen in between, and change the TS_USEDFPU bit. The
         change to TS_USEDFPU would be overwritten by the final store.
      
         In practice, this seldom happened, though, because the 'status' field
         was seldom used more than once, so gcc would generally tend to
         generate code that used a read-modify-write instruction and thus
         happened to avoid this problem - RMW instructions are naturally low
         fat and preemption-safe.
      
       - On x86-32, the current_thread_info() pointer would, during interrupts
         and softirqs, point to a *copy* of the real thread_info, because
         x86-32 uses %esp to calculate the thread_info address, and thus the
         separate irq (and softirq) stacks would cause these kinds of odd
         thread_info copy aliases.
      
         This is normally not a problem, since interrupts aren't supposed to
         look at thread information anyway (what thread is running at
         interrupt time really isn't very well-defined), but it confused the
         heck out of irq_fpu_usable() and the code that tried to squirrel
         away the FPU state.
      
         (It also caused untold confusion for us poor kernel developers).
      
      It also turns out that using 'task_struct' is actually much more natural
      for most of the call sites that care about the FPU state, since they
      tend to work with the task struct for other reasons anyway (ie
      scheduling).  And the FPU data that we are going to save/restore is
      found there too.
      
      Thanks to Arjan Van De Ven <arjan@linux.intel.com> for pointing us to
      the %esp issue.
      
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Reported-and-tested-by: default avatarRaphael Prevost <raphael@buro.asia>
      Acked-and-tested-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Tested-by: default avatarPeter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f94edacf