1
0
Fork 0
Commit Graph

427681 Commits (27db78307481dbba68c5f3563c6cb694b25521d9)

Author SHA1 Message Date
Davidlohr Bueso 27db783074 perf bench: Add futex-wake microbenchmark
Block a bunch of threads on a futex and wake them up, N at a time.

This program is particularly useful to measure the latency of nthread
wakeups in non-error situations:  all waiters are queued and all wake
calls wakeup one or more tasks.

An example run:

  $ perf bench futex wake -t 512 -r 100
  Run summary [PID 27823]: blocking on 512 threads (at futex 0x7e10d4), waking up 1 at a time.

  [Run 1]: Wokeup 512 of 512 threads in 6.0080 ms
  [Run 2]: Wokeup 512 of 512 threads in 5.2280 ms
  [Run 3]: Wokeup 512 of 512 threads in 4.8300 ms
  ...
  [Run 100]: Wokeup 512 of 512 threads in 5.0100 ms
  Wokeup 512 of 512 threads in 5.0109 ms (+-2.25%)

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Scott J Norton <scott.norton@hp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <Waiman.Long@hp.com>
Link: http://lkml.kernel.org/r/1387081917-9102-3-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-03-14 11:20:43 -03:00
Davidlohr Bueso a043971141 perf bench: Add futex-hash microbenchmark
Introduce futexes to perf-bench and add a program that stresses and
measures the kernel's implementation of the hash table.

This is a multi-threaded program that simply measures the amount of
failed futex wait calls - we only want to deal with the hashing
overhead, so a negative return of futex_wait_setup() is enough to do the
trick.

An example run:

  $ perf bench futex hash -t 32
  Run summary [PID 10989]: 32 threads, each operating on 1024 [private] futexes for 10 secs.

  [thread  0] futexes: 0x19d9b10 ... 0x19dab0c [ 418713 ops/sec ]
  [thread  1] futexes: 0x19daca0 ... 0x19dbc9c [ 469913 ops/sec ]
  [thread  2] futexes: 0x19dbe30 ... 0x19dce2c [ 479744 ops/sec ]
  ...
  [thread 31] futexes: 0x19fbb80 ... 0x19fcb7c [ 464179 ops/sec ]

  Averaged 454310 operations/sec (+- 0.84%), total secs = 10

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Scott J Norton <scott.norton@hp.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Waiman Long <Waiman.Long@hp.com>
Link: http://lkml.kernel.org/r/1387081917-9102-2-git-send-email-davidlohr@hp.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-03-14 11:20:43 -03:00
Stephane Eranian 81827ed8d8 perf/x86/uncore: Fix missing end markers for SNB/IVB/HSW IMC PMU
This patch fixes a bug with the SNB/IVB/HSW uncore
mmeory controller support.

The PCI Ids tables for the memory controller were missing end
markers. That could cause random crashes on boot during or after
PCI device registration.

Signed-off-by: Stephane Erainan <eranian@google.com>
Cc: peterz@infradead.org
Cc: zheng.z.yan@intel.com
Cc: bp@alien8.de
Cc: ak@linux.intel.com
Link: http://lkml.kernel.org/r/20140313120436.GA14236@quad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
--
2014-03-14 09:25:25 +01:00
Stephane Eranian 4191c29f05 perf/x86/uncore: Fix compilation warning in snb_uncore_imc_init_box()
This patch fixes a compilation problem (unused variable) with the
new SNB/IVB/HSW uncore IMC code.

[ In -v2 we simplify the fix as suggested by Peter Zjilstra. ]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140311235329.GA28624@quad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-12 10:49:13 +01:00
Jiri Olsa 6bedfab686 perf tools: Disable user-space callchain/stack dumps for function trace events
User space callchains and user space stack dump were disabled
for function trace event. Mailing list discussions:

  http://marc.info/?t=139302086500001&r=1&w=2
  http://marc.info/?t=139301437300003&r=1&w=2

Catching up with perf and disabling user space callchains and
DWARF unwind (uses user stack dump) for function trace event.

Adding following warnings when callchains are used
for function trace event:

  # perf record -g -e ftrace:function ...
  Disabling user space callchains for function trace event.
  ...

  # ./perf record --call-graph=dwarf -e ftrace:function ...
  Cannot use DWARF unwind for function trace event, falling back to framepointers.
  Disabling user space callchains for function trace event.
  ...

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1393775800-13524-4-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-11 11:57:59 +01:00
Jiri Olsa 63c45f4ba5 perf: Disallow user-space stack dumps for function trace events
Recent issues with user space callchains processing within
page fault handler tracing showed as Peter said 'there's
just too much fail surface'.

The user space stack dump is just another source of the this issue.

Related list discussions:
  http://marc.info/?t=139302086500001&r=1&w=2
  http://marc.info/?t=139301437300003&r=1&w=2

Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1393775800-13524-3-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-11 11:57:58 +01:00
Jiri Olsa cfa77bc4af perf: Disallow user-space callchains for function trace events
Recent issues with user space callchains processing within
page fault handler tracing showed as Peter said 'there's
just too much fail surface'.

Related list discussions:

  http://marc.info/?t=139302086500001&r=1&w=2
  http://marc.info/?t=139301437300003&r=1&w=2

Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1393775800-13524-2-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-11 11:57:57 +01:00
Dongsheng Yang ef11dadb83 perf/x86/uncore: Add __init for uncore_cpumask_init()
Commit:

  411cf180fa perf/x86/uncore: fix initialization of cpumask

introduced the function uncore_cpumask_init(), which is only
called in __init intel_uncore_init(). But it is not marked
with __init, which produces the following warning:

	WARNING: vmlinux.o(.text+0x2464a): Section mismatch in reference from the function uncore_cpumask_init() to the function .init.text:uncore_cpu_setup()
	The function uncore_cpumask_init() references
	the function __init uncore_cpu_setup().
	This is often because uncore_cpumask_init lacks a __init
	annotation or the annotation of uncore_cpu_setup is wrong.

This patch marks uncore_cpumask_init() with __init.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Acked-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: http://lkml.kernel.org/r/1394013516-4964-1-git-send-email-yangds.fnst@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-11 11:57:56 +01:00
Ingo Molnar 0066f3b93e Merge branch 'perf/urgent' into perf/core
Merge the latest fixes.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-11 11:53:50 +01:00
Ingo Molnar b8ad0f912b perf/urgent fixes:
. Fix build of 'trace' in some systems due to using some architecture-specific
   signal numbers (Ben Hutchings)
 
 . Stop resolving when finding a map in in ip__resolve_ams, this way at least
   the DSO will be resolved when a symbol isn't (Don Zickus)
 
 . Fix crash in elf_section_by_name when not checking if some section string index
   is valid (Jiri Olsa)
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTHirmAAoJENZQFvNTUqpA/HcP/0WsHQ/ww88PTMzr/WBXh72u
 c2HTqrW70RMNP9YJqekGiMLAAarVECpu9coueMaQrhyYb+eB2CV1pAjy+tB1CExR
 Opr3yVtZnWhk+mdWajuWzGrrZxEpn7dc0ZxaxTDQSfktj7t6fmNu+d6Znt3eR3q8
 SoTOEC6tJ/V0VuowHibXcZBqwDC8brXYPY/5ZmLnpZFMOyREkUL3Gl2xiCccTYdM
 erBdrJHiD6CnjgI5nKZu2FSa9XkY5tNSNtOxcxp/1lEQiWsdlbSRFsfXD78Fob4y
 l+KAzzvGk4TV6imR2h2zHRAe9izoBSQxMSRBXzbzKFSM8REEOnA70FVswfklkSjJ
 4pmYEQvizB8Q4Q0ywUeUFseBm8eWRZsyhHXqaezP42jMlBgV8doLxoU9OUZXxBpz
 xzBRDYhMIOGoUVHbmYhJGd0q/LO/Y4+u89HuGRlTmjH2JjmAJ0AyGcLBau+WiwwK
 bBdCWHRAhh/H6d1qnNissfIexcnX1+LwO+UARQvhQt959CpvG/HdgjUHT7qyHSfm
 ShgO+HyC7yt3TNTybOXbkg1kmyeVqH9sjh3sb+aEoCXkVNbjXPggDboTOng7FIp/
 M0rnpaCOGIuWPGPse/JxFhwjyUbZypLm1Aas6HA8ATjf0zRDYmmnz+0B4RrXwp/C
 jS4ouS04Hu372GaPildH
 =oyOq
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

 * Fix build of 'trace' in some systems due to using some architecture-specific
   signal numbers (Ben Hutchings)

 * Stop resolving when finding a map in in ip__resolve_ams, this way at least
   the DSO will be resolved when a symbol isn't (Don Zickus)

 * Fix crash in elf_section_by_name when not checking if some section string index
   is valid (Jiri Olsa)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-03-11 10:45:32 +01:00
Linus Torvalds 8712a00514 Merge branch 'akpm' (patches from Andrew Morton)
Merge misc fixes from Andrew Morton:
 "Nine fixes"

* emailed patches from Andrew Morton akpm@linux-foundation.org>:
  cris: convert ffs from an object-like macro to a function-like macro
  hfsplus: add HFSX subfolder count support
  tools/testing/selftests/ipc/msgque.c: handle msgget failure return correctly
  MAINTAINERS: blackfin: add git repository
  revert "kallsyms: fix absolute addresses for kASLR"
  mm/Kconfig: fix URL for zsmalloc benchmark
  fs/proc/base.c: fix GPF in /proc/$PID/map_files
  mm/compaction: break out of loop on !PageBuddy in isolate_freepages_block
  mm: fix GFP_THISNODE callers and clarify
2014-03-10 17:26:36 -07:00
Geert Uytterhoeven 0eb808eb75 cris: convert ffs from an object-like macro to a function-like macro
This avoids bad interactions with code using identifiers called "ffs":

  drivers/usb/gadget/f_fs.c: In function 'ffsmod_init':
  drivers/usb/gadget/f_fs.c:2693:494: error: 'ffsusb_func' undeclared (first use in this function)
  drivers/usb/gadget/f_fs.c:2693:494: note: each undeclared identifier is reported only once for each function it appears in
  drivers/usb/gadget/f_fs.c: In function 'ffsmod_exit':
  drivers/usb/gadget/f_fs.c:2693:677: error: 'ffsusb_func' undeclared (first use in this function)
  drivers/usb/gadget/f_fs.c: At top level:
  drivers/usb/gadget/f_fs.c:2693:35: warning: 'kernel_ffsusb_func' defined but not used [-Wunused-variable]
  drivers/usb/gadget/f_fs.c: In function 'ffsmod_init':
  drivers/usb/gadget/f_fs.c:2693:15: warning: control reaches end of non-void function [-Wreturn-type]

See http://kisskb.ellerman.id.au/kisskb/buildresult/10715817/

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:21 -07:00
Sergei Antonov d7d673a591 hfsplus: add HFSX subfolder count support
Adds support for HFSX 'HasFolderCount' flag and a corresponding
'folderCount' field in folder records.  (For reference see
HFS_FOLDERCOUNT and kHFSHasFolderCountBit/kHFSHasFolderCountMask in
Apple's source code.)

Ignoring subfolder count leads to fs errors found by Mac:

  ...
  Checking catalog hierarchy.
  HasFolderCount flag needs to be set (id = 105)
  (It should be 0x10 instead of 0)
  Incorrect folder count in a directory (id = 2)
  (It should be 7 instead of 6)
  ...

Steps to reproduce:
 Format with "newfs_hfs -s /dev/diskXXX".
 Mount in Linux.
 Create a new directory in root.
 Unmount.
 Run "fsck_hfs /dev/diskXXX".

The patch handles directory creation, deletion, and rename.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:21 -07:00
Colin Ian King 5394223236 tools/testing/selftests/ipc/msgque.c: handle msgget failure return correctly
A failed msgget causes the test to return an uninitialised value in ret.
Assign ret to -errno on error exit.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:21 -07:00
Michael Opdenacker 1443176fd6 MAINTAINERS: blackfin: add git repository
Add the git repository currently in use for blackfin architecture
development.

This information was obtained from Steven Miao.

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: Steven Miao <realmz6@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:20 -07:00
Andrew Morton 2930ffc759 revert "kallsyms: fix absolute addresses for kASLR"
Revert the recently applied 0f55159d09 ("kallsyms: fix absolute
addresses for kASLR").  Kees said

: This got NAKed, please don't apply -- this patch works for x86 and
: ARM, but may cause problems for others:
:
: https://lkml.org/lkml/2014/2/24/718

It appears that Kees will be fixing all this up for 3.15.

Cc: Andy Honig <ahonig@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:20 -07:00
Ben Hutchings 2216ee8530 mm/Kconfig: fix URL for zsmalloc benchmark
The help text for CONFIG_PGTABLE_MAPPING has an incorrect URL.  While
we're at it, remove the unnecessary footnote notation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:20 -07:00
Artem Fetishev 70335abb26 fs/proc/base.c: fix GPF in /proc/$PID/map_files
The expected logic of proc_map_files_get_link() is either to return 0
and initialize 'path' or return an error and leave 'path' uninitialized.

By the time dname_to_vma_addr() returns 0 the corresponding vma may have
already be gone.  In this case the path is not initialized but the
return value is still 0.  This results in 'general protection fault'
inside d_path().

Steps to reproduce:

  CONFIG_CHECKPOINT_RESTORE=y

    fd = open(...);
    while (1) {
        mmap(fd, ...);
        munmap(fd, ...);
    }

  ls -la /proc/$PID/map_files

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=68991

Signed-off-by: Artem Fetishev <artem_fetishev@epam.com>
Signed-off-by: Aleksandr Terekhov <aleksandr_terekhov@epam.com>
Reported-by: <wiebittewas@gmail.com>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:20 -07:00
Laura Abbott 2af120bc04 mm/compaction: break out of loop on !PageBuddy in isolate_freepages_block
We received several reports of bad page state when freeing CMA pages
previously allocated with alloc_contig_range:

    BUG: Bad page state in process Binder_A  pfn:63202
    page:d21130b0 count:0 mapcount:1 mapping:  (null) index:0x7dfbf
    page flags: 0x40080068(uptodate|lru|active|swapbacked)

Based on the page state, it looks like the page was still in use.  The
page flags do not make sense for the use case though.  Further debugging
showed that despite alloc_contig_range returning success, at least one
page in the range still remained in the buddy allocator.

There is an issue with isolate_freepages_block.  In strict mode (which
CMA uses), if any pages in the range cannot be isolated,
isolate_freepages_block should return failure 0.  The current check
keeps track of the total number of isolated pages and compares against
the size of the range:

        if (strict && nr_strict_required > total_isolated)
                total_isolated = 0;

After taking the zone lock, if one of the pages in the range is not in
the buddy allocator, we continue through the loop and do not increment
total_isolated.  If in the last iteration of the loop we isolate more
than one page (e.g.  last page needed is a higher order page), the check
for total_isolated may pass and we fail to detect that a page was
skipped.  The fix is to bail out if the loop immediately if we are in
strict mode.  There's no benfit to continuing anyway since we need all
pages to be isolated.  Additionally, drop the error checking based on
nr_strict_required and just check the pfn ranges.  This matches with
what isolate_freepages_range does.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:20 -07:00
Johannes Weiner e97ca8e5b8 mm: fix GFP_THISNODE callers and clarify
GFP_THISNODE is for callers that implement their own clever fallback to
remote nodes.  It restricts the allocation to the specified node and
does not invoke reclaim, assuming that the caller will take care of it
when the fallback fails, e.g.  through a subsequent allocation request
without GFP_THISNODE set.

However, many current GFP_THISNODE users only want the node exclusive
aspect of the flag, without actually implementing their own fallback or
triggering reclaim if necessary.  This results in things like page
migration failing prematurely even when there is easily reclaimable
memory available, unless kswapd happens to be running already or a
concurrent allocation attempt triggers the necessary reclaim.

Convert all callsites that don't implement their own fallback strategy
to __GFP_THISNODE.  This restricts the allocation a single node too, but
at the same time allows the allocator to enter the slowpath, wake
kswapd, and invoke direct reclaim if necessary, to make the allocation
happen when memory is full.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Jan Stancek <jstancek@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-10 17:26:19 -07:00
Linus Torvalds e6a4b6f5ea Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro.

Clean up file table accesses (get rid of fget_light() in favor of the
fdget() interface), add proper file position locking.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  get rid of fget_light()
  sockfd_lookup_light(): switch to fdget^W^Waway from fget_light
  vfs: atomic f_pos accesses as per POSIX
  ocfs2 syncs the wrong range...
2014-03-10 12:57:26 -07:00
Linus Torvalds 2b64c5434d Merge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata fixlet from Tejun Heo:
 "I merged the two blaclist entries into 'Crucial_CT???M500SSD*'"

* 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  libata: use wider match for blacklisting Crucial M500
2014-03-10 12:56:24 -07:00
Al Viro bd2a31d522 get rid of fget_light()
instead of returning the flags by reference, we can just have the
low-level primitive return those in lower bits of unsigned long,
with struct file * derived from the rest.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-03-10 11:44:42 -04:00
Al Viro 00e188ef6a sockfd_lookup_light(): switch to fdget^W^Waway from fget_light
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-03-10 11:44:41 -04:00
Linus Torvalds 9c225f2655 vfs: atomic f_pos accesses as per POSIX
Our write() system call has always been atomic in the sense that you get
the expected thread-safe contiguous write, but we haven't actually
guaranteed that concurrent writes are serialized wrt f_pos accesses, so
threads (or processes) that share a file descriptor and use "write()"
concurrently would quite likely overwrite each others data.

This violates POSIX.1-2008/SUSv4 Section XSI 2.9.7 that says:

 "2.9.7 Thread Interactions with Regular File Operations

  All of the following functions shall be atomic with respect to each
  other in the effects specified in POSIX.1-2008 when they operate on
  regular files or symbolic links: [...]"

and one of the effects is the file position update.

This unprotected file position behavior is not new behavior, and nobody
has ever cared.  Until now.  Yongzhi Pan reported unexpected behavior to
Michael Kerrisk that was due to this.

This resolves the issue with a f_pos-specific lock that is taken by
read/write/lseek on file descriptors that may be shared across threads
or processes.

Reported-by: Yongzhi Pan <panyongzhi@gmail.com>
Reported-by: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-03-10 11:44:41 -04:00
Al Viro 1b56e98990 ocfs2 syncs the wrong range...
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-03-10 11:43:32 -04:00
Tejun Heo 83493d7e78 libata: use wider match for blacklisting Crucial M500
We're now blacklisting "Crucial_CT???M500SSD1" and
"Crucial_CT???M500SSD3".  Also, "Micron_M500*" is blacklisted which is
about the same devices as the crucial branded ones.  Let's merge the
two Crucial M500 entries and widen the match to
"Crucial_CT???M500SSD*" so that we don't have to fiddle with new
entries for similar devices.

Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable@vger.kernel.org
2014-03-10 11:17:55 -04:00
Don Zickus fdf57dd052 perf machine: Use map as success in ip__resolve_ams
When trying to map a bunch of instruction addresses to their respective
threads, I kept getting a lot of bogus entries [I forget the exact
reason as I patched my code months ago].

Looking through ip__resolve_ams, I noticed the check for

  if (al.sym)

and realized, most times I have an al.map definition but sometimes an
al.sym is undefined.  In the cases where al.sym is undefined, the loop
keeps going even though a valid al.map exists.

Modify this check to use the more reliable al.map.  This fixed my bogus
entries.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1393386227-149412-2-git-send-email-dzickus@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-03-10 11:19:36 -03:00
Jiri Olsa 155b3a13a6 perf symbols: Fix crash in elf_section_by_name
Fixing crash in elf_section_by_name function caused by missing section
name in elf binary.

Reported-by: Albert Strasheim <albert@cloudflare.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Albert Strasheim <albert@cloudflare.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1393767127-599-1-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-03-10 11:17:14 -03:00
Ben Hutchings 02c5bb4a35 perf trace: Decode architecture-specific signal numbers
SIGSTKFLT is not defined on alpha, mips or sparc.

SIGEMT and SIGSWI are defined on some architectures and should be
decoded here if so.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: 8bad5b0abf ('perf trace: Beautify signal number arg in several syscalls')
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1391648441.3003.101.camel@deadeye.wl.decadent.org.uk
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2014-03-10 11:10:45 -03:00
Linus Torvalds fa389e2202 Linux 3.14-rc6 2014-03-09 19:41:57 -07:00
Linus Torvalds 79e615420c ARM: SoC fixes for 3.14-rc
A collection of fixes for ARM platforms. A little large due to us missing to
 do one last week, but there's nothing in particular here that is in itself
 large and scary.
 
 Mostly a handful of smaller fixes all over the place. The majority is made
 up of fixes for OMAP, but there are a few for others as well. In particular,
 there was a decision to rename a binding for the Broadcom pinctrl block that
 we need to go in before the final release since we then treat it as ABI.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTHKFOAAoJEIwa5zzehBx36EoP/0K7ts9qrShYUD2ASy9HuFKj
 cUcIHF+c0203bavIZzP5EQW/m7TGSybjO8UwkOaLv5SL6E9fn8rR01mmKpONeZbN
 E40ANvOxP3FdWWUFzZSh4oyaX0abaPUtPaYBavakHQI2Ej2m4UmpXAWUkCUGt9Om
 sXSAYuOi6tmpy40aimpaI1QBtx/eyxxJgEBKcbFBvhp1P3d56LTtoqmzACxBFU/8
 4NJIXuZlXTmXV9qIX+y4yXDhmVb6c/gEbNeLJ2F3yWzEeTgnMeycDb8o27Jl6Ii4
 rjsT25qplW5zvUODuhU6QUjuipPh8+WtyF8ruKMakxMNkVoGAC2flWw2TBR09tVj
 zIqYP7/vDhCEYcw4g/BqR8tEvojWt2m7Hm5y+oQY3qmCtLewL6TYeXZcXWFLCwSk
 m4zSvzZOsRsZWsZcflJKZr3g5vsjbg3vtoc3pOZaN4UcqEhU1HCtMfN3znnXIhtj
 xGWqN22S3OpGM0lzLY95lnVeLdrs6eX/ZY23BG1OV4OcDWM4nYwAxEq94QgPvSxR
 9E/fFhU2DZIulEA5Z+/PIReUCLuNL709zqnyAG9VTvbeC24sdr0W6bEM08O85xan
 kb7sbYRnt4qr4uOhPCi7wIENY4rrS91dcE3XZUhJtLWi/0jj+pHT9VoggyS4QdtS
 aWRhg70S5M6quMEoIOzg
 =YBim
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from from Olof Johansson:
 "A collection of fixes for ARM platforms.  A little large due to us
  missing to do one last week, but there's nothing in particular here
  that is in itself large and scary.

  Mostly a handful of smaller fixes all over the place.  The majority is
  made up of fixes for OMAP, but there are a few for others as well.  In
  particular, there was a decision to rename a binding for the Broadcom
  pinctrl block that we need to go in before the final release since we
  then treat it as ABI"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: dts: omap3-gta04: Add ti,omap36xx to compatible property to avoid problems with booting
  ARM: tegra: add LED options back into tegra_defconfig
  ARM: dts: omap3-igep: fix boot fail due wrong compatible match
  ARM: OMAP3: Fix pinctrl interrupts for core2
  pinctrl: Rename Broadcom Capri pinctrl binding
  pinctrl: refer to updated dt binding string.
  Update dtsi with new pinctrl compatible string
  ARM: OMAP: Kill warning in CPUIDLE code with !CONFIG_SMP
  ARM: OMAP2+: Add support for thumb mode on DT booted N900
  ARM: OMAP2+: clock: fix clkoutx2 with CLK_SET_RATE_PARENT
  ARM: OMAP4: hwmod: Fix SOFTRESET logic for OMAP4
  ARM: DRA7: hwmod data: correct the sysc data for spinlock
  ARM: OMAP5: PRM: Fix reboot handling
  ARM: sunxi: dt: Change the touchscreen compatibles
  ARM: sun7i: dt: Fix interrupt trigger types
2014-03-09 19:27:31 -07:00
Linus Torvalds fe9ea91cde NFS client bugfixes for Linux 3.14
Highlights include:
 
 - Fix another nfs4_sequence corruptor in RELEASE_LOCKOWNER
 - Fix an Oopsable delegation callback race
 - Fix another bad stateid infinite loop
 - Fail the data server I/O is the stateid represents a lost lock
 - Fix an Oopsable sunrpc trace event
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTHJSVAAoJEGcL54qWCgDyVRkP/2t43gjMF6P+Yc7VUW2e5uTv
 rHhPGFLuDVs9oS3WUYegzvThZMs//ovTaYgUSDNpOYztEB6P8bDRm41q/VgUIixY
 zWFoEplDgAZZE7gP2EJuXJv3bEdhJqXuCG2KUysqMsaIGlahrlQdHmqGTz6Y931o
 WROyMWVvnL4IoEtQHVR7DwyqkvSmifPJ8MZZv3Liy82wuw1fCsh8uy8mkYYSbdvN
 OK4JmHqdJ+CbAZ0WmE4Xe3Itqy/aIMBL9Jyrq4Zl1QX0p7ez3Xpy4XwmtlZXn2KP
 bKMfK2vP9RggagIpjUL+dhCqxlsyjlF6EzTnQRe7jXqlJ/vJ9pQF8X294jwRysfp
 80jDqsTSND4JQiZuBISID23N1nL0TzrP2tWqipR9zx5JJMRVzYZWTzEq4w2uAHgg
 aW2vTdRNRLZWydlfFNQ8FiuEPIFoQaJFmOCQisec2LtfffLZZBz7JPofjNH9CgU8
 mcbPhv75m2imXDOylydiVoD4x/myCGheYw2hpqhb1ZeuQxdN9lnwa0JzjPiP1h38
 XIYwzM7TE8WayrdkMDCeIem1dz/VexknfKmXmFXlMfn3GRKxowCSrggxKG92k0eP
 L35cJj91a9AoxMz/ej0erv0iI1flLeoYP9aJzIRtZf+SB1BZkKhmWlFRQKqnlIOA
 BzjYui4mUoEQEa5Sk7Th
 =JfQx
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-3.14-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 "Highlights include:

   - Fix another nfs4_sequence corruptor in RELEASE_LOCKOWNER
   - Fix an Oopsable delegation callback race
   - Fix another bad stateid infinite loop
   - Fail the data server I/O is the stateid represents a lost lock
   - Fix an Oopsable sunrpc trace event"

* tag 'nfs-for-3.14-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  SUNRPC: Fix oops when trace sunrpc_task events in nfs client
  NFSv4: Fail the truncate() if the lock/open stateid is invalid
  NFSv4.1 Fail data server I/O if stateid represents a lost lock
  NFSv4: Fix the return value of nfs4_select_rw_stateid
  NFSv4: nfs4_stateid_is_current should return 'true' for an invalid stateid
  NFS: Fix a delegation callback race
  NFSv4: Fix another nfs4_sequence corruptor
2014-03-09 19:17:39 -07:00
Linus Torvalds cf8bf7cd13 USB fixes for 3.14-rc6
Here are 4 USB fixes for your current tree.
 
 Two of them are reverts to hopefully resolve the nasty XHCI regressions
 we have been having on some types of devices.  The other two are quirks
 for some Logitech video devices.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlMbu0sACgkQMUfUDdst+yl/MgCeJbq5Lre/M59O5YVWhS3fghsG
 PisAoI7t2LLnhiC/DwZD10vs2hEkZxw2
 =R/Qt
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are 4 USB fixes for your current tree.

  Two of them are reverts to hopefully resolve the nasty XHCI
  regressions we have been having on some types of devices.  The other
  two are quirks for some Logitech video devices"

* tag 'usb-3.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  Revert "USBNET: ax88179_178a: enable tso if usb host supports sg dma"
  Revert "xhci 1.0: Limit arbitrarily-aligned scatter gather."
  usb: Make DELAY_INIT quirk wait 100ms between Get Configuration requests
  usb: Add device quirk for Logitech HD Pro Webcams C920 and C930e
2014-03-09 18:59:14 -07:00
Linus Torvalds a491ce72f8 Staging driver tree fix for 3.14-rc6
Here is a single staging driver fix for your tree.
 
 It resolves an issue with arbritary writes to memory if a specific
 driver is loaded.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlMbwF4ACgkQMUfUDdst+ynSIwCZAfb/XkCqRqnzW8nfAOqITRP9
 VwUAoMHjGSr6mBbXFzHz5QoxGwylY+dW
 =+BBI
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver tree fix from Greg KH:
 "Here is a single staging driver fix for your tree.

  It resolves an issue with arbritary writes to memory if a specific
  driver is loaded"

* tag 'staging-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  staging/cxt1e1/linux.c: Correct arbitrary memory write in c4_ioctl()
2014-03-09 18:58:27 -07:00
David Howells 979e0d7465 KEYS: Make the keyring cycle detector ignore other keyrings of the same name
This fixes CVE-2014-0102.

The following command sequence produces an oops:

	keyctl new_session
	i=`keyctl newring _ses @s`
	keyctl link @s $i

The problem is that search_nested_keyrings() sees two keyrings that have
matching type and description, so keyring_compare_object() returns true.
s_n_k() then passes the key to the iterator function -
keyring_detect_cycle_iterator() - which *should* check to see whether this is
the keyring of interest, not just one with the same name.

Because assoc_array_find() will return one and only one match, I assumed that
the iterator function would only see an exact match or never be called - but
the iterator isn't only called from assoc_array_find()...

The oops looks something like this:

	kernel BUG at /data/fs/linux-2.6-fscache/security/keys/keyring.c:1003!
	invalid opcode: 0000 [#1] SMP
	...
	RIP: keyring_detect_cycle_iterator+0xe/0x1f
	...
	Call Trace:
	  search_nested_keyrings+0x76/0x2aa
	  __key_link_check_live_key+0x50/0x5f
	  key_link+0x4e/0x85
	  keyctl_keyring_link+0x60/0x81
	  SyS_keyctl+0x65/0xe4
	  tracesys+0xdd/0xe2

The fix is to make keyring_detect_cycle_iterator() check that the key it
has is the key it was actually looking for rather than calling BUG_ON().

A testcase has been included in the keyutils testsuite for this:

	http://git.kernel.org/cgit/linux/kernel/git/dhowells/keyutils.git/commit/?id=891f3365d07f1996778ade0e3428f01878a1790b

Reported-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-09 18:57:18 -07:00
Linus Torvalds 1dc3217dad Merge branch 'for-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal fixes from Zhang Rui:
 "Specifics:

   - Update the help text of INT3403 Thermal driver, which was not
     friendly to users.  From Zhang Rui.

   - The "type" sysfs attribute of x86_pkg_temp_thermal registered
     thermal zones includes an instance number, which makes the
     thermal-to-hwmon bridge fails to group them all in a single hwmon
     device.  Fixed by Jean Delvare.

   - The hwmon device registered by x86_pkg_temp_thermal driver is
     redundant because the temperature value reported by
     x86_pkg_temp_thermal is already reported by the coretemp driver.
     Fixed by Jean Delvare.

   - Fix a problem that the cooling device can not be updated properly
     if it is initialized at max cooling state.  From Ni Wade.

   - Fix a problem that OF registered thermal zones are running without
     thermal governors.  From Zhang Rui.

   - Commit beeb5a1e0e ("thermal: rcar-thermal: Enable driver
     compilation with COMPILE_TEST") broke build on archs wihout io
     memory.  Thus make it depend on HAS_IOMEM to bypass build failures.
     Fixed by Richard Weinberger"

* 'for-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  Thermal: thermal zone governor fix
  Thermal: Allow first update of cooling device state
  thermal,rcar_thermal: Add dependency on HAS_IOMEM
  x86_pkg_temp_thermal: Fix the thermal zone type
  x86_pkg_temp_thermal: Do not expose as a hwmon device
  Thermal: update INT3404 thermal driver help text
2014-03-09 13:52:53 -07:00
Linus Torvalds 4aa41ba7f7 spi: Fixes for v3.14
A scattering of driver specific fixes here.  The fixes from Axel cover
 bitrot in apparently unmaintained drivers, the at79 bug is fixing a
 glitch on /CS during initialisation of some devices which could break
 some slaves and the remainder are fixes for recently introduced bugs
 from the past release cycle or so.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIbBAABAgAGBQJTGVKmAAoJELSic+t+oim9us4P9RSbIcwJWobTy2Px/7yPH2e9
 mAjlTVnBQ2EqwPAI+iro1xQfTeeyn3fAkdINrkWe6xGkbXH4n4OezWZzdH0VbPFV
 buUPc9EYt8FysG/Xne3nyW3cCDzv0+CzvD5CY/83SDa2YMd+2134dxb/8UOpLE+Q
 ptde7EsR11z2XF9PLdm4Wc7ouGEczm3zfbgy1v1uO0UZqeFe8sbzroYLdTZnRYZ5
 s9BD3hUgcB9+cV/v4gv988hYhofmvmsYluBmo8Q7OVgMJ90ne281P8X9CqxEEn1w
 vsebrQ3xFIybDk1GGp79IMTyNooX48+2eTalsJa4+eWsGYpZjMW7wHx+pYX5pqnI
 hxrKU4yXQ8Sa7CMwfGcLgzJpa7DPbTKJZrw7X1x71+Pu8HcBHEKO1xKJ9YNY98Kd
 B0zvdPaYmEFX5e4T7Tv2opk3TVYZtrlNmu16DxgktzYEUdArkDZAV0SVHMtGzpGn
 /AMtvm5LIH58smyhdsocQtdddjE2oELVuLqtfIZgq8KuARmFYVzDro/q9BXcJMWK
 0LJCscr4bxljFEm+NDhPTwtQ1TX3Ahl+sTDkyx1sYjfQXEUsJyP0YesLqbyIP1xY
 gzAURogPooS7Gz4ggkyZv0cvcsKcziXvf4MYpIKT58HjfVgGk5Kk7LU6E2eUJMXU
 AzmQoeKfWrIUzKYOk8w=
 =2e3U
 -----END PGP SIGNATURE-----

Merge tag 'spi-v3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A scattering of driver specific fixes here.

  The fixes from Axel cover bitrot in apparently unmaintained drivers,
  the at79 bug is fixing a glitch on /CS during initialisation of some
  devices which could break some slaves and the remainder are fixes for
  recently introduced bugs from the past release cycle or so"

* tag 'spi-v3.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: atmel: add missing spi_master_{resume,suspend} calls to PM callbacks
  spi: coldfire-qspi: Fix getting correct address for *mcfqspi
  spi: fsl-dspi: Fix getting correct address for master
  spi: spi-ath79: fix initial GPIO CS line setup
  spi: spi-imx: spi_imx_remove: do not disable disabled clocks
  spi-topcliff-pch: Fix probing when DMA mode is used
  spi/topcliff-pch: Fix DMA channel
2014-03-09 13:51:47 -07:00
Linus Torvalds 66a523db70 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
 "This series addresses a number of outstanding issues wrt to active I/O
  shutdown using iser-target.  This includes:

   - Fix a long standing tpg_state bug where a tpg could be referenced
     during explicit shutdown (v3.1+ stable)
   - Use list_del_init for iscsi_cmd->i_conn_node so list_empty checks
     work as expected (v3.10+ stable)
   - Fix a isert_conn->state related hung task bug + ensure outstanding
     I/O completes during session shutdown.  (v3.10+ stable)
   - Fix isert_conn->post_send_buf_count accounting for RDMA READ/WRITEs
     (v3.10+ stable)
   - Ignore FRWR completions during active I/O shutdown (v3.12+ stable)
   - Fix command leakage for interrupt coalescing during active I/O
     shutdown (v3.13+ stable)

  Also included is another DIF emulation fix from Sagi specific to
  v3.14-rc code"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  Target/sbc: Fix sbc_copy_prot for offset scatters
  iser-target: Fix command leak for tx_desc->comp_llnode_batch
  iser-target: Ignore completions for FRWRs in isert_cq_tx_work
  iser-target: Fix post_send_buf_count for RDMA READ/WRITE
  iscsi/iser-target: Fix isert_conn->state hung shutdown issues
  iscsi/iser-target: Use list_del_init for ->i_conn_node
  iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug
2014-03-09 13:50:14 -07:00
Rafael J. Wysocki 4c7b70406e Revert "ACPI / sleep: pm_power_off needs more sanity checks to be installed"
Revert commit 3130497f5b ("ACPI / sleep: pm_power_off needs more
sanity checks to be installed") that breaks power ACPI power off on a
lot of systems, because it checks wrong registers.

Fixes: 3130497f5b ("ACPI / sleep: pm_power_off needs more sanity checks to be installed")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-09 13:48:36 -07:00
Olof Johansson 10554647b4 Two omap3430 vs 3630 device tree regression fixes for
issues booting 3430 based boards.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQIcBAABAgAGBQJTE7TIAAoJEBvUPslcq6VzHvEP/RxCNr6O1sRneB4r+kLScgX1
 ccvJtPAN5s4/MmUZnfoW2REzC8SXc6NxqfnaYaTSSMgn+C+xU98tkI8BGz8IiSA6
 e3LXSQYu1tTht1pL68OFOI0x0mhAhGTFKUFsoAPVWUlyJegckxAg9XKK/SRq52Ea
 ko02mJgdZY6mLaJowsIl940MqW4yGKr3g/z+CDDhYh9E2I0O5hGNjWhhtqcgsjit
 C/HlL7MHf186NEURpd9PAh+6H0bJHHWA0p2Ir825sfJgBFG44pJvnTz7YIpBOQeb
 twlULgFsSPc5osBzxvMBi4xu0Th6h9rydp1QP0tgoS1eEh1ekcf0/gb7wXHYw6g4
 8oKB+K1CJy35UAKgIyObh8VKqNpzQOkQZ6enSBAuS0I944XcNcSxcSUhiY9wo9q4
 96j0cvGIAC8nNIfLXKISnhJuzW4Xa20cIZwjDx9zCHgUGxgx1x2I8g/qVu2pHtwv
 TEZrK94LhlEHNO2By3/4s647YX0r6PpDaGo1rG2z11sRWu3C/G+/KASADW2VNwyC
 bY1HupfLZ6U/zmYu2Y250CyNU+0yTragDKdR8SboT9BQTJ/wWZQckerE/R8y2hN7
 lg67ah0jounBm902bW8JxcUYCuSdku4rtIn7EoDRWRQhnXVYEbmnecM8wltomak5
 vcCiCZkhqQ/O9j0dFLh9
 =J6Y0
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v3.14/fixes-dt-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:

Two omap3430 vs 3630 device tree regression fixes for
issues booting 3430 based boards.

* tag 'omap-for-v3.14/fixes-dt-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: omap3-gta04: Add ti,omap36xx to compatible property to avoid problems with booting
  ARM: dts: omap3-igep: fix boot fail due wrong compatible match

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-08 22:56:31 -08:00
Olof Johansson 4058f76247 Rename pinctrl dt binding to restore consistency with
other bcm mobile bindings.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTDB0VAAoJEPYb7NoJr+nLwGkQALuroLtwGGq0/6Jw4dr9n5UO
 tclAvSbuvUoqwu58cD3grWhkavFKQqR4fJdWcrmczROD9r6rX48QDFe2jNlRjgj/
 yNKkTsd+Ay9I0tPeyx3Buf+tVeQgqsSuG7FJPKgAxMf3HT+tmaWpdIMsjcLOwzdi
 ZMTpIw0cLGMdtr8OSHW/nJuaQV3b+DhnjSLC8QIRg3XgJGjNzJxiKu2Flp0w261P
 Ubzs/PDv83Xl5d972e6JoYR5gGzMwIskm64LmEbHiigLJsvo71oHW57Q2g9asx7h
 stiBzAWF7/Q1xDQ0hTukIOIbX94juR9zSaje66qZ578CFiRAYefginCfyIak9R6R
 Jk0X3krsc0bU9hi4maiYEMVXO3R7K7Rv4BcdoXkg38BXNyINfpdUZlb/5ds6o2FJ
 AZaBgt+/3dl649YaX+ft9VW+1oeV4Hj89sn2pH56NV/rC+dzmh3EHExyHFPJ+sO+
 KKaoXVPf7+TyStrwSxXPSdpUlmGWRWEn9NF1JIGtGNBU+hbiXw7TEOD6DaC8TAN0
 kqAC3ba1YwJalR5rr6UC8ZG2dIZMv3BF7efrM+ewcV7w7F5KF/suJmYIGF+hAFfJ
 Ki7YRRUMS2bVroFjQ7haFGkcwS4JzQnR0hO4O4rNu9JbgBWs0Zv5idj1G/EFpT7a
 hM4ZETYQQb27LVicK/dN
 =2dxs
 -----END PGP SIGNATURE-----

Merge tag 'bcm-for-3.14-pinctrl-reduced-rename' of git://github.com/broadcom/bcm11351 into fixes

Merge 'bcm pinctrl rename' From Christin Daudt:

Rename pinctrl dt binding to restore consistency with other bcm mobile
bindings.

* tag 'bcm-for-3.14-pinctrl-reduced-rename' of git://github.com/broadcom/bcm11351:
  pinctrl: Rename Broadcom Capri pinctrl binding
  pinctrl: refer to updated dt binding string.
  Update dtsi with new pinctrl compatible string
  + Linux 3.14-rc4

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-08 22:11:16 -08:00
Olof Johansson 614cd4a4ac Two fixes for device trees additions that got added in 3.14. One fixes the
interrupt types of some IPs, the other fixes up a compatible that got
 introduced during 3.14
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTFFXwAAoJEBx+YmzsjxAgXR4P/3Oa9crjF3IFZq4ugO+cJsbg
 F3xjKMfuyCjfAYwtzexivRl7PjuGShdevYvNRbY1sqNTAIQbJRWAQC+ZXolXPp/W
 gE6z8mAIlLG0OmE8t1glGLhXVyXiRTlm2s96su2q73MWqYMNXE+yr8K+qt+5gA7r
 M34lYAGqKyQEgs8TKSGSvqa7yZLWZlii6FKwtOCU6HlFm3Rz9Glj8MyTixQDMY0H
 LCONp9csbEgPfrLh+FfJitK2H5kRAU0xJAmP/k+rZtzSKy0kPuCTsKO/ZeUnKhQy
 Rq1Li60Ho3nzmVNljtFVPoDZluxlrZwXA8xLzE88CiwjlYx3TauFFxIIbyGwPamX
 hBEWDqL0x9Y7FQD4Ft4s8mnCE1bD+7eKnqCyCDVGD5je+1qu70vFQZa7ZR2eM9kg
 FS/GSWuG54nIBRwIn7tcdK6iKxkvOIq9ZyQIYw5Uk0d2ZYeiyWNnHl9KtfjwKkXN
 Yh2N6yd4tH6gUhH9niHyczumTuya4+QUbd8DxZrbkD9G3XnmQdLbjTifAjvZTzk/
 zRF/nx399aEYd2LHoBpozuhF9k8otrleC8sWqIjkwVRVX9KYsgNC2CuIgUQCgSpX
 hFcx1xtdNwFyq3AdZmrSV1ORBumEb3lhNAtXWwtFfioamDWDIb2m39wgxiNhZrN7
 hdpJ2Rt48dI8iTRKRxQ9
 =uxIH
 -----END PGP SIGNATURE-----

Merge tag 'sunxi-fixes-for-3.14' of https://github.com/mripard/linux into fixes

Allwinner fixes from Maxime Ripard:

Two fixes for device trees additions that got added in 3.14. One fixes the
interrupt types of some IPs, the other fixes up a compatible that got
introduced during 3.14

* tag 'sunxi-fixes-for-3.14' of https://github.com/mripard/linux:
  ARM: sunxi: dt: Change the touchscreen compatibles
  ARM: sun7i: dt: Fix interrupt trigger types

Signed-off-by: Olof Johansson <olof@lixom.net>
2014-03-08 22:09:23 -08:00
Linus Torvalds ca62eec4e5 Merge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo:
 "Two cpuset locking fixes from Li.  Both tagged for -stable"

* 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cpuset: fix a race condition in __cpuset_node_allowed_softwall()
  cpuset: fix a locking issue in cpuset_migrate_mm()
2014-03-08 11:57:38 -08:00
Linus Torvalds 15b04859a2 Merge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata
Pull libata fixes from Tejun Heo:
 "Just a couple patches blacklisting more broken devices"

* 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk for Seagate Momentus SpinPoint M8 (2BA30001)
  libata: disable queued TRIM for Crucial M500 mSATA SSDs
2014-03-08 11:52:45 -08:00
Linus Torvalds 9f93585fdf Merge branch 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
Pull workqueue fix from Tejun Heo:
 "This pull request contains a workqueue usage fix for firewire.

  For quite a long time now, workqueue only treats two work items
  identical iff both their addresses and callbacks match.  This is to
  avoid introducing false dependency through the work item being
  recycled while being executed.  This changes non-reentrancy guarantee
  for the users of PREPARE[_DELAYED]_WORK() - if the function changes,
  reentrancy isn't guaranteed against the previous instance.  Firewire
  depended on such nonreentrancy guarantee.

  This is fixed by doing the work item multiplexing from firewire proper
  while keeping the work function unchanged"

* 'for-3.14-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  firewire: don't use PREPARE_DELAYED_WORK
2014-03-08 11:51:13 -08:00
Linus Torvalds 85ec688c16 Fix a use-after-free regression since v3.4 and an initialization
regression since v3.10.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTGuNHAAoJEHnzb7JUXXnQlAIP/Ax3QGivoxC4GnidUMWoDwhV
 qYLuq6RQyM2GIT/hkUn5yfcWfJvPw4C4zfVehs5gOER+HrN1gRmQA3Ic00VIIqZm
 hpvVCZNzfCJMFK9ipkLvOLEdHZkqTyZYWWQFa8IdWGztkWshrZkGih/xImr8YWQb
 oOxoCC/548m/R5pdlXCplb2KUZWdpyamvpPxj24obYd1byS+s2gHxx2tGO1coAHR
 BP/L+qzWTRh0oW4TzHYUFfVoUy26wIUuB3WZKn1EuhVp7q+UJ9JXQpbwFp2vYREg
 4OC/f0TySTLMFjEBu5TD/Z8tDNZXLyljuO8nniTRkPqujBqJqveub7xEdtMhXx5a
 JvlDDhqALthVE4zse72swA3kshzkAveHXRDmHjIlNrz6ei/mkyjFsk1gWnza22YA
 1BZjhYAQjrv3MDRPD21e7LtNfOWfniNcSC6KeJc8h3MMXlkUX8wKiGdjDtujOnGE
 rQ2QAFQdQv7yYavWcH0nbHFqWH5sbct7LVIPJ64lg3pleVXGmc/XGoXNpPykQRJn
 WcUXcbO7dc4e8AHIe3DVlUW/KgiucqiLPhC5jpukrXZc039glpOeDPrTeeXYrBaD
 UuZ6w8s7S1MmYBbop5bBW6MJHOQcn0jyej8QnYhoClZ7VcAnUezPz1rxx+hUq+H+
 ov4pftNGrTVd/pexsYvN
 =F0Ho
 -----END PGP SIGNATURE-----

Merge tag 'firewire-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewire fixes from Stefan Richter:
 "Fix a use-after-free regression since v3.4 and an initialization
  regression since v3.10"

* tag 'firewire-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: ohci: fix probe failure with Agere/LSI controllers
  firewire: net: fix use after free
2014-03-08 10:52:43 -08:00
Linus Torvalds 7bffc48177 Single fix for a clock driver merged in 3.14-rc1. Without this fix the
CPU frequency cannot be scaled.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTGoj7AAoJEDqPOy9afJhJm6oQAMEw19Xyz/Of4n4/7sTogL+G
 SXSQK9Ava2rbYNaPrU267dpgFausCQZNIN2uCsrvQtIsWq6ScInKgVxjXUHhE2rm
 F2UkapBBctPhJYKS1W+6WzZzUNNE1Lo4Ab33GlpWV+DBZlJ/XFVDmgbtEs/H59lC
 woedh6q9JZSDa8QSk8t4gG7Fkk15ImgXI2pm9/WiCkh7ZHLgBPTGOpe9rVOiieNf
 uzALWBhpgySEJXDjqK2O6cbng11EvUJGmLYxrOwfOBwcnLe4fk6t26KEovT0e/2s
 HidGVoiGSMWZfY1xrnHaehJvqO7qu7iBsWfn5KRFoMW7NbjDKFUg5YfEIjuh3R/J
 KSEHovNO/PmS2xyQowLplgP2pAuHfZ80oRgsOWZ1fG3CCfXghfr5WVMAL1pqtSQV
 HzTqm+Aiaf4rbKOTcGISYBjG+X7/wU0w/tvDgjpoMo08mR+RmmTC0wkauWXmDOZQ
 P91lWuUtSbpY2B9JdjVNHKTLWpKD8nDBV+aTXj4OwxVIk6s9FhNw6+++9l46OrT8
 02BVhU0Z3rg20o69Nx1vShQFN7vhxsKXC9UePdpt3NnlgUUe1JYiVe44ut/AMr5O
 PIAXQQXj+zgFQX8PdKtLAvRO2DnF4OpCH758AXywmarYZYDahmc6XSJTEqsk3Tbt
 rQCfsnVwgbyQTHfvgqk7
 =UEPE
 -----END PGP SIGNATURE-----

Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux

Pull clk driver fix from Mike Turquette:
 "Single fix for a clock driver merged in 3.14-rc1.  Without this fix
  the CPU frequency cannot be scaled"

* tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mike.turquette/linux:
  clk: shmobile: rcar-gen2: Use kick bit to allow Z clock frequency change
2014-03-08 10:51:30 -08:00
Linus Torvalds abfba60c7a ACPI and power management fixes for 3.14-rc6
- ACPI tables in some BIOSes list device resources with size equal
    to 0, which doesn't make sense, so we should ignore them, but
    instead we try to use them and mangle things completely.  Fix
    from Zhang Rui.
 
  - Several models of Samsung laptops accumulate EC events when they
    are in sleep states which leads to EC buffer overflows that prevent
    new events from being signaled after system resume or reboot.  This
    has been affecting many users for quite a while and may be addressed
    by clearing the EC buffer during system resume and system startup on
    those machines.  From Kieran Clancy.
 
  - If the ACPI sleep control and status registers are not present
    (which  happens if the Hardware Reduced ACPI mode bit is set in
    the ACPI tables, but also may result from BIOS bugs), we should
    not try to use ACPI to power off the system and ACPI S5 should
    not be listed as supported.  Fix from Aubrey Li.
 
  - There's a race condition in cpufreq_get() that leads to a kernel
    crash if that function is called at a wrong time.  Fix from
    Aaron Plattner.
 
  - cpufreq policy objects have to be initialized entirely before
    they are first accessed by their users which isn't the case
    currently and that potentially leads to various kinds of
    breakage that is difficult to debug.  Fix from Viresh Kumar.
 
  - Locking is missing in __cpufreq_add_dev() which leads to a race
    condition that may trigger a kernel crash.  Fix from Viresh Kumar.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJTGnQlAAoJEILEb/54YlRxc8EP/jK95zPwkMwASjNR1s/Gs7/Y
 dx4qOYsWSs0Iutn1syyEg57TgjS/14z0UgOnYRiRHAFP+9610SLjZkZZelYQMgFE
 N4NyQJB7rTL+ycGH1oovbWQPQlewx4aX6p6XNg4bQHTHwxiik/gS6G7rW4Edxt+h
 BIc0SXDf/ldsDJk42v4ie0lSmIRtFF789cXvESi6KmLyNuwiuvGo25uCODVTZxAz
 h/ekjcF3PrbAsTeI+yw4J8pceI/IxXksdHp08jQsS7/QYGnMTGo3PXX3NfgSszbg
 WPPgk409AHjgGPgtWjkVXCChJbKJ57CtHVQ+PG8EYZy+yMTRLWEhxfGcg9sjcKaJ
 Z5gvCQz/g7vF0zk4ScMb6Re+t53lN3SsPwsROj2p/RD7X8uLWIi0Ocuk+iLhermv
 HOEg0Loo6gAN3QiviPjUhtVK1cNu3zuCuTbjhDq6L6S4t1LsnbIWd3QdoUBn1GM+
 wIgFK/qu11m6QV3q8dlAxE/iMZQ8KrixlKfETPXK6KlrWBPA4v5H4lu5IjNEsmd0
 tPbNPFhR4zzlV3QVzlk1NYCV9TxIX7kMl5CIZERLpzkzg9UkgJuaatQx7UjwCcxL
 JTUtMxmHGL7m8ToVJgOcBo+WIjRIEGdQ53ZoB0WndwHYuRIt78WoNP5xTi84JEOk
 AE/Od2/YjC/lb8u/gxK4
 =57PZ
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-3.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:

 - ACPI tables in some BIOSes list device resources with size equal to
   0, which doesn't make sense, so we should ignore them, but instead we
   try to use them and mangle things completely.  Fix from Zhang Rui.

 - Several models of Samsung laptops accumulate EC events when they are
   in sleep states which leads to EC buffer overflows that prevent new
   events from being signaled after system resume or reboot.  This has
   been affecting many users for quite a while and may be addressed by
   clearing the EC buffer during system resume and system startup on
   those machines.  From Kieran Clancy.

 - If the ACPI sleep control and status registers are not present (which
   happens if the Hardware Reduced ACPI mode bit is set in the ACPI
   tables, but also may result from BIOS bugs), we should not try to use
   ACPI to power off the system and ACPI S5 should not be listed as
   supported.  Fix from Aubrey Li.

 - There's a race condition in cpufreq_get() that leads to a kernel
   crash if that function is called at a wrong time.  Fix from Aaron
   Plattner.

 - cpufreq policy objects have to be initialized entirely before they
   are first accessed by their users which isn't the case currently and
   that potentially leads to various kinds of breakage that is difficult
   to debug.  Fix from Viresh Kumar.

 - Locking is missing in __cpufreq_add_dev() which leads to a race
   condition that may trigger a kernel crash.  Fix from Viresh Kumar.

* tag 'pm+acpi-3.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / EC: Clear stale EC events on Samsung systems
  cpufreq: Initialize governor for a new policy under policy->rwsem
  cpufreq: Initialize policy before making it available for others to use
  cpufreq: use cpufreq_cpu_get() to avoid cpufreq_get() race conditions
  ACPI / sleep: pm_power_off needs more sanity checks to be installed
  ACPI / resources: ignore invalid ACPI device resources
2014-03-08 09:17:27 -08:00
Linus Torvalds b01d4e6893 x86: fix compile error due to X86_TRAP_NMI use in asm files
It's an enum, not a #define, you can't use it in asm files.

Introduced in commit 5fa10196bd ("x86: Ignore NMIs that come in during
early boot"), and sadly I didn't compile-test things like I should have
before pushing out.

My weak excuse is that the x86 tree generally doesn't introduce stupid
things like this (and the ARM pull afterwards doesn't cause me to do a
compile-test either, since I don't cross-compile).

Cc: Don Zickus <dzickus@redhat.com>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-03-07 18:58:40 -08:00