1
0
Fork 0
Commit Graph

602296 Commits (aad108aa9d1aca5be178ef40325dcc99b448e866)

Author SHA1 Message Date
Steven Rostedt (Red Hat) aad108aa9d tracing: Add trace_printk sample code
Add sample code to test trace_printk(). The trace_printk() functions should
never be used in production code. This makes testing it a bit more
difficult. Having a sample module that can test use cases of trace_printk()
can help out.

Currently it just tests trace_printk() where it will be converted into:

 trace_bputs()
 trace_puts()
 trace_bprintk()

as well as staying as the normal _trace_printk().

It also tests its use in interrupt context as that will test the auxilery
buffers.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:54:21 -04:00
Andy Lutomirski e2ace00117 tracing: Choose static tp_printk buffer by explicit nesting count
Currently, the trace_printk code chooses which static buffer to use based
on what type of atomic context (NMI, IRQ, etc) it's in.  Simplify the
code and make it more robust: simply count the nesting depth and choose
a buffer based on the current nesting depth.

The new code will only drop an event if we nest more than 4 deep,
and the old code was guaranteed to malfunction if that happened.

Link: http://lkml.kernel.org/r/07ab03aecfba25fcce8f9a211b14c9c5e2865c58.1464289095.git.luto@kernel.org

Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:54:20 -04:00
Omar Sandoval 35abb67de7 tracing: expose current->comm to [ku]probe events
ftrace is very quick to give up on saving the task command line (see
`trace_save_cmdline()`). The workaround for events which really care
about the command line is to explicitly assign it as part of the entry.
However, this doesn't work for kprobe events, as there's no
straightforward way to get access to current->comm. Add a kprobe/uprobe
event variable $comm which provides exactly that.

Link: http://lkml.kernel.org/r/f59b472033b943a370f5f48d0af37698f409108f.1465435894.git.osandov@fb.com

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:54:19 -04:00
Steven Rostedt (Red Hat) 345ddcc882 ftrace: Have set_ftrace_pid use the bitmap like events do
Convert set_ftrace_pid to use the bitmap like set_event_pid does. This
allows for instances to use the pid filtering as well, and will allow for
function-fork option to set if the children of a traced function should be
traced or not.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:54:19 -04:00
Steven Rostedt (Red Hat) 76c813e266 tracing: Move pid_list write processing into its own function
The addition of PIDs into a pid_list via the write operation of
set_event_pid is a bit complex. The same operation will be needed for
function tracing pids. Move the code into its own generic function in
trace.c, so that we can avoid duplication of this code.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:54:18 -04:00
Steven Rostedt (Red Hat) 5cc8976bd5 tracing: Move the pid_list seq_file functions to be global
To allow other aspects of ftrace to use the pid_list logic, we need to reuse
the seq_file functions. Making the generic part into functions that can be
called by other files will help in this regard.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:54:17 -04:00
Steven Rostedt d8275c454d tracing: Move filtered_pid helper functions into trace.c
As the filtered_pid functions are going to be used by function tracer as
well as trace_events, move the code into the generic trace.c file.

The functions moved are:

 trace_find_filtered_pid()
 trace_ignore_this_task()
 trace_filter_add_remove_task()

Kernel Doc text was also added.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:54:17 -04:00
Steven Rostedt 4e267db135 tracing: Make the pid filtering helper functions global
Make the functions used for pid filtering global for tracing, such that the
function tracer can use the pid code as well.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:54:16 -04:00
Steven Rostedt (Red Hat) 0ded5174e9 ftracetest: Fix hist unsupported result in hist selftests
When histograms are not configured in the kernel, the ftracetest histogram
selftests should return "unsupported" and not "Failed". To detect this, the
test scripts have:

 FEATURE=`grep hist events/sched/sched_process_fork/trigger`
 if [ -z "$FEATURE" ]; then
     echo "hist trigger is not supported"
     exit_unsupported
 fi

The problem is that '-e' is in effect and any error will cause the program
to terminate. The grep for 'hist' fails, because it is not compiled it (thus
unsupported), but because grep has an error code for failing to find the
string, it causes the program to terminate, and is marked as a failed test.

Namhyung Kim recommended to test for the "hist" file located in
events/sched/sched_process_fork/hist instead, as it is more inline with the
other checks. As the hist file is only created if the histogram feature is
enabled, that is a valid check.

Link: http://lkml.kernel.org/r/20160523151538.4ea9ce0c@gandalf.local.home

Suggested-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: 76929ab51f ("kselftests/ftrace: Add hist trigger testcases")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:46:21 -04:00
Steven Rostedt (Red Hat) 70c8217acd tracing: Handle NULL formats in hold_module_trace_bprintk_format()
If a task uses a non constant string for the format parameter in
trace_printk(), then the trace_printk_fmt variable is set to NULL. This
variable is then saved in the __trace_printk_fmt section.

The function hold_module_trace_bprintk_format() checks to see if duplicate
formats are used by modules, and reuses them if so (saves them to the list
if it is new). But this function calls lookup_format() that does a strcmp()
to the value (which is now NULL) and can cause a kernel oops.

This wasn't an issue till 3debb0a9dd ("tracing: Fix trace_printk() to print
when not using bprintk()") which added "__used" to the trace_printk_fmt
variable, and before that, the kernel simply optimized it out (no NULL value
was saved).

The fix is simply to handle the NULL pointer in lookup_format() and have the
caller ignore the value if it was NULL.

Link: http://lkml.kernel.org/r/1464769870-18344-1-git-send-email-zhengjun.xing@intel.com

Reported-by: xingzhen <zhengjun.xing@intel.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Fixes: 3debb0a9dd ("tracing: Fix trace_printk() to print when not using bprintk()")
Cc: stable@vger.kernel.org # v3.5+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-06-20 09:46:12 -04:00
Linus Torvalds 5edb56491d Linux 4.7-rc3 2016-06-12 07:20:35 -07:00
Linus Torvalds 57120fac12 Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management fixes from Zhang Rui:

 - fix an ordering issue in cpu cooling that cooling device is
   registered before it's ready (freq_table being populated).
   (Lukasz Luba)

 - fix a missing comment update (Caesar Wang)

* 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  thermal: add the note for set_trip_temp
  thermal: cpu_cooling: fix improper order during initialization
2016-06-12 06:30:39 -07:00
Linus Torvalds 8714f8f5fe Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block layer fixes from Jens Axboe:
 "A small collection of fixes for the current series.  This contains:

   - Two fixes for xen-blkfront, from Bob Liu.

   - A bug fix for NVMe, releasing only the specific resources we
     requested.

   - Fix for a debugfs flags entry for nbd, from Josef.

   - Plug fix from Omar, fixing up a case of code being switched between
     two functions.

   - A missing bio_put() for the new discard callers of
     submit_bio_wait(), fixing a regression causing a leak of the bio.
     From Shaun.

   - Improve dirty limit calculation precision in the writeback code,
     fixing a case where setting a limit lower than 1% of memory would
     end up being zero.  From Tejun"

* 'for-linus' of git://git.kernel.dk/linux-block:
  NVMe: Only release requested regions
  xen-blkfront: fix resume issues after a migration
  xen-blkfront: don't call talk_to_blkback when already connected to blkback
  nbd: pass the nbd pointer for flags debugfs
  block: missing bio_put following submit_bio_wait
  blk-mq: really fix plug list flushing for nomerge queues
  writeback: use higher precision calculation in domain_dirty_limits()
2016-06-11 18:42:59 -07:00
Linus Torvalds 3a7c114d35 GPIO fixes for the v4.7 series:
- Fix a NULL pointer dereference when we are searching the
   GPIO device list but one of the devices have been removed
   (struct gpio_chip pointer is NULL).
 
 - Fix unaligned reference counters: we were ending on +3 after
   all said and done. It should be 0. Remove an extraneous
   get_device(), and call cdev_del() followed by device_del()
   in gpiochip_remove() instead and the count goes to zero and
   calls the release() function properly.
 
 - Fix a compile warning due to a missing #include in the
   OF/device tree portions.
 
 - Select ANON_INODES for GPIOLIB, we're using that for our
   character device. Some randconfig tests disclosed the
   problem.
 
 - Make sure the Zynq driver clock runs also without CONFIG_PM
   enabled
 
 - Fix an off-by-one error in the 104-DIO-48E driver
 
 - Fix warnings in bcm_kona_gpio_reset()
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXXKHgAAoJEEEQszewGV1zELIP/0puBntMtTmu1RP7WI1NisWd
 XMMpE+Qn+FSzgZD+zg5UOjovYOJBUB8FDAcj/WWypXxjGWlouOJhf/EIluLnZCsX
 T/L+kKcXtzU0e97eyw0TCwo/EjpZXHV9d1jxJqYmkJyhK5C2MLQ0a4pLXVIk2Tov
 q4t9CDOq1rH/SzWFPSDyk1PBdN031U6Z5ASQyvMAqYG/X/aTJE/5btIeif51xKzV
 QpU/5YBRAmstSsRqPXYJt6p82Voozd03h0Kyc4QVwhhYo0+QtVQ22Tr6RRrGWD20
 vaPHLvFIO3lfVVlZrvjzwbFB4ffQRGSnUWYlSmEMp2O2DxahfC0Q2U6Sj2phDGKM
 IxvkGHYvJypXtl9qQtzK2mRgvNOitGhRobvWx/+kGbBGEvWHvr8YwgsPDX+96ydJ
 x01OR2tSmoPYQmaOP87sKuDTV0cYuGsnGJxEPR9A7RHg4fAuK1NoOLG3d/xcx5Az
 klNpHAwQHDfq/H69OChhorIvXNNFW09MQI1wyd9NPhiJpS030J/HkFxy3x6Ne6km
 jkmnjcDCtdq4PrPHkZkoUJar3v0cQIjAP73kK9IR3MRiZgEbc5a3bAulYXUdLQNj
 9YHHFdzMcvXPcjKEU28vU9cIN2j8jMfr7B0q5awwensZGou0rLcQ41b631n5B+Bp
 1SsubtXxLckRwPrYMVLd
 =EaGr
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "A new bunch of GPIO fixes for v4.7.

  This time I am very grateful that Ricardo Ribalda Delgado went in and
  fixed my stupid refcounting mistakes in the removal path for GPIO
  chips.  I had a feeling something was wrong here and so it was.  It
  exploded on OMAP and it fixes their problem.  Now it should be (more)
  solid.

  The rest i compilation, Kconfig and driver fixes.  Some tagged for
  stable.

  Summary:

   - Fix a NULL pointer dereference when we are searching the GPIO
     device list but one of the devices have been removed (struct
     gpio_chip pointer is NULL).

   - Fix unaligned reference counters: we were ending on +3 after all
     said and done.  It should be 0.  Remove an extraneous get_device(),
     and call cdev_del() followed by device_del() in gpiochip_remove()
     instead and the count goes to zero and calls the release() function
     properly.

   - Fix a compile warning due to a missing #include in the OF/device
     tree portions.

   - Select ANON_INODES for GPIOLIB, we're using that for our character
     device.  Some randconfig tests disclosed the problem.

   - Make sure the Zynq driver clock runs also without CONFIG_PM enabled

   - Fix an off-by-one error in the 104-DIO-48E driver

   - Fix warnings in bcm_kona_gpio_reset()"

* tag 'gpio-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: bcm-kona: fix bcm_kona_gpio_reset() warnings
  gpio: select ANON_INODES
  gpio: include <linux/io-mapping.h> in gpiolib-of
  gpiolib: Fix unaligned used of reference counters
  gpiolib: Fix NULL pointer deference
  gpio: zynq: initialize clock even without CONFIG_PM
  gpio: 104-dio-48e: Fix control port offset computation off-by-one error
2016-06-11 18:03:39 -07:00
Linus Torvalds 45b00c94be SCSI fixes on 20160611
Two current fixes: one affects Qemu CD ROM emulation, which stopped
 working after the updates in SCSI to require VPD pages from all
 conformant devices.  Fix temporarily by blacklisting Qemu (we can
 relax later when they come into compliance).  The other is a fix to
 the optimal transfer size.  We set up a minefield for ourselves by
 being confused about whether the limits are in bytes or sectors (SCSI
 optimal is in blocks and the queue parameter is in bytes).  This tries
 to fix the problem (wrong setting for queue limits max_sectors) and
 make the problem more obvious by introducing a wrapper function.
 
 Signed-off-by: James Bottomley <jejb@linux.vnet.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJXXFPNAAoJEAVr7HOZEZN4csgP/07DjzZ8Q3Qz4TKnDfXGU+Ba
 qL2feBWk+anJTHM+WZ3RYLemCiG4k2tKtuFt7V1NoYovPXCXTz4QbL1rNqBMRjME
 iD+FHkIXReGMQc8dQTD09UHPY9aEeQLgK/+qJ79PhSuAxZd8PSW+jWR6Df7PNlZ9
 AWIXpcKShRy0YxTacIQg7M8wjgQXyhEC9D0epvJOGxAJvTxT5Ruju6WEzZrkmr4J
 Nv2QXFUhlIPxeADulBJ/0muQLU6ZMW10v7J2SpBAtsgKBJsYCYAhcDMmyZRZkWx3
 CsqKH80BAc7YdqZriH2YJ+5srotCbHDCmsNpCzmjo0lav7ws0m+7jHSaur/YDDOm
 B9c1ZOWpvaHDEMdZzDn2acpC9J+Xcd5kVyIRKU1heMp4MNWBvbak9YHNB1UfJcio
 FTaYEYx1DiXg61rNecGV4i0mqsoUgSB9P8woszPj6Udp5TPkFadjXTqezbsXCFhi
 wCeCyKlALHwm/G74Mds/prUeSpjuUsgJdS4zOm78bG1nZecLOtqk2OJeS0A03y9F
 KKh4aYikG8yskajjr/t9KvKv9yBSrfJA/vtGFwRN92urU/rfhWRihrgHoi/TikfJ
 dIo7EM1VrFYiIPofSdqhlLXRzxM/MlQm71A66tGcnFxv/iMOA1IybukpGz1zGPko
 kepWpHLaWQL07qvluCi3
 =L9za
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Two current fixes:

   - one affects Qemu CD ROM emulation, which stopped working after the
     updates in SCSI to require VPD pages from all conformant devices.

     Fix temporarily by blacklisting Qemu (we can relax later when they
     come into compliance).

   - The other is a fix to the optimal transfer size.  We set up a
     minefield for ourselves by being confused about whether the limits
     are in bytes or sectors (SCSI optimal is in blocks and the queue
     parameter is in bytes).

     This tries to fix the problem (wrong setting for queue limits
     max_sectors) and make the problem more obvious by introducing a
     wrapper function"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  sd: Fix rw_max for devices that report an optimal xfer size
  scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
2016-06-11 11:42:08 -07:00
Linus Torvalds 5d1f7023fb Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang:

 - a bigger fix for i801 to finally be able to be loaded on some
   machines again

 - smaller driver fixes

 - documentation update because of a renamed file

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: mux: reg: Provide of_match_table
  i2c: mux: refer to i2c-mux.txt
  i2c: octeon: Avoid printk after too long SMBUS message
  i2c: octeon: Missing AAK flag in case of I2C_M_RECV_LEN
  i2c: i801: Allow ACPI SystemIO OpRegion to conflict with PCI BAR
2016-06-11 11:24:54 -07:00
Linus Torvalds 90735c99ed DeviceTree fixes for 4.7-rc:
- Fix unflatten_dt_nodes when dad parameter is set.
 
 - Add vendor prefixes for TechNexion and UniWest
 
 - Documentation fix for Marvell BT
 
 - OF IRQ kerneldoc fixes
 
 - Restrict CMA alignment adjustments to non dma-coherent
 
 - Couple of warning fixes in reserved-memory code
 
 - DT maintainers updates
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXWcdCAAoJEPr7XbWNvGHDY7IQAIGnb+J9cZPZCCGykk+nx2q3
 GOpG/f+Y6U7EPTfWJPIbN2TG1WAfwBsej2SQDkl9lr1kb4oCqQWy7d4oDH9v4PzO
 tPXbE3TsJsGxNvnCk9oMDH2i+TvrtXKD1OJNwH9DzheuSlwMcBTwTfG5N/wETNIt
 6mSlG36V1p+Znrvr2yL1x2brtp0jVo2MX8/eLpGRHOeF37dLUqsXmgD8YBo1yenw
 jj6oQ+6oWsKho3PZjbR3jmoDYxjYZoluioBPfNZrW9h3nMn6/yD+hoBWUxc/Rxg2
 3LGEt0t4v1GZF1Dl852mECb+oi0dlcCULGLpOYk/Xb7vmgh8y/WH84NbCeGxDEiZ
 Q/4QYDxaMvd+OCTUi4VyToOxrmCCPZ/oNIAt/+1hCjP1IEljGDP+pksoQWE5tmUX
 CfEI4A4GK/0hNnjehXJ0NOJrCsFDuKdGsv3wCtIt51GQsYzJAEXqzrB6tHp9OIwO
 1BqDk1a2DtNack7Yj9nJib0/IR4iguSIGOchk8zlnBK8Jgqmd9YeJT1A/bIwaT8u
 SJo0u/4H684IIdfZX5Lf1YElETJvNat020cB2ObQYxqTD40o64MitJiBYBVEIYDh
 tMF9rBNMY4+gdblef0HILkL2ePUW/tnrLCfR1vCtFy9INUrk5OntN+uBkkfSQZrs
 tbAOfpuL6ff+5x5evj17
 =rXx9
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-fixes-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull DeviceTree fixes from Rob Herring:

 - fix unflatten_dt_nodes when dad parameter is set.

 - add vendor prefixes for TechNexion and UniWest

 - documentation fix for Marvell BT

 - OF IRQ kerneldoc fixes

 - restrict CMA alignment adjustments to non dma-coherent

 - a couple of warning fixes in reserved-memory code

 - DT maintainers updates

* tag 'devicetree-fixes-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  drivers: of: add definition of early_init_dt_alloc_reserved_memory_arch
  drivers/of: Fix depth for sub-tree blob in unflatten_dt_nodes()
  drivers: of: Fix of_pci.h header guard
  dt-bindings: Add vendor prefix for TechNexion
  of: add vendor prefix for UniWest
  dt: bindings: fix documentation for MARVELL's bt-sd8xxx wireless device
  of: add missing const for of_parse_phandle_with_args() in !CONFIG_OF
  of: silence warnings due to max() usage
  drivers: of: of_reserved_mem: fixup the CMA alignment not to affect dma-coherent
  of: irq: fix of_irq_get[_byname]() kernel-doc
  MAINTAINERS: DeviceTree maintainer updates
2016-06-11 11:08:57 -07:00
Linus Torvalds f1c32afdb8 uvc compat XU ioctl fixes
uvc's compat XU ioctls go through tons of potentially buggy
 indirection.  Patch 1 removes the indirection.  Patch 2 cleans up
 the code.
 
 Compile-tested only. I have the hardware, but I have absolutely no
 idea what XU does, how to use it, what software to recompile as
 32-bit, or what to test in that software.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQEcBAABCAAGBQJXWz7UAAoJEK9N98ZeDfrkQw0H/RggSjLFGGLNuGRLZ8T6OARM
 2EPLSvJg3RIrOTFpWjqfMOExZN0RjLpWoFek8GcRe/mrlt5xjDCS4lJQfUSMHXrs
 j4jOUzycxw5YyyWW89sxzfd3t46Ed4s6Xa+3sgxqEgWolZl1ep49sjv6mqINUIxB
 VBahB8PFxpP3+kn+ml5cnCKF4eysvkNRAsWCCV+o2ISL9UOaCZ+PgtsGBFHRiLDD
 QRFUabDlAuculbjWtdOUwDYOqbQE0cCAMYS1FYciLjbpdbnsrWup6CLJKslC3XeY
 M/d75meaawr5GNdsPF2sSLapjv24Qc2j3DnULLg3xCaE0fgtcvLk1RLw8msqSVU=
 =yL6H
 -----END PGP SIGNATURE-----

Merge tag '20160610_uvc_compat_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/luto/linux

Pull uvc compat XU ioctl fixes from Andy Lutomirski:
 "uvc's compat XU ioctls go through tons of potentially buggy
  indirection.  The first patch removes the indirection.  The second one
  cleans up the code.

  Compile-tested only.  I have the hardware, but I have absolutely no
  idea what XU does, how to use it, what software to recompile as
  32-bit, or what to test in that software"

* tag '20160610_uvc_compat_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/luto/linux:
  uvc_v4l2: Simplify compat ioctl implementation
  uvc: Forward compat ioctls to their handlers directly
2016-06-11 10:55:30 -07:00
Andy Lutomirski f89dec72e9 uvc_v4l2: Simplify compat ioctl implementation
The uvc compat ioctl implementation seems to have copied user data
for no good reason.  Remove a bunch of copies.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
2016-06-10 15:11:15 -07:00
Andy Lutomirski a44323e2a8 uvc: Forward compat ioctls to their handlers directly
The current code goes through a lot of indirection just to call a
known handler.  Simplify it: just call the handlers directly.

Cc: stable@vger.kernel.org
Signed-off-by: Andy Lutomirski <luto@kernel.org>
2016-06-10 15:11:14 -07:00
Linus Torvalds 3d0f0b6a55 Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
 "Has some fixes and some new self tests for btrfs.  The self tests are
  usually disabled in the .config file (unless you're doing btrfs dev
  work), and this bunch is meant to find problems with the 64K page size
  patches.

  Jeff has a patch to help people see if they are using the hardware
  assist crc32c module, which really helps us nail down problems when
  people ask why crcs are using so much CPU.

  Otherwise, it's small fixes"

* 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: self-tests: Fix extent buffer bitmap test fail on BE system
  Btrfs: self-tests: Fix test_bitmaps fail on 64k sectorsize
  Btrfs: self-tests: Use macros instead of constants and add missing newline
  Btrfs: self-tests: Support testing all possible sectorsizes and nodesizes
  Btrfs: self-tests: Execute page straddling test only when nodesize < PAGE_SIZE
  btrfs: advertise which crc32c implementation is being used at module load
  Btrfs: add validadtion checks for chunk loading
  Btrfs: add more validation checks for superblock
  Btrfs: clear uptodate flags of pages in sys_array eb
  Btrfs: self-tests: Support non-4k page size
  Btrfs: Fix integer overflow when calculating bytes_per_bitmap
  Btrfs: test_check_exists: Fix infinite loop when searching for free space entries
  Btrfs: end transaction if we abort when creating uuid root
  btrfs: Use __u64 in exported linux/btrfs.h.
2016-06-10 14:13:27 -07:00
Linus Torvalds ccf55f73a6 powerpc fixes for 4.7 #2
- ptrace: Fix out of bounds array access warning from Khem Raj
  - pseries: Fix PCI config address for DDW from Gavin Shan
  - pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added from Michael Ellerman
  - of: fix autoloading due to broken modalias with no 'compatible' from Wolfram Sang
  - radix: Fix always false comparison against MMU_NO_CONTEXT from Aneesh Kumar K.V
  - hash: Compute the segment size correctly for ISA 3.0 from Aneesh Kumar K.V
  - nohash: Fix build break with 64K pages from Michael Ellerman
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXWpyDAAoJEFHr6jzI4aWAxl8P/0m7sbx8yyExRrRlv0kXPSHX
 5LI69fPgU44Vq6KImndN7D0UWxCZeSG6ZJmdEzDonYlPrMtXTC6wkG+tk1l2ov2/
 nsatn1HeCqO7W9rniKuFXAnleTZlq3pxPk55JUPySjS+6oIlfkJfNIQpJednNe/b
 RFj6HAOJEwKDRguADxJFHPi1ATIF5ahFVkowV0p8aCT2kII+Ixe/4I2RDfQ4oxVg
 l3Iq7TLmbl7s2jxIaSA3Qf2FZRgXHqtULWI+sj7uTHaAB/3tfqLf7ITG8VGSM0uQ
 cuBEPG/hPuebo0C/kFw3x1hGed7jsmAq8QIHIHBKwJNU3A3NKOoftivfUBuO6FrF
 zkkS21GhMNJb+7DZeF+8QPmvG/ORG6YZeZndvFXRyimQHTHP0XGeq86RckQ6zcl6
 mh3bEuqIzGV11IIA8JC2FhnRPx+3mSKPfewVZTX0tse+ZzbJWUz3yYB9AQjyAXoY
 fbHz9V9HCk4hfwb8CWm0GjVzHitSSDyJouwp0oUz84R+1X4rnPeZLxHMe3bMRI4k
 t6R9DmGdoe1Lgefd5SoPEE/sBxq0BMuyIiG6ICK/MW2SCb5VLGGh8bDrSI9vIVvy
 2uwfyj1toJlNWB1M08376AWWru7l/VgYW7I+sXJSp86eQ/FmdGChfuo+sn2shQyj
 kRoWoakEGUO5f6Ed5qPA
 =5kLq
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-4.7-3Michael Ellerman:' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from
 - ptrace: Fix out of bounds array access warning from Khem Raj
 - pseries: Fix PCI config address for DDW from Gavin Shan
 - pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added
   from Michael Ellerman
 - of: fix autoloading due to broken modalias with no 'compatible' from
   Wolfram Sang
 - radix: Fix always false comparison against MMU_NO_CONTEXT from Aneesh
   Kumar K.V
 - hash: Compute the segment size correctly for ISA 3.0 from Aneesh
   Kumar K.V
 - nohash: Fix build break with 64K pages from Michael Ellerman

* tag 'powerpc-4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/nohash: Fix build break with 64K pages
  powerpc/mm/hash: Compute the segment size correctly for ISA 3.0
  powerpc/mm/radix: Fix always false comparison against MMU_NO_CONTEXT
  of: fix autoloading due to broken modalias with no 'compatible'
  powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added
  powerpc/pseries: Fix PCI config address for DDW
  powerpc/ptrace: Fix out of bounds array access warning
2016-06-10 12:23:49 -07:00
Linus Torvalds c8f17d6064 hwmon fixes for v4.7-rc3
Fix regression in fam15h_power driver
 Minor variable type fix in lm90 driver
 Document compatible statement for ina2xx driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXWuv3AAoJEMsfJm/On5mBAxoP/1wTzu2clsfhVaKAd5qagtsX
 jBwEX+82MAhJs8sHHupLgteZJ3vW+5Tj2jis/gh7KxQF+rdv7/qzLxpAWwa+WJzw
 QfNgrfPLUx6AzOkTV3x0uSFmqBWfnS50ofeYufWqs7Z8uIM/5rMgtvwfNZ/XEcwj
 QO6oYVzytHWJiw2pxcQZcXnz5hCDZ1BftM8KGvi2arK1iJ3m+mRVo9FdkjsT0m/q
 dQq49YRuVUTbgvQXvN6IifTSu2zZNOqW1YtcdJdmd7wshFUXrq6bKe/WEVcdPOl5
 EcaewzaUZok4DtNyBRbL1IPKT4u/QFlk2PxIWAVdSGrRUYXQLk8iO4F8W/I6s4QE
 JtjvccHczqWB0CzNAHubp3MZgbO8r5KEwOIqPZAy86AZV4krTUycSK4PAsGVMiOs
 yw3nSlAIWNaEtREa9NU+ftZ/sZvDtIQAypqOGVFw/WF2x6NUuJWTQ1iPkBlCE4a6
 jbfgSFVMNXMg7Tt41U+VvHbYD9dvB+GMYW6jRtdkgFlX1D/eqMST5SckE1ggAFVj
 7oV3+fPm+SQhXKIqHJpkf4PiFmSv2+YbALZGZT3mKSFxSpnkwwM+C/uIn456bHXr
 wVMMneNbEflQkoRvbxr9qiJUFrwmdCnbJycrPG5v/ejWhGuAAPFgOTFDyx8SPzoN
 YiObf+fwdA0sFLm00SOD
 =TT5z
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - fix regression in fam15h_power driver

 - minor variable type fix in lm90 driver

 - document compatible statement for ina2xx driver

* tag 'hwmon-for-linus-v4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (lm90) use proper type for update_interval
  hwmon: (ina2xx) Document compatible for INA231
  hwmon: (fam15h_power) Disable preemption when reading registers
2016-06-10 12:18:34 -07:00
Linus Torvalds f5364c150a Merge branch 'stacking-fixes' (vfs stacking fixes from Jann)
Merge filesystem stacking fixes from Jann Horn.

* emailed patches from Jann Horn <jannh@google.com>:
  sched: panic on corrupted stack end
  ecryptfs: forbid opening files without mmap handler
  proc: prevent stacking filesystems on top
2016-06-10 12:10:02 -07:00
Jann Horn 29d6455178 sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g.  via an oops in interrupt
context, caused by the overwritten CPU index in the thread_info).

Just panic directly.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-06-10 12:09:43 -07:00
Jann Horn 2f36db7100 ecryptfs: forbid opening files without mmap handler
This prevents users from triggering a stack overflow through a recursive
invocation of pagefault handling that involves mapping procfs files into
virtual memory.

Signed-off-by: Jann Horn <jannh@google.com>
Acked-by: Tyler Hicks <tyhicks@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-06-10 12:09:43 -07:00
Jann Horn e54ad7f1ee proc: prevent stacking filesystems on top
This prevents stacking filesystems (ecryptfs and overlayfs) from using
procfs as lower filesystem.  There is too much magic going on inside
procfs, and there is no good reason to stack stuff on top of procfs.

(For example, procfs does access checks in VFS open handlers, and
ecryptfs by design calls open handlers from a kernel thread that doesn't
drop privileges or so.)

Signed-off-by: Jann Horn <jannh@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-06-10 12:09:43 -07:00
Linus Torvalds 33fc259a20 arm64 fix:
- Fix an issue where we fail to fault in old pages on a write when
   CONFIG_ARM64_HW_AFDBM is enabled
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCgAGBQJXWrCWAAoJELescNyEwWM08y8IAJH1gTSkohoD9v0ncZRZNbje
 WDYCC7RPulTewZvpjO7QqBS8gHH71NOS3OxayXIPCcwKd4r3Fyzh55+HoIzKt57O
 rbAxBPnUdOetw2cOwDjZntEk/N8HsMi1wqwc1Y8XPYsbNzRaL3LrdKy3PCayawJY
 i/NUOoUliFWNrmqIDRR5N4QMcSUH5P1gZrguodxipCQ9a3fUfwScu4vKYRz6u23O
 KhIliQJGJuSsIwFIAEYX5w1FaMIM/2Du7zO2ME/pMVt+ms73cwMTFcRHi/FdqqjV
 Klqaiawd4FAfaPtzCvE2r/7+RM6YBjf7ZTUd0R5JEioDYp0bm4w8hsTzx3l9m3A=
 =91UM
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fix from Will Deacon:
 "A fix for an issue that Alex saw whilst swapping with hardware
  access/dirty bit support enabled in the kernel: Fix a failure to fault
  in old pages on a write when CONFIG_ARM64_HW_AFDBM is enabled"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: mm: always take dirty state from new pte in ptep_set_access_flags
2016-06-10 11:57:17 -07:00
Linus Torvalds 75d089d12a Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Ingo Molnar:
 "Misc fixes from all around the map, plus a commit that introduces a
  new header of Intel model name symbols (unused) that will make the
  next merge window easier"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/ioapic: Fix incorrect pointers in ioapic_setup_resources()
  x86/entry/traps: Don't force in_interrupt() to return true in IST handlers
  x86/cpu/AMD: Extend X86_FEATURE_TOPOEXT workaround to newer models
  x86/cpu/intel: Introduce macros for Intel family numbers
  x86, build: copy ldlinux.c32 to image.iso
  x86/msr: Use the proper trace point conditional for writes
2016-06-10 11:36:04 -07:00
Linus Torvalds 60e383037b Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Ingo Molnar:
 "Two scheduler debugging fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/debug: Fix 'schedstats=enable' cmdline option
  sched/debug: Fix /proc/sched_debug regression
2016-06-10 11:24:39 -07:00
Linus Torvalds 7fcbc230c6 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar:
 "A handful of tooling fixes, two PMU driver fixes and a cleanup of
  redundant code that addresses a security analyzer false positive"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/core: Remove a redundant check
  perf/x86/intel/uncore: Remove SBOX support for Broadwell server
  perf ctf: Convert invalid chars in a string before set value
  perf record: Fix crash when kptr is restricted
  perf symbols: Check kptr_restrict for root
  perf/x86/intel/rapl: Fix pmus free during cleanup
2016-06-10 11:15:41 -07:00
Linus Torvalds 02b07bde61 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking fixes from Ingo Molnar:
 "Misc fixes:

   - a file-based futex fix
   - one more spin_unlock_wait() fix
   - a ww-mutex deadlock detection improvement/fix
   - and a raw_read_seqcount_latch() barrier fix"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Calculate the futex key based on a tail page for file-based futexes
  locking/qspinlock: Fix spin_unlock_wait() some more
  locking/ww_mutex: Report recursive ww_mutex locking early
  locking/seqcount: Re-fix raw_read_seqcount_latch()
2016-06-10 10:53:46 -07:00
Linus Torvalds 606c17f4e9 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull EFI fixes from Ingo Molnar:
 "Two fixes: a regression/crash fix, and a message output fix"

* 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi/arm: Fix the format of EFI debug messages
  efi: Fix for_each_efi_memory_desc_in_map() for empty memmaps
2016-06-10 10:47:22 -07:00
Linus Torvalds 94fcad6932 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull objtool fix from Ingo Molnar:
 "Addresses a false positive warning in the GPU/DRM code"

[ Technically it's not a "false positive", but it's the virtual GPU
  interface that needs the frame pointer for its own internal purposes ]

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool, drm/vmwgfx: Fix "duplicate frame pointer save" warning
2016-06-10 10:37:01 -07:00
Linus Torvalds 698ea54dde Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) nfnetlink timestamp taken from wrong skb, fix from Florian Westphal.

 2) Revert some msleep conversions in rtlwifi as these spots are in
    atomic context, from Larry Finger.

 3) Validate that NFTA_SET_TABLE attribute is actually specified when we
    call nf_tables_getset().  From Phil Turnbull.

 4) Don't do mdio_reset in stmmac driver with spinlock held as that can
    sleep, from Vincent Palatin.

 5) sk_filter() does things other than run a BPF filter, so we should
    not elide it's call just because sk->sk_filter is NULL.  Fix from
    Eric Dumazet.

 6) Fix missing backlog updates in several packet schedulers, from Cong
    Wang.

 7) bnx2x driver should allow VLAN add/remove while the interface is
    down, from Michal Schmidt.

 8) Several RDS/TCP race fixes from Sowmini Varadhan.

 9) fq_codel scheduler doesn't return correct queue length in dumps,
    from Eric Dumazet.

10) Fix TCP stats for tail loss probe and early retransmit in ipv6, from
    Yuchung Cheng.

11) Properly initialize udp_tunnel_socket_cfg in l2tp_tunnel_create(),
    from Guillaume Nault.

12) qfq scheduler leaks SKBs if a kzalloc fails, fix from Florian
    Westphal.

13) sock_fprog passed into PACKET_FANOUT_DATA needs compat handling,
    from Willem de Bruijn.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (85 commits)
  vmxnet3: segCnt can be 1 for LRO packets
  packet: compat support for sock_fprog
  stmmac: fix parameter to dwmac4_set_umac_addr()
  net/mlx5e: Fix blue flame quota logic
  net/mlx5e: Use ndo_stop explicitly at shutdown flow
  net/mlx5: E-Switch, always set mc_promisc for allmulti vports
  net/mlx5: E-Switch, Modify node guid on vf set MAC
  net/mlx5: E-Switch, Fix vport enable flow
  net/mlx5: E-Switch, Use the correct error check on returned pointers
  net/mlx5: E-Switch, Use the correct free() function
  net/mlx5: Fix E-Switch flow steering capabilities check
  net/mlx5: Fix flow steering NIC capabilities check
  net/mlx5: Fix root flow table update
  net/mlx5: Fix MLX5_CMD_OP_MAX to be defined correctly
  net/mlx5: Fix masking of reserved bits in XRCD number
  net/mlx5: Fix the size of modify QP mailbox
  mlxsw: spectrum: Don't sleep during ndo_get_phys_port_name()
  mlxsw: spectrum: Make split flow match firmware requirements
  wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel
  cfg80211: remove get/set antenna and tx power warnings
  ...
2016-06-10 08:32:24 -07:00
Linus Torvalds 729d378479 sound fixes for 4.7-rc3
We have only few, mainly HD-audio device-specific fixes.
 Realtek codec driver got a slightly more LOC, but they are all for the
 new codec chip, and won't affect others at all.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXWnz2AAoJEGwxgFQ9KSmkedkQALlFUvFHEdj7AoguEXhsaH3v
 rm5B0C8aY8zHqOHtOwtSt9gfwkggrO85CT8bzdHnT6bW+27idxP9SbjKx/+vBcN/
 uKi9w2qpe3O1BZM527BNdhgoSB3kiT+2h2wrlWaVRZP2xI7eWaSYPES0TbzANEup
 RL9GuNw+SMy/vD0kempJKJ8EWWrY/M2qT1q5vReOCZhYB/nYCxMPlmO8nF0LrS+3
 t0IC0f4bnWJ6f1nc5HqHiNf1Evpv+CuIWO57Ob2nw3pemHYWSk1HYYYG9HeLBVR3
 uL3JntF5K2POHP/vlkCRiymPTC1wWlBFQgmSbZ3EClgc7OWiw8C+TaNhRzvDxLTI
 s1p0cgrr1SDGhOmrLTQnCU+CFcXDVLXrB+Q8taZ+p3sKwWGg2qTLo010qjt8t5sW
 mOj7My1vtwYJ2i3Je3HYJ/41HW+ZbwMDEvzqWj2STGzqBsxEKilG+/gGHEF1z7G5
 ySrPJygkpq7QfUEWdn2mMQfihyDC5ow8+eDAj6EGvgZ8DvIxhVvbXPliRL0LR7SZ
 B+A0EAiBUpEVk8s9Gt9TWW4pO+FNKHfMFasVdsfZPvkuwbwDKb5fHdFYAfjQqjUM
 rSuio4FGFwEZqTwnjDD//AezVVM+c3WqlCDIMkKaYaNCJCxR6sh49yZBxUXDW+G6
 TA0BwQBXYJckMO66nMUt
 =7qtG
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "We have only few, mainly HD-audio device-specific fixes.  Realtek
  codec driver got a slightly more LOC, but they are all for the new
  codec chip, and won't affect others at all"

* tag 'sound-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Add PCI ID for Kabylake
  ALSA: hda/realtek: Add T560 docking unit fixup
  ALSA: hda - Fix headset mic detection problem for Dell machine
  ALSA: uapi: Add three missing header files to Kbuild file
  ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703
  ALSA: hda/realtek - ALC256 speaker noise issue
2016-06-10 08:27:30 -07:00
Linus Torvalds 00da90085e Merge tag 'drm-fixes-for-v4.7-rc3' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "This weeks instalment of fixes:

  amdgpu:
     Lots of memory leak and firmware leak fixes

  nouveau:
     Collection of display fixes, KASAN fixes

  vc4:
     vblank/pageflipping fixes

  fsl-dcu:
     Regmap cache fix

  omap:
     Unused variable warning fix.

  Nothing too surprising so far"

* tag 'drm-fixes-for-v4.7-rc3' of git://people.freedesktop.org/~airlied/linux: (46 commits)
  drm/amdgpu: fix warning with powerplay disabled.
  drm/amd/powerplay: delete useless code as pptable changed in vbios.
  drm/amd/powerplay: fix bug visit array out of bounds
  drm/amdgpu: fix smu ucode memleak (v2)
  drm/amdgpu: add release firmware for cgs
  drm/amdgpu: fix tonga smu_fini mem leak
  drm/amdgpu: fix fiji smu fini mem leak
  drm/amdgpu: fix cik sdma ucode memleak
  drm/amdgpu: fix sdma24 ucode mem leak
  drm/amdgpu: fix sdma3 ucode mem leak
  drm/amdgpu: fix uvd fini mem leak
  drm/amdgpu: fix gfx 7 ucode mem leak
  drm/amdgpu: fix gfx8 ucode mem leak
  drm/amdgpu: fix missing free wb for cond_exec
  drm/amdgpu: fix memleak in pptable_init
  drm/amdgpu: fix mem leak in atombios
  drm/amdgpu: fix mem leak in pplib/hwmgr
  drm/amdgpu: fix mem leak in smumgr
  drm/amdgpu: add pipeline sync while vmid switch in same ctx
  drm/amdgpu: vBIOS post only call when mem_size zero
  ...
2016-06-10 08:21:06 -07:00
Linus Torvalds f758bbd470 ACPI fix for v4.7-rc3
A recently introduced boot regression related to the ACPI EC
 initialization is addressed by restoring the previous behavior
 (Lv Zheng).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJXWgXgAAoJEILEb/54YlRxfSEP/1pn12280O8TDtMcFtVfoXae
 ub3j0LyA7+zofiHDFtSuyFeLWoYuMfTrpa6FJ1NKFpaUP1gtWrHOuOHRz4D8htoT
 yglJXRdKdh4lEUiN0PN9YjQvLBpynkzlFNQjGWpFND/jyH4MUvE0NQFyXDl1fwUv
 uaw6Zgj5cyqTJFVZZEWXQbjXiK52dQvr6h6hAo/cFtIgiRGxnl24GTA68UVIBE5Y
 EtDOw6V22CB08MG5eRb3lgk6m3u2LdSaTHJ+/vJeOJblm2MAIISslW5VkTrFB+Xg
 YXL3dJUiQ0ZWnTKU6hn8JmoTzBOmQ0odyvuxx62CJFOHPV5S9FunrbPmrPZT5lTn
 FskibLBU5GoJ4AAv3Z+frXILggh4poLib17p2rAVyvzjTzxNV7OCvK05meZy4e+g
 01qc5pzKyIXAnaqWY52OjSghOm1CssH/E39W59AWlx0M/FGLYk2N/suMxAKhkVbE
 E1X/uU1CbZ3ajpm7OTJLOAO4YJQa3oy5ceh0XuKE/v59GVdIJPmFI4weTfK2nptM
 LsOCQB58BhxeXl0ziXmnqOu1mSmDStQU0MXMKZMLZ9DXxEl9HljTR3C0L24D3m8O
 6Svvc04YWzurNuLcKqoFfQIUZxjd5hQVcXPj119igiAdh6kvEfY9Gm6hjF5lRRm/
 wQ14cSsWWGD0MOl05WYW
 =bb/0
 -----END PGP SIGNATURE-----

Merge tag 'acpi-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "A recently introduced boot regression related to the ACPI EC
  initialization is addressed by restoring the previous behavior (Lv
  Zheng)"

* tag 'acpi-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / EC: Fix a boot EC regresion by restoring boot EC support for the DSDT EC
2016-06-10 08:15:37 -07:00
Linus Torvalds 524a3f2ca2 Power management fixes for v4.7-rc3
- Fix two intel_pstate initialization issues, one of which was
    introduced during the 4.4 cycle (Srinivas Pandruvada).
 
  - Fix kernel build with CONFIG_UBSAN set and CONFIG_CPU_IDLE
    unset (Catalin Marinas).
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJXWgWVAAoJEILEb/54YlRxG5EP/itHzuh6Sq706zRRAL2zLAiW
 9ZEgnH7Q0rbcaGTkRUe9BInJgS1lOxXlnzaQvx0nMN8omahYasl0FjX+5a+pwV6T
 wE2tuw2wby0XI0gDwsEvTHpy6etCis46JfH8TJfPSkJOog83ZYoWeeolE9jwXPpP
 Zgw8Eby/PvLr89tiDJr1/keChnQu0u2Ejz2hHEygc1Z5uxthVWfM8aEVaq8TnAPx
 TBExCvjZ3+KuEjQTQdSy2Bw8h8z0AO086NARQJ7JwCtSqIyo6WEPvJ5q+Wcrt/Uq
 P0C7Lpkcv6323sHm5hMCy+M3ES5Kws7cRFK3D2qjpTdtGr0/ibbHcrp2Vcw6b1Pr
 8yRzN/ZJ4eLnLZLqggi42FByCygo1uy9zcqcbBCwDtmseM55+NgZGtmGgRBlRRw0
 eOZwNmDHV++uUMF0EclBpIPG4mgUa7EdlJBFBgsRDeRMk+7VqKuw2Nl+F8d+gfvn
 a0uUMHLUoSA7eI8/pKwGbdiaMVSKQahhPXhZcJOmBdV7eLFX5rCKiRujhNg2XNgU
 GaVCRgwP7HRs5RmrQQByQS09BeCgK/sqCZcWZh1VrHQFfww/cxnFQTYJuapgnz2i
 y0n6B2foMF2B3dxMDioqDkNWl7V/fgO0YuKCAea5eFrQA9GZf1zM8sbEtaq2khZw
 xCa0iom5cIrBOCc3gvTv
 =qmBM
 -----END PGP SIGNATURE-----

Merge tag 'pm-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
 "Stable-candidate fixes for the intel_pstate driver and the cpuidle
  core.

  Specifics:

   - Fix two intel_pstate initialization issues, one of which was
     introduced during the 4.4 cycle (Srinivas Pandruvada)

   - Fix kernel build with CONFIG_UBSAN set and CONFIG_CPU_IDLE unset
     (Catalin Marinas)"

* tag 'pm-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq: intel_pstate: Fix ->set_policy() interface for no_turbo
  cpufreq: intel_pstate: Fix code ordering in intel_pstate_set_policy()
  cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE
2016-06-10 08:09:12 -07:00
Linus Torvalds 9557c3cfda Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton:
 "7 fixes"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  mm/fadvise.c: do not discard partial pages with POSIX_FADV_DONTNEED
  mm: introduce dedicated WQ_MEM_RECLAIM workqueue to do lru_add_drain_all
  kernel/relay.c: fix potential memory leak
  mm: thp: broken page count after commit aa88b68c3b
  revert "mm: memcontrol: fix possible css ref leak on oom"
  kasan: change memory hot-add error messages to info messages
  mm/hugetlb: fix huge page reserve accounting for private mappings
2016-06-10 08:00:47 -07:00
Rui Wang 9d98bcec73 x86/ioapic: Fix incorrect pointers in ioapic_setup_resources()
On a 4-socket Brickland system, hot-removing one ioapic is fine.
Hot-removing the 2nd one causes panic in mp_unregister_ioapic()
while calling release_resource().

It is because the iomem_res pointer has already been released
when removing the first ioapic.

To explain the use of &res[num] here: res is assigned to ioapic_resources,
and later in ioapic_insert_resources() we do:

	struct resource *r = ioapic_resources;

        for_each_ioapic(i) {
                insert_resource(&iomem_resource, r);
                r++;
        }

Here 'r' is treated as an arry of 'struct resource', and the r++ ensures
that each element of the array is inserted separately. Thus we should call
release_resouce() on each element at &res[num].

Fix it by assigning the correct pointers to ioapics[i].iomem_res in
ioapic_setup_resources().

Signed-off-by: Rui Wang <rui.y.wang@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: tony.luck@intel.com
Cc: linux-pci@vger.kernel.org
Cc: rjw@rjwysocki.net
Cc: linux-acpi@vger.kernel.org
Cc: bhelgaas@google.com
Link: http://lkml.kernel.org/r/1465369193-4816-3-git-send-email-rui.y.wang@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-06-10 14:45:54 +02:00
Andy Lutomirski aaee8c3c5c x86/entry/traps: Don't force in_interrupt() to return true in IST handlers
Forcing in_interrupt() to return true if we're not in a bona fide
interrupt confuses the softirq code.  This fixes warnings like:

  NOHZ: local_softirq_pending 282

... which can happen when running things like selftests/x86.

This will change perf's static percpu buffer usage in IST context.
I think this is okay, and it's changing the behavior to match
historical (pre-4.0) behavior.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Fixes: 9592747538 ("x86, traps: Track entry into and exit from IST context")
Link: http://lkml.kernel.org/r/cdc215f94d118d691d73df35275022331156fb45.1464130360.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-06-10 13:54:47 +02:00
Shrikrishna Khare 50219538ff vmxnet3: segCnt can be 1 for LRO packets
The device emulation may send segCnt of 1 for LRO packets.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Signed-off-by: Jin Heo <heoj@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-10 00:15:11 -07:00
Willem de Bruijn 719c44d340 packet: compat support for sock_fprog
Socket option PACKET_FANOUT_DATA takes a struct sock_fprog as argument
if PACKET_FANOUT has mode PACKET_FANOUT_CBPF. This structure contains
a pointer into user memory. If userland is 32-bit and kernel is 64-bit
the two disagree about the layout of struct sock_fprog.

Add compat setsockopt support to convert a 32-bit compat_sock_fprog to
a 64-bit sock_fprog. This is analogous to compat_sock_fprog support for
SO_REUSEPORT added in commit 1957598840 ("soreuseport: add compat
case for setsockopt SO_ATTACH_REUSEPORT_CBPF").

Reported-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-09 23:41:03 -07:00
Ben Dooks ca8bdaf13a stmmac: fix parameter to dwmac4_set_umac_addr()
The dwmac4_set_umac_addr() takes a struct mac_device_info as
the first parameter, but is being passed a ioaddr instead from
dwmac4_set_filter(). Fix the warning/bug by changing the first
parameter.

drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46: warning: incorrect type in argument 1 (different address spaces)
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46:    expected struct mac_device_info *hw
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46:    got void [noderef] <asn:2>*ioaddr

Note, only compile tested this as do not have any
hardware with it in.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-09 23:39:03 -07:00
David S. Miller 8618e6e79d Merge branch 'mlx5-fixes'
Saeed Mahameed says:

====================
Mellanox 100G mlx5 fixes for 4.7-rc

The following series provides some small fixes for mlx5 driver.

Two small fixes for the mlx5e netdev, the 1st is for the blue flame
quota accounting and the 2nd is a small refactoring in shutdown flow.

Five trivial fixes for mlx5 E-Switch.
	- Allmulti mc_promisc flag was not set in a specific flow.
	- Modify VF node guid when admin mac is changed.
	- Race in vport enable flow.
	- Misc code fixes (kvfree when needed and error pointers checking).

Three in mlx5 steering area.  Correct capabilities checking and root flow table update.

Three misc fixes in mlx5 commands enum and layouts.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-09 22:06:27 -07:00
Eli Cohen 0ca00fc1f8 net/mlx5e: Fix blue flame quota logic
Blue flame is a latency enhancement feature that allows the driver to
write the packet data directly to the NIC's registers thus making the
read of the packet data from host memory redundant.

We maintain a quota for the blue flame which is reloaded whenever we
identify that the hardware is processing send requests and processes
them fast enough so by the time we post the next send request it was
able to process all the pending ones. This indicates that the hardware
is capable of processing more blue flame requests efficiently. The blue
flame quota is decremented whenever we send using blue flame.

The current code erroneously clears the budget if we did not use blue
flame for the current post send operation and we fix it here.

Fixes: 88a85f99e5 ('net/mlx5e: TX latency optimization to save DMA reads')
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-09 22:06:27 -07:00
Eran Ben Elisha 811afeaa37 net/mlx5e: Use ndo_stop explicitly at shutdown flow
The current implementation copies the flow of ndo_stop instead of
calling it explicitly, Fixed it.

Fixes: 5fc7197d3a ("net/mlx5: Add pci shutdown callback")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-09 22:06:27 -07:00
Mohamad Haj Yahia 62e3c24ac4 net/mlx5: E-Switch, always set mc_promisc for allmulti vports
Set the mc_promisc flag also in the case of adding new mc address to
existing allmulti vport.

Fixes: a35f71f27a ('net/mlx5: E-Switch, Implement promiscuous rx modes vf request handling')
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-09 22:06:26 -07:00
Noa Osherovich 23898c763f net/mlx5: E-Switch, Modify node guid on vf set MAC
In RoCE, the RDMA-CM needs the node guid to establish connection
between nodes.
Today, the node guid exposed to mlx5 Ethernet VFs is zero, therefore
RDMA-CM on the VF is broken.

Whenever the administrator sets a MAC for a VF, derive the node guid
from it and set it as well in the following way:
MAC: e4:1d:2d:b3:f4:01 -> node_guid: e4:1d:2d:ff:fe:b3:f4:01

Fixes: 77256579c6 ('net/mlx5: E-Switch, Introduce Vport...')
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-09 22:06:26 -07:00