1. 10 Jan, 2013 4 commits
    • Romain Kuntz's avatar
      ipv6: use addrconf_get_prefix_route for prefix route lookup [v2] · 21caa662
      Romain Kuntz authored
      Replace ip6_route_lookup() with addrconf_get_prefix_route() when
      looking up for a prefix route. This ensures that the connected prefix
      is looked up in the main table, and avoids the selection of other
      matching routes located in different tables as well as blackhole
      or prohibited entries.
      
      In addition, this fixes an Opps introduced by commit 64c6d08e (ipv6:
      del unreachable route when an addr is deleted on lo), that would occur
      when a blackhole or prohibited entry is selected by ip6_route_lookup().
      Such entries have a NULL rt6i_table argument, which is accessed by
      __ip6_del_rt() when trying to lock rt6i_table->tb6_lock.
      
      The function addrconf_is_prefix_route() is not used anymore and is
      removed.
      
      [v2] Minor indentation cleanup and log updates.
      Signed-off-by: default avatarRomain Kuntz <r.kuntz@ipflavors.com>
      Acked-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Acked-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      21caa662
    • Romain Kuntz's avatar
      ipv6: fix the noflags test in addrconf_get_prefix_route · 85da53bf
      Romain Kuntz authored
      The tests on the flags in addrconf_get_prefix_route() does no make
      much sense: the 'noflags' parameter contains the set of flags that
      must not match with the route flags, so the test must be done
      against 'noflags', and not against 'flags'.
      Signed-off-by: default avatarRomain Kuntz <r.kuntz@ipflavors.com>
      Acked-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      85da53bf
    • Eric Dumazet's avatar
      tcp: fix splice() and tcp collapsing interaction · f26845b4
      Eric Dumazet authored
      Under unusual circumstances, TCP collapse can split a big GRO TCP packet
      while its being used in a splice(socket->pipe) operation.
      
      skb_splice_bits() releases the socket lock before calling
      splice_to_pipe().
      
      [ 1081.353685] WARNING: at net/ipv4/tcp.c:1330 tcp_cleanup_rbuf+0x4d/0xfc()
      [ 1081.371956] Hardware name: System x3690 X5 -[7148Z68]-
      [ 1081.391820] cleanup rbuf bug: copied AD3BCF1 seq AD370AF rcvnxt AD3CF13
      
      To fix this problem, we must eat skbs in tcp_recv_skb().
      
      Remove the inline keyword from tcp_recv_skb() definition since
      it has three call sites.
      Reported-by: default avatarChristian Becker <c.becker@traviangames.com>
      Cc: Willy Tarreau <w@1wt.eu>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Tested-by: default avatarWilly Tarreau <w@1wt.eu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f26845b4
    • Eric Dumazet's avatar
      tcp: splice: fix an infinite loop in tcp_read_sock() · ff905b1e
      Eric Dumazet authored
      commit 02275a2e (tcp: don't abort splice() after small transfers)
      added a regression.
      
      [   83.843570] INFO: rcu_sched self-detected stall on CPU
      [   83.844575] INFO: rcu_sched detected stalls on CPUs/tasks: { 6} (detected by 0, t=21002 jiffies, g=4457, c=4456, q=13132)
      [   83.844582] Task dump for CPU 6:
      [   83.844584] netperf         R  running task        0  8966   8952 0x0000000c
      [   83.844587]  0000000000000000 0000000000000006 0000000000006c6c 0000000000000000
      [   83.844589]  000000000000006c 0000000000000096 ffffffff819ce2bc ffffffffffffff10
      [   83.844592]  ffffffff81088679 0000000000000010 0000000000000246 ffff880c4b9ddcd8
      [   83.844594] Call Trace:
      [   83.844596]  [<ffffffff81088679>] ? vprintk_emit+0x1c9/0x4c0
      [   83.844601]  [<ffffffff815ad449>] ? schedule+0x29/0x70
      [   83.844606]  [<ffffffff81537bd2>] ? tcp_splice_data_recv+0x42/0x50
      [   83.844610]  [<ffffffff8153beaa>] ? tcp_read_sock+0xda/0x260
      [   83.844613]  [<ffffffff81537b90>] ? tcp_prequeue_process+0xb0/0xb0
      [   83.844615]  [<ffffffff8153c0f0>] ? tcp_splice_read+0xc0/0x250
      [   83.844618]  [<ffffffff814dc0c2>] ? sock_splice_read+0x22/0x30
      [   83.844622]  [<ffffffff811b820b>] ? do_splice_to+0x7b/0xa0
      [   83.844627]  [<ffffffff811ba4bc>] ? sys_splice+0x59c/0x5d0
      [   83.844630]  [<ffffffff8119745b>] ? putname+0x2b/0x40
      [   83.844633]  [<ffffffff8118bcb4>] ? do_sys_open+0x174/0x1e0
      [   83.844636]  [<ffffffff815b6202>] ? system_call_fastpath+0x16/0x1b
      
      if recv_actor() returns 0, we should stop immediately,
      because looping wont give a chance to drain the pipe.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Willy Tarreau <w@1wt.eu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff905b1e
  2. 09 Jan, 2013 2 commits
  3. 08 Jan, 2013 5 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · ed2c8911
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Nothing too exciting here, just a few regression and trivial fixes,
        and new quirks for HD-audio and USB-audio.
      
         - HD-audio mute LED mode enum fix
         - Fix kernel panic of Digidesign Mbox2 usb-audio quirk (which was new
           in 3.8-rc1)
         - Creative BT-D1 usb-audio quirk
         - mute LED fixup for HP Pavillion 17 laptop"
      
      * tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
        ALSA: au88x0: fix incorrect left shift
        sound: oss/pas2: Fix possible access out of array
        ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirk
        ALSA: usb-audio: Add support for Creative BT-D1 via usb sound quirks
        ALSA: hda - Switch "On" and "Off" for "Mute-LED Mode" kcontrol
      ed2c8911
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 5c33d9b2
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) New sysctl ndisc_notify needs some documentation, from Hanns
          Frederic Sowa.
      
       2) Netfilter REJECT target doesn't set transport header of SKB
          correctly, from Mukund Jampala.
      
       3) Forcedeth driver needs to check for DMA mapping failures, from Larry
          Finger.
      
       4) brcmsmac driver can't use usleep_range while holding locks, use
          udelay instead.  From Niels Ole Salscheider.
      
       5) Fix unregister of netlink bridge multicast database handlers, from
          Vlad Yasevich and Rami Rosen.
      
       6) Fix checksum calculations in netfilter's ipv6 network prefix
          translation module.
      
       7) Fix high order page allocation failures in netfilter xt_recent, from
          Eric Dumazet.
      
       8) mac802154 needs to use netif_rx_ni() instead of netif_rx() because
          mac802154_process_data() can execute in process rather than
          interrupt context.  From Alexander Aring.
      
       9) Fix splice handling of MSG_SENDPAGE_NOTLAST, otherwise we elide one
          tcp_push() too many.  From Eric Dumazet and Willy Tarreau.
      
      10) Fix skb->truesize tracking in XEN netfront driver, from Ian
          Campbell.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (46 commits)
        xen/netfront: improve truesize tracking
        ipv4: fix NULL checking in devinet_ioctl()
        tcp: fix MSG_SENDPAGE_NOTLAST logic
        net/ipv4/ipconfig: really display the BOOTP/DHCP server's address.
        ip-sysctl: fix spelling errors
        mac802154: fix NOHZ local_softirq_pending 08 warning
        ipv6: document ndisc_notify in networking/ip-sysctl.txt
        ath9k: Fix Kconfig for ATH9K_HTC
        netfilter: xt_recent: avoid high order page allocations
        netfilter: fix missing dependencies for the NOTRACK target
        netfilter: ip6t_NPT: fix IPv6 NTP checksum calculation
        bridge: add empty br_mdb_init() and br_mdb_uninit() definitions.
        vxlan: allow live mac address change
        bridge: Correctly unregister MDB rtnetlink handlers
        brcmfmac: fix parsing rsn ie for ap mode.
        brcmsmac: add copyright information for Canonical
        rtlwifi: rtl8723ae: Fix warning for unchecked pci_map_single() call
        rtlwifi: rtl8192se: Fix warning for unchecked pci_map_single() call
        rtlwifi: rtl8192de: Fix warning for unchecked pci_map_single() call
        rtlwifi: rtl8192ce: Fix warning for unchecked pci_map_single() call
        ...
      5c33d9b2
    • Ian Campbell's avatar
      xen/netfront: improve truesize tracking · d9a58a78
      Ian Campbell authored
      Using RX_COPY_THRESHOLD is incorrect if the SKB is actually smaller
      than that. We have already accounted for this in
      NETFRONT_SKB_CB(skb)->pull_to so use that instead.
      
      Fixes WARN_ON from skb_try_coalesce.
      Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
      Cc: Sander Eikelenboom <linux@eikelenboom.it>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: annie li <annie.li@oracle.com>
      Cc: xen-devel@lists.xen.org
      Cc: netdev@vger.kernel.org
      Cc: stable@kernel.org # 3.7.x only
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d9a58a78
    • David S. Miller's avatar
      Merge branch 'master' of git://1984.lsi.us.es/nf · 32fa10b2
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      The following batch contains Netfilter fixes for 3.8-rc2, they are:
      
      * Fix IPv6 stateless network/port translation (NPT) checksum
        calculation, from Ulrich Weber.
      
      * Fix for xt_recent to avoid memory allocation failures if large
        hashtables are used, from Eric Dumazet.
      
      * Fix missing dependencies in Kconfig for the deprecated NOTRACK,
        from myself.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32fa10b2
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-for-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 2a893f91
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
      
       - Removal of some ACPICA code that the kernel will never use from Lv
         Zheng.
      
       - APEI fix from Adrian Huang.
      
       - Removal of unnecessary ACPI memory hotplug driver code from Liu
         Jinsong.
      
       - Minor ACPI power management fixes.
      
       - ACPI debug code fix from Joe Perches.
      
       - ACPI fix to make system bus device nodes get the right names.
      
       - PNP resources handling fixes from Witold Szczeponik.
      
       - cpuidle fix for a recent regression stalling boot on systems with
         great numbers of CPUs from Daniel Lezcano.
      
       - cpuidle fixes from Sivaram Nair.
      
       - intel_idle debug message fix from Youquan Song.
      
       - cpufreq build regression fix from Larry Finger.
      
       - cpufreq fix for an obscure initialization race related to statistics
         from Konstantin Khlebnikov.
      
       - cpufreq change disabling the Longhaul driver by default from Rafał
         Bilski.
      
       - PM core fix preventing device suspend errors from happening during
         system suspend due to obscure race conditions.
      
       - PM QoS local variable name cleanup.
      
      * tag 'pm+acpi-for-3.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM: Move disabling/enabling runtime PM to late suspend/early resume
        PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request()
        ACPI / scan: Do not use dummy HID for system bus ACPI nodes
        cpufreq / governor: Fix problem with cpufreq_ondemand or cpufreq_conservative
        cpufreq / Longhaul: Disable driver by default
        cpufreq / stats: fix race between stats allocation and first usage
        cpuidle: fix lock contention in the idle path
        intel_idle: pr_debug information need separated
        cpuidle / coupled: fix ready counter decrement
        cpuidle: Fix finding state with min power_usage
        PNP: Handle IORESOURCE_BITS in resource allocation
        PNP: Simplify setting of resources
        ACPI / power: Remove useless message from device registering routine
        ACPI / glue: Update DBG macro to include KERN_DEBUG
        ACPI / PM: Do not apply ACPI_SUCCESS() to acpi_bus_get_device() result
        ACPI / memhotplug: remove redundant logic of acpi memory hotadd
        ACPI / APEI: Fix the returned value in erst_dbg_read
        ACPICA: Remove useless mini-C library.
      2a893f91
  4. 07 Jan, 2013 21 commits
  5. 06 Jan, 2013 2 commits
  6. 05 Jan, 2013 6 commits
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-sleep' · f67ffa95
      Rafael J. Wysocki authored
      * pm-sleep:
        PM: Move disabling/enabling runtime PM to late suspend/early resume
      f67ffa95
    • Rafael J. Wysocki's avatar
      PM: Move disabling/enabling runtime PM to late suspend/early resume · 9f6d8f6a
      Rafael J. Wysocki authored
      Currently, the PM core disables runtime PM for all devices right
      after executing subsystem/driver .suspend() callbacks for them
      and re-enables it right before executing subsystem/driver .resume()
      callbacks for them.  This may lead to problems when there are
      two devices such that the .suspend() callback executed for one of
      them depends on runtime PM working for the other.  In that case,
      if runtime PM has already been disabled for the second device,
      the first one's .suspend() won't work correctly (and analogously
      for resume).
      
      To make those issues go away, make the PM core disable runtime PM
      for devices right before executing subsystem/driver .suspend_late()
      callbacks for them and enable runtime PM for them right after
      executing subsystem/driver .resume_early() callbacks for them.  This
      way the potential conflitcs between .suspend_late()/.resume_early()
      and their runtime PM counterparts are still prevented from happening,
      but the subtle ordering issues related to disabling/enabling runtime
      PM for devices during system suspend/resume are much easier to avoid.
      Reported-and-tested-by: default avatarJan-Matthias Braun <jan_braun@gmx.net>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
      Cc: 3.4+ <stable@vger.kernel.org>
      9f6d8f6a
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-qos' · 868b0935
      Rafael J. Wysocki authored
      * pm-qos:
        PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request()
      868b0935
    • Rafael J. Wysocki's avatar
      PM / QoS: Rename local variable in dev_pm_qos_add_ancestor_request() · 4ce47802
      Rafael J. Wysocki authored
      Local variable 'error' in dev_pm_qos_add_ancestor_request() need
      not contain error codes only, so rename it to 'ret'.
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4ce47802
    • Nickolai Zeldovich's avatar
      nfs: avoid dereferencing null pointer in initiate_bulk_draining · ecf0eb9e
      Nickolai Zeldovich authored
      Fix an inverted null pointer check in initiate_bulk_draining().
      Signed-off-by: default avatarNickolai Zeldovich <nickolai@csail.mit.edu>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      Cc: stable@vger.kernel.org [>= 3.7]
      ecf0eb9e
    • Roland Dreier's avatar
      printk: fix incorrect length from print_time() when seconds > 99999 · 35dac27c
      Roland Dreier authored
      print_prefix() passes a NULL buf to print_time() to get the length of
      the time prefix; when printk times are enabled, the current code just
      returns the constant 15, which matches the format "[%5lu.%06lu] " used
      to print the time value.  However, this is obviously incorrect when the
      whole seconds part of the time gets beyond 5 digits (100000 seconds is a
      bit more than a day of uptime).
      
      The simple fix is to use snprintf(NULL, 0, ...) to calculate the actual
      length of the time prefix.  This could be micro-optimized but it seems
      better to have simpler, more readable code here.
      
      The bug leads to the syslog system call miscomputing which messages fit
      into the userspace buffer.  If there are enough messages to fill
      log_buf_len and some have a timestamp >= 100000, dmesg may fail with:
      
          # dmesg
          klogctl: Bad address
      
      When this happens, strace shows that the failure is indeed EFAULT due to
      the kernel mistakenly accessing past the end of dmesg's buffer, since
      dmesg asks the kernel how big a buffer it needs, allocates a bit more,
      and then gets an error when it asks the kernel to fill it:
      
          syslog(0xa, 0, 0)                       = 1048576
          mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa4d25d2000
          syslog(0x3, 0x7fa4d25d2010, 0x100008)   = -1 EFAULT (Bad address)
      
      As far as I can see, the bug has been there as long as print_time(),
      which comes from commit 084681d1 ("printk: flush continuation lines
      immediately to console") in 3.5-rc5.
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Joe Perches <joe@perches.com>
      Cc: Sylvain Munaut <s.munaut@whatever-company.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      35dac27c