1. 08 Dec, 2012 1 commit
  2. 01 Dec, 2012 1 commit
  3. 30 Nov, 2012 2 commits
    • Steven Rostedt's avatar
      ring-buffer: Fix race between integrity check and readers · 9366c1ba
      Steven Rostedt authored
      The function rb_check_pages() was added to make sure the ring buffer's
      pages were sane. This check is done when the ring buffer size is modified
      as well as when the iterator is released (closing the "trace" file),
      as that was considered a non fast path and a good place to do a sanity
      check.
      
      The problem is that the check does not have any locks around it.
      If one process were to read the trace file, and another were to read
      the raw binary file, the check could happen while the reader is reading
      the file.
      
      The issues with this is that the check requires to clear the HEAD page
      before doing the full check and it restores it afterward. But readers
      require the HEAD page to exist before it can read the buffer, otherwise
      it gives a nasty warning and disables the buffer.
      
      By adding the reader lock around the check, this keeps the race from
      happening.
      
      Cc: stable@vger.kernel.org # 3.6
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      9366c1ba
    • Steven Rostedt's avatar
      ring-buffer: Fix NULL pointer if rb_set_head_page() fails · 54f7be5b
      Steven Rostedt authored
      The function rb_set_head_page() searches the list of ring buffer
      pages for a the page that has the HEAD page flag set. If it does
      not find it, it will do a WARN_ON(), disable the ring buffer and
      return NULL, as this should never happen.
      
      But if this bug happens to happen, not all callers of this function
      can handle a NULL pointer being returned from it. That needs to be
      fixed.
      
      Cc: stable@vger.kernel.org # 3.0+
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      54f7be5b
  4. 23 Nov, 2012 3 commits
  5. 19 Nov, 2012 6 commits
    • David Howells's avatar
      perf: Make perf build for x86 with UAPI disintegration applied · d2709c7c
      David Howells authored
      Make perf build for x86 once the UAPI disintegration patches for that arch
      have been applied by adding the appropriate -I flags - in the right order -
      and then converting some #includes that use ../.. notation to find main kernel
      headerfiles to use <asm/foo.h> and <linux/foo.h> instead.
      
      Note that -Iarch/foo/include/uapi is present _before_ -Iarch/foo/include.
      This makes sure we get the userspace version of the pt_regs struct.  Ideally,
      we wouldn't have the latter -I flag at all, but unfortunately we want
      asm/svm.h and asm/vmx.h in builtin-kvm.c and these aren't part of the UAPI -
      at least not for x86.  I wonder if the bits outside of the __KERNEL__ guards
      *should* be transferred there.
      
      I note also that perf seems to do its dependency handling manually by listing
      all the header files it might want to use in LIB_H in the Makefile.  Can this
      be changed to use -MD?
      
      Note that to do make this work, we need to export and UAPI disintegrate
      linux/hw_breakpoint.h, which I think should've been exported previously so that
      perf can access the bits.  We have to do this in the same patch to maintain
      bisectability.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      d2709c7c
    • Sukadev Bhattiprolu's avatar
      perf powerpc: Use uapi/unistd.h to fix build error · f2d9cae9
      Sukadev Bhattiprolu authored
      Use the 'unistd.h' from arch/powerpc/include/uapi to build the perf tool.
      Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
      Acked-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Anton Blanchard <anton@au1.ibm.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: linuxppc-dev@ozlabs.org
      Link: http://lkml.kernel.org/r/20121107191818.GA16211@us.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f2d9cae9
    • David Howells's avatar
      tools: Pass the target in descend · 2b73f65d
      David Howells authored
       Fixing:
      
        [acme@sandy linux]$ cd tools
        [acme@sandy tools]$ make clean
            DESCEND power/cpupower
          CC       lib/cpufreq.o
          CC       lib/sysfs.o
          LD       libcpupower.so.0.0.0
          CC       utils/helpers/amd.o
        utils/helpers/amd.c:7:21: error: pci/pci.h: No such file or directory
        In file included from utils/helpers/amd.c:9:
        ./utils/helpers/helpers.h:137: warning: ‘struct pci_access’ declared inside parameter list
        ./utils/helpers/helpers.h:137: warning: its scope is only this definition or declaration, which is probably not what you want
        ./utils/helpers/helpers.h:139: warning: ‘struct pci_access’ declared inside parameter list
        utils/helpers/amd.c: In function ‘amd_pci_get_num_boost_states’:
        utils/helpers/amd.c:120: warning: passing argument 1 of ‘pci_slot_func_init’ from incompatible pointer type
        ./utils/helpers/helpers.h:138: note: expected ‘struct pci_access **’ but argument is of type ‘struct pci_access **’
        utils/helpers/amd.c:125: warning: implicit declaration of function ‘pci_read_byte’
        utils/helpers/amd.c:132: warning: implicit declaration of function ‘pci_cleanup’
        make[1]: *** [utils/helpers/amd.o] Error 1
        make: *** [cpupower_clean] Error 2
        [acme@sandy tools]$
      Reported-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/n/tip-tviyimq6x6nm77sj5lt4t19f@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2b73f65d
    • David Howells's avatar
      tools: Honour the O= flag when tool build called from a higher Makefile · bf35182f
      David Howells authored
      Honour the O= flag that was passed to a higher level Makefile and then passed
      down as part of a tool build.
      
      To make this work, the top-level Makefile passes the original O= flag and
      subdir=tools to the tools/Makefile, and that in turn passes
      subdir=$(O)/$(subdir)/foodir when building tool foo in directory
      $(O)/$(subdir)/foodir (where the intervening slashes aren't added if an
      element is missing).
      
      For example, take perf.  This is found in tools/perf/.  Assume we're building
      into directory ~/zebra/, so we pass O=~/zebra to make.  Dependening on where
      we run the build from, we see:
      
      	make run in dir		$(OUTPUT) dir
      	=======================	==================
      	linux			~/zebra/tools/perf/
      	linux/tools		~/zebra/perf/
      	linux/tools/perf	~/zebra/
      
      and if O= is not set, we get:
      
      	make run in dir		$(OUTPUT) dir
      	=======================	==================
      	linux			linux/tools/perf/
      	linux/tools		linux/tools/perf/
      	linux/tools/perf	linux/tools/perf/
      
      The output directories are created by the descend function if they don't
      already exist.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1378.1352379110@warthog.procyon.org.ukSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bf35182f
    • David Howells's avatar
      tools: Define a Makefile function to do subdir processing · ca9dfc6c
      David Howells authored
      Define a Makefile function that can be called with $(call ...) to wrap
      the subdir make invocations in tools/Makefile.
      
      This will allow us in the next patch to insert bits in there to honour
      O= flags when called from the top-level Makefile.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1378.1352379110@warthog.procyon.org.ukSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ca9dfc6c
    • David Howells's avatar
      Merge branch 'x86-pre-uapi' into perf-uapi · 60606d42
      David Howells authored
      David Howells (1):
            x86: Export asm/{svm.h,vmx.h,perf_regs.h}
      60606d42
  6. 15 Nov, 2012 1 commit
  7. 13 Nov, 2012 1 commit
  8. 08 Nov, 2012 1 commit
  9. 30 Oct, 2012 3 commits
  10. 29 Oct, 2012 2 commits
  11. 28 Oct, 2012 11 commits
  12. 27 Oct, 2012 4 commits
  13. 26 Oct, 2012 4 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · e657e078
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "This is what we usually expect at this stage of the game, lots of
        little things, mostly in drivers.  With the occasional 'oops didn't
        mean to do that' kind of regressions in the core code."
      
       1) Uninitialized data in __ip_vs_get_timeouts(), from Arnd Bergmann
      
       2) Reject invalid ACK sequences in Fast Open sockets, from Jerry Chu.
      
       3) Lost error code on return from _rtl_usb_receive(), from Christian
          Lamparter.
      
       4) Fix reset resume on USB rt2x00, from Stanislaw Gruszka.
      
       5) Release resources on error in pch_gbe driver, from Veaceslav Falico.
      
       6) Default hop limit not set correctly in ip6_template_metrics[], fix
          from Li RongQing.
      
       7) Gianfar PTP code requests wrong kind of resource during probe, fix
          from Wei Yang.
      
       8) Fix VHOST net driver on big-endian, from Michael S Tsirkin.
      
       9) Mallenox driver bug fixes from Jack Morgenstein, Or Gerlitz, Moni
          Shoua, Dotan Barak, and Uri Habusha.
      
      10) usbnet leaks memory on TX path, fix from Hemant Kumar.
      
      11) Use socket state test, rather than presence of FIN bit packet, to
          determine FIONREAD/SIOCINQ value.  Fix from Eric Dumazet.
      
      12) Fix cxgb4 build failure, from Vipul Pandya.
      
      13) Provide a SYN_DATA_ACKED state to complement SYN_FASTOPEN in socket
          info dumps.  From Yuchung Cheng.
      
      14) Fix leak of security path in kfree_skb_partial().  Fix from Eric
          Dumazet.
      
      15) Handle RX FIFO overflows more resiliently in pch_gbe driver, from
          Veaceslav Falico.
      
      16) Fix MAINTAINERS file pattern for networking drivers, from Jean
          Delvare.
      
      17) Add iPhone5 IDs to IPHETH driver, from Jay Purohit.
      
      18) VLAN device type change restriction is too strict, and should not
          trigger for the automatically generated vlan0 device.  Fix from Jiri
          Pirko.
      
      19) Make PMTU/redirect flushing work properly again in ipv4, from
          Steffen Klassert.
      
      20) Fix memory corruptions by using kfree_rcu() in netlink_release().
          From Eric Dumazet.
      
      21) More qmi_wwan device IDs, from Bjørn Mork.
      
      22) Fix unintentional change of SNAT/DNAT hooks in generic NAT
          infrastructure, from Elison Niven.
      
      23) Fix 3.6.x regression in xt_TEE netfilter module, from Eric Dumazet.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (57 commits)
        tilegx: fix some issues in the SW TSO support
        qmi_wwan/cdc_ether: move Novatel 551 and E362 to qmi_wwan
        net: usb: Fix memory leak on Tx data path
        net/mlx4_core: Unmap UAR also in the case of error flow
        net/mlx4_en: Don't use vlan tag value as an indication for vlan presence
        net/mlx4_en: Fix double-release-range in tx-rings
        bas_gigaset: fix pre_reset handling
        vhost: fix mergeable bufs on BE hosts
        gianfar_ptp: use iomem, not ioports resource tree in probe
        ipv6: Set default hoplimit as zero.
        NET_VENDOR_TI: make available for am33xx as well
        pch_gbe: fix error handling in pch_gbe_up()
        b43: Fix oops on unload when firmware not found
        mwifiex: clean up scan state on error
        mwifiex: return -EBUSY if specific scan request cannot be honored
        brcmfmac: fix potential NULL dereference
        Revert "ath9k_hw: Updated AR9003 tx gain table for 5GHz"
        ath9k_htc: Add PID/VID for a Ubiquiti WiFiStation
        rt2x00: usb: fix reset resume
        rtlwifi: pass rx setup error code to caller
        ...
      e657e078
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma · f761237e
      Linus Torvalds authored
      Pull slave-dmaengine fixes from Vinod Koul:
       "Three fixes for slave dmanegine.
      
        Two are for typo omissions in sifr dmaengine driver and the last one
        is for the imx driver fixing a missing unlock"
      
      * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: sirf: fix a typo in moving running dma_desc to active queue
        dmaengine: sirf: fix a typo in dma_prep_interleaved
        dmaengine: imx-dma: fix missing unlock on error in imxdma_xfer_desc()
      f761237e
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-for-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 64b1cbaa
      Linus Torvalds authored
      Pull power management and ACPI fixes from Rafael J Wysocki:
      
       - Fix for a memory leak in acpi_bind_one() from Jesper Juhl.
      
       - Fix for an error code path memory leak in pm_genpd_attach_cpuidle()
         from Jonghwan Choi.
      
       - Fix for smp_processor_id() usage in preemptible code in powernow-k8
         from Andreas Herrmann.
      
       - Fix for a suspend-related memory leak in cpufreq stats from Xiaobing
         Tu.
      
       - Freezer fix for failure to clear PF_NOFREEZE along with PF_KTHREAD in
         flush_old_exec() from Oleg Nesterov.
      
       - acpi_processor_notify() fix from Alan Cox.
      
      * tag 'pm+acpi-for-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: missing break
        freezer: exec should clear PF_NOFREEZE along with PF_KTHREAD
        Fix memory leak in cpufreq stats.
        cpufreq / powernow-k8: Remove usage of smp_processor_id() in preemptible code
        PM / Domains: Fix memory leak on error path in pm_genpd_attach_cpuidle
        ACPI: Fix memory leak in acpi_bind_one()
      64b1cbaa
    • Linus Torvalds's avatar
      Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband · f54c77dd
      Linus Torvalds authored
      Pull infiniband fixes from Roland Dreier:
       "Small batch of fixes for 3.7:
         - Fix crash in error path in cxgb4
         - Fix build error on 32 bits in mlx4
         - Fix SR-IOV bugs in mlx4"
      
      * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
        mlx4_core: Perform correct resource cleanup if mlx4_QUERY_ADAPTER() fails
        mlx4_core: Remove annoying debug messages from SR-IOV flow
        RDMA/cxgb4: Don't free chunk that we have failed to allocate
        IB/mlx4: Synchronize cleanup of MCGs in MCG paravirtualization
        IB/mlx4: Fix QP1 P_Key processing in the Primary Physical Function (PPF)
        IB/mlx4: Fix build error on platforms where UL is not 64 bits
      f54c77dd