1. 20 Mar, 2013 4 commits
    • Tom Parkin's avatar
      l2tp: add udp encap socket destroy handler · 9980d001
      Tom Parkin authored
      L2TP sessions hold a reference to the tunnel socket to prevent it going away
      while sessions are still active.  However, since tunnel destruction is handled
      by the sock sk_destruct callback there is a catch-22: a tunnel with sessions
      cannot be deleted since each session holds a reference to the tunnel socket.
      If userspace closes a managed tunnel socket, or dies, the tunnel will persist
      and it will be neccessary to individually delete the sessions using netlink
      commands.  This is ugly.
      
      To prevent this occuring, this patch leverages the udp encapsulation socket
      destroy callback to gain early notification when the tunnel socket is closed.
      This allows us to safely close the sessions running in the tunnel, dropping
      the tunnel socket references in the process.  The tunnel socket is then
      destroyed as normal, and the tunnel resources deallocated in sk_destruct.
      
      While we're at it, ensure that l2tp_tunnel_closeall correctly drops session
      references to allow the sessions to be deleted rather than leaking.
      Signed-off-by: default avatarTom Parkin <tparkin@katalix.com>
      Signed-off-by: default avatarJames Chapman <jchapman@katalix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9980d001
    • Tom Parkin's avatar
      udp: add encap_destroy callback · 44046a59
      Tom Parkin authored
      Users of udp encapsulation currently have an encap_rcv callback which they can
      use to hook into the udp receive path.
      
      In situations where a encapsulation user allocates resources associated with a
      udp encap socket, it may be convenient to be able to also hook the proto
      .destroy operation.  For example, if an encap user holds a reference to the
      udp socket, the destroy hook might be used to relinquish this reference.
      
      This patch adds a socket destroy hook into udp, which is set and enabled
      in the same way as the existing encap_rcv hook.
      Signed-off-by: default avatarTom Parkin <tparkin@katalix.com>
      Signed-off-by: default avatarJames Chapman <jchapman@katalix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44046a59
    • Masatake YAMATO's avatar
      genetlink: trigger BUG_ON if a group name is too long · f1e79e20
      Masatake YAMATO authored
      Trigger BUG_ON if a group name is longer than GENL_NAMSIZ.
      Signed-off-by: default avatarMasatake YAMATO <yamato@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f1e79e20
    • David S. Miller's avatar
      Merge branch 'master' of git://1984.lsi.us.es/nf · 90b2621f
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      The following patchset contains 7 Netfilter/IPVS fixes for 3.9-rc, they are:
      
      * Restrict IPv6 stateless NPT targets to the mangle table. Many users are
        complaining that this target does not work in the nat table, which is the
        wrong table for it, from Florian Westphal.
      
      * Fix possible use before initialization in the netns init path of several
        conntrack protocol trackers (introduced recently while improving conntrack
        netns support), from Gao Feng.
      
      * Fix incorrect initialization of copy_range in nfnetlink_queue, spotted
        by Eric Dumazet during the NFWS2013, patch from myself.
      
      * Fix wrong calculation of next SCTP chunk in IPVS, from Julian Anastasov.
      
      * Remove rcu_read_lock section in IPVS while calling ipv4_update_pmtu
        not required anymore after change introduced in 3.7, again from Julian.
      
      * Fix SYN looping in IPVS state sync if the backup is used a real server
        in DR/TUN modes, this required a new /proc entry to disable the director
        function when acting as backup, also from Julian.
      
      * Remove leftover IP_NF_QUEUE Kconfig after ip_queue removal, noted by
        Paul Bolle.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90b2621f
  2. 19 Mar, 2013 20 commits
  3. 18 Mar, 2013 16 commits
    • Jean Delvare's avatar
      hwmon: (lm75) Fix tcn75 prefix · 25eba81b
      Jean Delvare authored
      The TCN75 has its own prefix for a long time now.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      25eba81b
    • Jean Delvare's avatar
      hwmon: (lm75.h) Update header inclusion · 5a4c0601
      Jean Delvare authored
      File lm75.h used to include <linux/hwmon.h> for SENSORS_LIMIT() but
      this function is gone by now. Instead we call clamp_val() so we should
      include <linux/kernel.h>, where this function is declared.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      5a4c0601
    • Jean Delvare's avatar
      MAINTAINERS: Remove Mark M. Hoffman · 94877548
      Jean Delvare authored
      Mark M. Hoffman stopped working on the Linux kernel several years
      ago, so he should no longer be listed as a driver maintainer. I'm not
      even sure if his e-mail address still works.
      
      I can take over 3 drivers he was responsible for, the 4th one will
      fall down to the subsystem maintainer.
      
      Also give Mark credit for all the good work he did.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: Wolfram Sang <wolfram@the-dreams.de>
      94877548
    • Dave Chinner's avatar
      xfs: ensure we capture IO errors correctly · e0018738
      Dave Chinner authored
      Failed buffer readahead can leave the buffer in the cache marked
      with an error. Most callers that then issue a subsequent read on the
      buffer do not zero the b_error field out, and so we may incorectly
      detect an error during IO completion due to the stale error value
      left on the buffer.
      
      Avoid this problem by zeroing the error before IO submission. This
      ensures that the only IO errors that are detected those captured
      from are those captured from bio submission or completion.
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit c163f9a1)
      e0018738
    • Mark Tinguely's avatar
      xfs: fix xfs_iomap_eof_prealloc_initial_size type · 3325beed
      Mark Tinguely authored
      Fix the return type of xfs_iomap_eof_prealloc_initial_size() to
      xfs_fsblock_t to reflect the fact that the return value may be an
      unsigned 64 bits if XFS_BIG_BLKNOS is defined.
      Signed-off-by: default avatarMark Tinguely <tinguely@sgi.com>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit e8108ced)
      3325beed
    • Brian Foster's avatar
      xfs: fix potential infinite loop in xfs_iomap_prealloc_size() · 83cdadd8
      Brian Foster authored
      If freesp == 0, we could end up in an infinite loop while squashing
      the preallocation. Break the loop when we've killed the prealloc
      entirely.
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      Signed-off-by: default avatarBen Myers <bpm@sgi.com>
      
      (cherry picked from commit e78c420b)
      83cdadd8
    • Eric Dumazet's avatar
      tcp: dont handle MTU reduction on LISTEN socket · 0d4f0608
      Eric Dumazet authored
      When an ICMP ICMP_FRAG_NEEDED (or ICMPV6_PKT_TOOBIG) message finds a
      LISTEN socket, and this socket is currently owned by the user, we
      set TCP_MTU_REDUCED_DEFERRED flag in listener tsq_flags.
      
      This is bad because if we clone the parent before it had a chance to
      clear the flag, the child inherits the tsq_flags value, and next
      tcp_release_cb() on the child will decrement sk_refcnt.
      
      Result is that we might free a live TCP socket, as reported by
      Dormando.
      
      IPv4: Attempt to release TCP socket in state 1
      
      Fix this issue by testing sk_state against TCP_LISTEN early, so that we
      set TCP_MTU_REDUCED_DEFERRED on appropriate sockets (not a LISTEN one)
      
      This bug was introduced in commit 563d34d0
      (tcp: dont drop MTU reduction indications)
      Reported-by: default avatardormando <dormando@rydia.net>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d4f0608
    • Maciej Żenczykowski's avatar
      bnx2x: fix occasional statistics off-by-4GB error · b009aac1
      Maciej Żenczykowski authored
      The UPDATE_QSTAT function introduced on February 15, 2012
      in commit 1355b704 "bnx2x: consistent statistics after
      internal driver reload" incorrectly fails to handle overflow
      during addition of the lower 32-bit field of a stat.
      
      This bug is present since 3.4-rc1 and should thus be considered
      a candidate for stable 3.4+ releases.
      
      Google-Bug-Id: 8374428
      Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
      Cc: Mintz Yuval <yuvalmin@broadcom.com>
      Acked-by: default avatarEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b009aac1
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20130318' of git://git.infradead.org/linux-mtd · 35f8c769
      Linus Torvalds authored
      Pull MTD fixes from David Woodhouse:
       "This fixes a couple of problems.  Firstly, some people are actually
        still using old small-page flash and we broke it by removing the ready
        check.
      
        Secondly.  fix the handling of partitions on Broadcom 47xx devices.
        Recent changes had made it misdetect the location of the NVRAM and
        scribble over the bootloader when it tried to update the variables
        there.  With predictably sad results."
      
      * tag 'for-linus-20130318' of git://git.infradead.org/linux-mtd:
        mtd: nand: reintroduce NAND_NO_READRDY as NAND_NEED_READRDY
        mtd: bcm47xxpart: look for NVRAM at the end of device
        Revert "mtd: bcm47xxpart: improve probing of nvram partition"
      35f8c769
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · 4b767155
      Linus Torvalds authored
      Pull selinux bugfix from James Morris.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        selinux: use GFP_ATOMIC under spin_lock
      4b767155
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 991657a3
      Linus Torvalds authored
      Pull s390 fixes from Martin Schwidefsky:
       "A couple of bug fixes, the most hairy on is the flush_tlb_kernel_range
        fix.  Another case of "how could this ever have worked?"."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/kdump: Do not add standby memory for kdump
        drivers/i2c: remove !S390 dependency, add missing GENERIC_HARDIRQS dependencies
        s390/scm: process availability
        s390/scm_blk: suspend writes
        s390/scm_drv: extend notify callback
        s390/scm_blk: fix request number accounting
        s390/mm: fix flush_tlb_kernel_range()
        s390/mm: fix vmemmap size calculation
        s390: critical section cleanup vs. machine checks
      991657a3
    • Linus Torvalds's avatar
      Merge tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 1c6ba37b
      Linus Torvalds authored
      Pull ARM SoC bug fixes from Arnd Bergmann:
       "Things are calming down for arm-soc as well.  This set of bug fixes is
        dominated in size by the at91 platform bug fixes.  Some of them were
        meant to go through the framebuffer tree during the merge window, but
        since the framebuffer maintainer could not be reached, I offered to
        take them here.  The other notable at91 change is the addition of
        pinctrl definitions to fix the NAND controller.
      
        The rest are mostly simple regression fixes:
      
         - Our removal of VIRT_TO_BUS conflicted with Stephen Rothwell's
           renaming of the Kconfig symbol.  You will get a trivial merge
           conflict here, we still want to remove it.
         - missing bits for clocks on imx and s5pv210
         - missing header inclusions in mmp and shmobile
         - typos in s5pv210 camera and vt8500 clock support code
      
        and three trivial fixes for pre-3.8 bugs:
      
         - an old bogus build warning in the joystick driver
         - a misleading Kconfig description
         - a NULL pointer check on davinci"
      
      * tag 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: fix CONFIG_VIRT_TO_BUS handling
        ARM: i.MX35: enable MAX clock
        ARM: Scorpion is a v7 architecture, not v6
        ARM: mmp: add platform_device head file in gplugd
        input/joystick: use get_cycles on ARM
        [media] s5p-fimc: fix s5pv210 build
        clk: vt8500: Fix "fix device clock divisor calculations"
        ARM: i.MX25: Fix DT compilation
        ARM: at91: fix infinite loop in at91_irq_suspend/resume
        ARM: at91: add gpio suspend/resume support when using pinctrl
        ARM: at91: fix LCD-wiring mode
        atmel_lcdfb: fix 16-bpp modes on older SOCs
        ARM: at91: dt: at91sam9x5: complete NAND pinctrl
        ARM: at91: dt: at91sam9x5: correct NAND pins comments
        ARM: davinci: edma: fix dmaengine induced null pointer dereference on da830
        ARM: shmobile: marzen: Include mmc/host.h
        ARM: EXYNOS: Add #dma-cells for generic dma binding support for PL330
        ARM: S5PV210: Fix PL330 DMA controller clkdev entries
      1c6ba37b
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · a15cd063
      Linus Torvalds authored
      Pull powerpc fixes from Ben Herrenschmidt:
       "Here's a few powerpc fixes for 3.9, mostly regressions (though not all
        from 3.9 merge window) that we've been hammering into shape over the
        last couple of weeks.  They fix booting on Cell and G5 among other
        things (yes, we've been a bit sloppy with older machines this time
        around)."
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc: Rename USER_ESID_BITS* to ESID_BITS*
        powerpc: Update kernel VSID range
        powerpc: Make VSID_BITS* dependency explicit
        powerpc: Make sure that we alays include CONFIG_BINFMT_ELF
        powerpc/ptrace: Fix brk.len used uninitialised
        powerpc: Fix -mcmodel=medium breakage in prom_init.c
        powerpc: Remove last traces of POWER4_ONLY
        powerpc: Fix cputable entry for 970MP rev 1.0
        powerpc: Fix STAB initialization
      a15cd063
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 6210d421
      Linus Torvalds authored
      Pull ARM fixes from Russell King:
       "Just three fixes this time - a fix for a fix for our memset function,
        fixing the dummy clockevent so that it doesn't interfere with real
        hardware clockevents, and fixing a build error for Tegra."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7675/1: amba: tegra-ahb: Fix build error w/ PM_SLEEP w/o PM_RUNTIME
        ARM: 7674/1: smp: Avoid dummy clockevent being preferred over real hardware clock-event
        ARM: 7670/1: fix the memset fix
      6210d421
    • Arnd Bergmann's avatar
      ARM: fix CONFIG_VIRT_TO_BUS handling · b4811bac
      Arnd Bergmann authored
      887cbce0 "arch Kconfig: centralise CONFIG_ARCH_NO_VIRT_TO_BUS"
      and  4febd95a "Select VIRT_TO_BUS directly where needed" from
      Stephen Rothwell changed globally how CONFIG_VIRT_TO_BUS is
      selected, while my own a5d533ee "ARM: disable virt_to_bus/
      virt_to_bus almost everywhere" was merged at the same time and
      changed which platforms select it on ARM.
      
      The result of this conflict was that we again see CONFIG_VIRT_TO_BUS
      on all ARM systems. This patch fixes up the problem and removes
      CONFIG_ARCH_NO_VIRT_TO_BUS again on ARM.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      b4811bac
    • Dan Carpenter's avatar
      selinux: use GFP_ATOMIC under spin_lock · 4502403d
      Dan Carpenter authored
      The call tree here is:
      
      sk_clone_lock()              <- takes bh_lock_sock(newsk);
      xfrm_sk_clone_policy()
      __xfrm_sk_clone_policy()
      clone_policy()               <- uses GFP_ATOMIC for allocations
      security_xfrm_policy_clone()
      security_ops->xfrm_policy_clone_security()
      selinux_xfrm_policy_clone()
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
      4502403d