]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
9 years agoMerge branch 'topic/uek-4.1/dtrace' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Wed, 2 Dec 2015 16:28:14 +0000 (08:28 -0800)]
Merge branch 'topic/uek-4.1/dtrace' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/dtrace' of git://ca-git.us.oracle.com/linux-uek:
  dtrace: ensure return value of access_process_vm() is > 0

9 years agoMerge branch 'topic/uek-4.1/ocfs2' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Wed, 2 Dec 2015 16:28:08 +0000 (08:28 -0800)]
Merge branch 'topic/uek-4.1/ocfs2' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/ocfs2' of git://ca-git.us.oracle.com/linux-uek:
  ocfs2: fix umask ignored issue

9 years agoMerge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Wed, 2 Dec 2015 16:27:59 +0000 (08:27 -0800)]
Merge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek:
  ksplice: correctly clear garbage on signal handling.

9 years agodtrace: ensure return value of access_process_vm() is > 0
Todd Vierling [Tue, 1 Dec 2015 20:59:59 +0000 (15:59 -0500)]
dtrace: ensure return value of access_process_vm() is > 0

If access_process_vm() returns a value <= 0, the loop intended to replace
NULs with whitespace in the ps string could turn into a memory sprayer
by incrementing its loop counter all the way to (uintptr_t)-1. This
often shows up as crashes with PTEs showing 0x20 stuffed inside, e.g.:

[  630.136149] PGD 66f7f067 PUD 802a5067 PMD 18fff0067 PTE 2020200208ad2025
[  630.136194] Bad pagetable: 000d [#1] SMP

[ 1698.220469] PGD 5cebd067 PUD 5ced6067 PMD 17fe6d067 PTE 8020202032652867
[ 1698.220511] Bad pagetable: 000d [#1] SMP

[  438.486319] PGD 136cee067 PUD 136d9b067 PMD 13ba2067 PTE 802020012c8bf867
[  438.486364] Bad pagetable: 000d [#1] SMP

though it can cause other crashes. To fix, bracket the loop logic in
a test of access_process_vm()'s return value.

Orabug: 22295336

Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
9 years agoocfs2: fix umask ignored issue
Junxiao Bi [Mon, 30 Nov 2015 21:44:50 +0000 (13:44 -0800)]
ocfs2: fix umask ignored issue

Oracle-bug: 22155833

New created file's mode is not masked with umask, and this makes umask not
work for ocfs2 volume.

Fixes: 702e5bc ("ocfs2: use generic posix ACL infrastructure")
Acked-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Gang He <ghe@suse.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 8f1eb48758aacf6c1ffce18179295adbf3bd7640)

9 years agoksplice: correctly clear garbage on signal handling.
Jamie Iles [Thu, 12 Nov 2015 12:29:25 +0000 (12:29 +0000)]
ksplice: correctly clear garbage on signal handling.

The test for _TIF_SIGPENDING was inverted, and so the stack was being
cleared when there were no signals pending rather than signals pending.
Correctly test _TIF_SIGPENDING so that the freezer can be used to clear
the stack of garbage when applying Ksplice updates.

Orabug: 22194459

Reviewed-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Signed-off-by: Jamie Iles <jamie.iles@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/nfs-rdma' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Thu, 26 Nov 2015 04:09:09 +0000 (20:09 -0800)]
Merge branch 'topic/uek-4.1/nfs-rdma' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/nfs-rdma' of git://ca-git.us.oracle.com/linux-uek:
  NFSoRDMA: for local permissions, pull lkey value from the correct ib_mr

9 years agoMerge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com...
Santosh Shilimkar [Thu, 26 Nov 2015 04:08:58 +0000 (20:08 -0800)]
Merge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek:
  Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation"

9 years agoNFSoRDMA: for local permissions, pull lkey value from the correct ib_mr
Todd Vierling [Mon, 23 Nov 2015 15:08:44 +0000 (10:08 -0500)]
NFSoRDMA: for local permissions, pull lkey value from the correct ib_mr

When not using local_dma_lkey, fmr_op_open() fetches a ib_mr associated
with local write permission. This value is stuffed into the returned
rpcrdma_ia, but ia->ri_dma_mr->lkey was accessed _before_ the ia->ri_dma_mr
was updated.

Fix this by pulling lkey directly from the newly fetched ib_mr rather than
the value previously stored in ia->ri_dma_mr.

Orabug: 22202841

Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
9 years agoRevert "nfs: take extra reference to fl->fl_file when running a LOCKU operation"
Dan Duval [Wed, 25 Nov 2015 23:39:48 +0000 (18:39 -0500)]
Revert "nfs: take extra reference to fl->fl_file when running a LOCKU operation"

Orabug: 22186705

This reverts commit 0ea14034782db03efc55a7d8dbfa7cd140e7e959.

This commit has been seen to cause hard hangs or crashes when
flock(..., LOCK_EX) is attempted on an NFSv4-mounted filesystem.

Signed-off-by: Dan Duval <dan.duval@oracle.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 20 Nov 2015 16:34:23 +0000 (08:34 -0800)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: builds: Enable kabi check
  uek-rpm: builds: generate module kabi files
  uek-rpm: builds: add kabi whitelist debug version

9 years agouek-rpm: builds: Enable kabi check
Manjunath Govindashetty [Fri, 20 Nov 2015 06:54:20 +0000 (22:54 -0800)]
uek-rpm: builds: Enable kabi check

Orabug: 21882206

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agouek-rpm: builds: generate module kabi files
Guru Anbalagane [Fri, 20 Nov 2015 06:15:32 +0000 (22:15 -0800)]
uek-rpm: builds: generate module kabi files

Orabug: 17437969

Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agouek-rpm: builds: add kabi whitelist debug version
Santosh Shilimkar [Fri, 20 Nov 2015 09:30:23 +0000 (01:30 -0800)]
uek-rpm: builds: add kabi whitelist debug version

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 20 Nov 2015 04:25:24 +0000 (20:25 -0800)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: builds: add kabi name tags

9 years agouek-rpm: builds: add kabi name tags
Guru Anbalagane [Fri, 20 Nov 2015 04:23:35 +0000 (20:23 -0800)]
uek-rpm: builds: add kabi name tags

Orabug: 17437969

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 20 Nov 2015 04:11:06 +0000 (20:11 -0800)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: builds: Add kabi whitelist

9 years agouek-rpm: builds: Add kabi whitelist
Guru Anbalagane [Fri, 20 Nov 2015 03:42:54 +0000 (19:42 -0800)]
uek-rpm: builds: Add kabi whitelist

Orabug: 17437969

Signed-off-by: Guru Anbalagane <guru.anbalagane@oracle.com>
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 20 Nov 2015 02:03:03 +0000 (18:03 -0800)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: configs: change the x86_64 default governor to ondemand
  uek-rpm: configs: sync up the EFIVAR_FS between ol6 and ol7
  uek-rpm: use the latest 0.5 version of linux-firmware

9 years agoMerge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com...
Santosh Shilimkar [Fri, 20 Nov 2015 02:02:55 +0000 (18:02 -0800)]
Merge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek:
  mm-hugetlbfs-fix-bugs-in-fallocate-hole-punch-of-areas-with-holes-v3
  mm/hugetlbfs: fix bugs in fallocate hole punch of areas with holes
  btrfs: Print Warning only if ENOSPC_DEBUG is enabled
  rtnetlink: RTEXT_FILTER_SKIP_STATS support to avoid dumping inet/inet6 stats

9 years agoMerge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 20 Nov 2015 02:02:46 +0000 (18:02 -0800)]
Merge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek:
  pci: Limit VPD length for megaraid_sas adapter
  KABI Padding to allow future extensions

9 years agoMerge branch 'topic/uek-4.1/dtrace' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 20 Nov 2015 02:02:39 +0000 (18:02 -0800)]
Merge branch 'topic/uek-4.1/dtrace' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/dtrace' of git://ca-git.us.oracle.com/linux-uek:
  dtrace: fire proc:::signal-send for queued signals too
  dtrace: correct signal-handle probe semantics
  dtrace: remove trailing space in psargs

9 years agomm-hugetlbfs-fix-bugs-in-fallocate-hole-punch-of-areas-with-holes-v3
Mike Kravetz [Thu, 19 Nov 2015 18:12:01 +0000 (10:12 -0800)]
mm-hugetlbfs-fix-bugs-in-fallocate-hole-punch-of-areas-with-holes-v3

Orabug: 22220400

V3:
  Add more descriptive comments and minor improvements as suggested by
  Naoya Horiguchi
v2:
  Make remove_inode_hugepages simpler after verifying truncate can not
  race with page faults here.

Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: "Hillf Danton" <hillf.zj@alibaba-inc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit d4d7420e86e29267ff2e20226cbcadcf7e6eab8c)
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
9 years agomm/hugetlbfs: fix bugs in fallocate hole punch of areas with holes
Mike Kravetz [Thu, 19 Nov 2015 18:12:01 +0000 (10:12 -0800)]
mm/hugetlbfs: fix bugs in fallocate hole punch of areas with holes

Orabug: 22220400

Hugh Dickins pointed out problems with the new hugetlbfs fallocate hole
punch code.  These problems are in the routine remove_inode_hugepages and
mostly occur in the case where there are holes in the range of pages to be
removed.  These holes could be the result of a previous hole punch or
simply sparse allocation.  The current code could access pages outside the
specified range.

remove_inode_hugepages handles both hole punch and truncate operations.
Page index handling was fixed/cleaned up so that the loop index always
matches the page being processed.  The code now only makes a single pass
through the range of pages as it was determined page faults could not race
with truncate.  A cond_resched() was added after removing up to
PAGEVEC_SIZE pages.

Some totally unnecessary code in hugetlbfs_fallocate() that remained from
early development was also removed.

Tested with fallocate tests submitted here:
http://librelist.com/browser//libhugetlbfs/2015/6/25/patch-tests-add-tests-for-fallocate-system-call/
And, some ftruncate tests under development

Fixes: b5cec28d36f5 ("hugetlbfs: truncate_hugepages() takes a range of pages")
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: "Hillf Danton" <hillf.zj@alibaba-inc.com>
Cc: <stable@vger.kernel.org> [4.3]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit ef9a2b7a46755b6b2d4ab522c2ffa53c6e1a0729)
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
9 years agobtrfs: Print Warning only if ENOSPC_DEBUG is enabled
Ashish Samant [Sat, 17 Oct 2015 02:11:14 +0000 (19:11 -0700)]
btrfs: Print Warning only if ENOSPC_DEBUG is enabled

Orabug: 21626666

Signed-off-by : Ashish Samant <ashish.samant@oracle.com>
Reviewed-by: Bo Liu <bo.li.liu@oracle.com>
9 years agortnetlink: RTEXT_FILTER_SKIP_STATS support to avoid dumping inet/inet6 stats
Sowmini Varadhan [Fri, 11 Sep 2015 20:48:48 +0000 (16:48 -0400)]
rtnetlink: RTEXT_FILTER_SKIP_STATS support to avoid dumping inet/inet6 stats

Many commonly used functions like getifaddrs() invoke RTM_GETLINK
to dump the interface information, and do not need the
the AF_INET6 statististics that are always returned by default
from rtnl_fill_ifinfo().

Computing the statistics can be an expensive operation that impacts
scaling, so it is desirable to avoid this if the information is
not needed.

This patch adds a the RTEXT_FILTER_SKIP_STATS extended info flag that
can be passed with netlink_request() to avoid statistics computation
for the ifinfo path.

Orabug: 21857538

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agopci: Limit VPD length for megaraid_sas adapter
Babu Moger [Fri, 6 Nov 2015 22:11:01 +0000 (17:11 -0500)]
pci: Limit VPD length for megaraid_sas adapter

Reading or Writing of PCI VPD data causes system panic.
We saw this problem by running "lspci -vvv" in the beginning.
However this can be easily reproduced by running
 cat /sys/bus/devices/XX../vpd

VPD length has been set as 32768 by default. Accessing vpd
will trigger read/write of 32k. This causes problem as we
could read data beyond the VPD end tag. Behaviour is un-
predictable when this happens. I see some other adapter doing
similar quirks(commit bffadffd43d4 ("PCI: fix VPD limit quirk
for Broadcom 5708S"))

I see there is an attempt to fix this right way.
https://patchwork.ozlabs.org/patch/534843/ or
https://lkml.org/lkml/2015/10/23/97

Tried to fix it this way, but problem is I dont see the proper
start/end TAGs(at least for this adapter) at all. The data is
mostly junk or zeros. This patch fixes the issue by setting the
vpd length to 0x80.

Signed-off-by: Babu Moger <babu.moger@oracle.com>
Reviewed-by: Khalid Aziz <khalid.aziz@oracle.com>
Orabug: 22104511

Changes since v2 -> v3
Changed the vpd length from 0 to 0x80 which leaves the
option open for someone to read first few bytes.

Changes since v1 -> v2
Removed the changes in pci_id.h. Kept all the vendor
ids in quirks.c

9 years agouek-rpm: configs: change the x86_64 default governor to ondemand
Todd Vierling [Wed, 7 Oct 2015 18:23:26 +0000 (14:23 -0400)]
uek-rpm: configs: change the x86_64 default governor to ondemand

Orabug: 21910845

Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
9 years agouek-rpm: configs: sync up the EFIVAR_FS between ol6 and ol7
Santosh Shilimkar [Thu, 19 Nov 2015 21:53:59 +0000 (13:53 -0800)]
uek-rpm: configs: sync up the EFIVAR_FS between ol6 and ol7

Orabug: 21806900

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoKABI Padding to allow future extensions
Manjunath Govindashetty [Sat, 14 Nov 2015 05:54:30 +0000 (21:54 -0800)]
KABI Padding to allow future extensions

Padding for struct Scsi_Host , pci_dev , pci_driver for future extension while preserving ABI

Orabug: 22227652

Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agouek-rpm: use the latest 0.5 version of linux-firmware
Santosh Shilimkar [Tue, 17 Nov 2015 19:49:31 +0000 (11:49 -0800)]
uek-rpm: use the latest 0.5 version of linux-firmware

Orabug: 22227047

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 13 Nov 2015 19:29:36 +0000 (11:29 -0800)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: configs: Sparc64: enable RDS modules
  uek-rpm: ol7: update linux-firmware dependency to 20140911-0.1.git365e80c.0.4
  uek-rpm: configs: disable PS2_VMMOUSE to avoid vmware platform breakage
  uek-rpm: configs: ol7: don't set EFI_VARS_PSTORE_DEFAULT_DISABLE

9 years agoMerge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com...
Santosh Shilimkar [Fri, 13 Nov 2015 19:29:22 +0000 (11:29 -0800)]
Merge branch 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/upstream-cherry-picks' of git://ca-git.us.oracle.com/linux-uek:
  mm: do not ignore mapping_gfp_mask in page cache allocation paths
  PCI: Set SR-IOV NumVFs to zero after enumeration
  virtio-net: drop NETIF_F_FRAGLIST
  blk-mq: avoid excessive boot delays with large lun counts

9 years agoMerge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 13 Nov 2015 19:29:08 +0000 (11:29 -0800)]
Merge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek:
  KABI PADDING FOR ORACLE SPECIFIC FUTURE EXTENSIONS
  Disable VLAN 0 tagging for none VLAN traffic

9 years agoMerge branch 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Fri, 13 Nov 2015 19:28:39 +0000 (11:28 -0800)]
Merge branch 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/sparc' of git://ca-git.us.oracle.com/linux-uek:
  SPARC64: UEK4 LDOMS DOMAIN SERVICES UPDATE 1
  i40e: Look up MAC address in Open Firmware or IDPROM
  sparc64, vdso: update the CLOCK_MONOTONIC_COARSE clock

9 years agoMerge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Fri, 13 Nov 2015 19:28:12 +0000 (11:28 -0800)]
Merge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek:
  RDS: establish connection for legitimate remote RDMA message
  rds: remove the _reuse_ rds ib pool statistics
  RDS: Add support for per socket SO_TIMESTAMP for incoming messages
  RDS: Fix out-of-order RDS_CMSG_RDMA_SEND_STATUS
  Integrate Uvnic functionality into uek-4.1 Revision 8008
  1) S_IRWXU causing kernel soft crash changing to 0644 WARNING: CPU: 0 PID: 20907 at fs/sysfs/group.c:61 create_files+0x171/0x180() Oct 12 21:43:14 ovn87-180 kernel: [252606.588541] Attribute vhba_default_scsi_timeout: Invalid permissions 0700 [Rev 8008]
  1) Support vnic for EDR based platform(uVnic) 2) Supported Types now Type 0 - XSMP_XCM_OVN - Xsigo VP780/OSDN standalone Chassis, (add pvi) Type 1 - XSMP_XCM_NOUPLINK - EDR Without uplink (add public-network) Type 2 - XSMP_XCM_UPLINK -EDR with uplink (add public-network <with -if> 3) Intelligence in driver to support all the modes 4) Added Code for printing Multicast LID [Revision 8008] 5) removed style errors
  net/rds: start rdma listening after ib/iw initialization is done

9 years agomm: do not ignore mapping_gfp_mask in page cache allocation paths
Michal Hocko [Wed, 24 Jun 2015 23:58:06 +0000 (16:58 -0700)]
mm: do not ignore mapping_gfp_mask in page cache allocation paths

page_cache_read, do_generic_file_read, __generic_file_splice_read and
__ntfs_grab_cache_pages currently ignore mapping_gfp_mask when calling
add_to_page_cache_lru which might cause recursion into fs down in the
direct reclaim path if the mapping really relies on GFP_NOFS semantic.

This doesn't seem to be the case now because page_cache_read (page fault
path) doesn't seem to suffer from the reclaim recursion issues and
do_generic_file_read and __generic_file_splice_read also shouldn't be
called under fs locks which would deadlock in the reclaim path.  Anyway it
is better to obey mapping gfp mask and prevent from later breakage.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Anton Altaparmakov <anton@tuxera.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 6afdb859b71019143b8eecda02b8b29b03185055)

Orabug: 22066703

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoPCI: Set SR-IOV NumVFs to zero after enumeration
Bjorn Helgaas [Mon, 26 Oct 2015 03:43:22 +0000 (12:43 +0900)]
PCI: Set SR-IOV NumVFs to zero after enumeration

Orabug: 21547430

The enumeration path should leave NumVFs set to zero.  But after
4449f079722c ("PCI: Calculate maximum number of buses required for VFs"),
we call virtfn_max_buses() in the enumeration path, which changes NumVFs.
This NumVFs change is visible via lspci and sysfs until a driver enables
SR-IOV.

Set NumVFs to zero after virtfn_max_buses() computes the maximum number of
buses.

Fixes: 4449f079722c ("PCI: Calculate maximum number of buses required for VFs")
Based-on-patch-by: Ethan Zhao <ethan.zhao@oracle.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
9 years agovirtio-net: drop NETIF_F_FRAGLIST
Jason Wang [Tue, 4 Aug 2015 18:34:04 +0000 (02:34 +0800)]
virtio-net: drop NETIF_F_FRAGLIST

virtio-net: drop NETIF_F_FRAGLIST

Orabug: 22154074
CVE-2015-5156

virtio declares support for NETIF_F_FRAGLIST, but assumes
that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
always true with a fraglist.

A longer fraglist in the skb will make the call to skb_to_sgvec overflow
the sg array, leading to memory corruption.

Drop NETIF_F_FRAGLIST so we only get what we can handle.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
9 years agoblk-mq: avoid excessive boot delays with large lun counts
Jeff Moyer [Tue, 10 Nov 2015 22:22:59 +0000 (14:22 -0800)]
blk-mq: avoid excessive boot delays with large lun counts

Zhangqing Luo reported long boot times on a system with thousands of
LUNs when scsi-mq was enabled.  He narrowed the problem down to
blk_mq_add_queue_tag_set, where every queue is frozen in order to set
the BLK_MQ_F_TAG_SHARED flag.  Each added device will freeze all queues
added before it in sequence, which involves waiting for an RCU grace
period for each one.  We don't need to do this.  After the second queue
is added, only new queues need to be initialized with the shared tag.
We can do that by percolating the flag up to the blk_mq_tag_set, and
updating the newly added queue's hctxs if the flag is set.

This problem was introduced by commit 0d2602ca30e41 (blk-mq: improve
support for shared tags maps).

Reported-and-tested-by: Jason Luo <zhangqing.luo@oracle.com>
Reviewed-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit 2404e607a9ee36db361bebe32787dafa1f7d6c00)

Orabug: 21879600
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
9 years agoRDS: establish connection for legitimate remote RDMA message
Santosh Shilimkar [Thu, 29 Oct 2015 16:24:46 +0000 (09:24 -0700)]
RDS: establish connection for legitimate remote RDMA message

The first message to a remote node should prompt a new
connection even if it is RDMA operation via CMSG. So that
means before CMSG parsing, the connection needs to be
established. Commit 3d6e0fed8edc ("rds_rdma: rds_sendmsg
should return EAGAIN if connection not setup")' tried to
address that issue as part of bug 20232581.

But it inadvertently broke the QoS policy evaluation. Basically
QoS has opposite requirement where it needs information from
CMSG to evaluate if the message is legitimate to be sent over
the wire. It basically needs to know how the total payload
which should include the actual payload and additional rdma
bytes. It then evaluates total payload with the systems QoS
thresholds to determine if the message is legitimate to be
sent.

Patch addresses these two opposite requirement by fetching
only the rdma bytes information for QoS evaluation and let
the full CMSG parsing happen after the connection is
initiated.  Since the connection establishment is asynchronous,
we make sure the map failure because of unavailable
connection reach to the user by appropriate error code.

Orabug: 22139696

Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agords: remove the _reuse_ rds ib pool statistics
Wengang Wang [Tue, 10 Nov 2015 02:43:38 +0000 (10:43 +0800)]
rds: remove the _reuse_ rds ib pool statistics

Orabug: 22124214
fix a regress introduced by ceb99ba579a769f4e02375a3d52e36f44ae5f27f

The above commit introduced the two new statistics to rds_ib_statistics.

       uint64_t        s_ib_rdma_mr_1m_pool_reuse;
       uint64_t        s_ib_rdma_mr_8k_pool_reuse;

But didn't have rds-info changed accordingly thus rds-info gets shifted stats.

this removes these two stats.

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Acked-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
9 years agoRDS: Add support for per socket SO_TIMESTAMP for incoming messages
Santosh Shilimkar [Sat, 5 Sep 2015 00:01:06 +0000 (17:01 -0700)]
RDS: Add support for per socket SO_TIMESTAMP for incoming messages

The SO_TIMESTAMP generates time stamp for each incoming RDS message
using the wall time. Result is returned via recv_msg() in a control
message as timeval (usec resolution).

User app can enable it by using SO_TIMESTAMP setsocketopt() at
SOL_SOCKET level. CMSG data of cmsg type SO_TIMESTAMP contains the
time stamp in struct timeval format.

Orabug: 22190837

Acked-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Reviewed-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Tested-by: Namrata Jampani <namrata.jampani@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoKABI PADDING FOR ORACLE SPECIFIC FUTURE EXTENSIONS
Manjunath Govindashetty [Tue, 10 Nov 2015 10:45:46 +0000 (02:45 -0800)]
KABI PADDING FOR ORACLE SPECIFIC FUTURE EXTENSIONS

Orabug 21903851

Padding added before ABI freeze to allow future extensions while
preserving ABI on interface structures scsi_disk ,queue_limits,block_device_operations,
sk_buff,user_namespace,ip_tunnel,net,sock,scsi_cmnd ,scsi_device

Reviwed-by: Martin Petersen <martin.petersen@oracle.com>
Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
9 years agouek-rpm: configs: Sparc64: enable RDS modules
Allen Pais [Fri, 13 Nov 2015 16:48:02 +0000 (08:48 -0800)]
uek-rpm: configs: Sparc64: enable RDS modules

 This patch enables rds rdman and tcp mdoules.

 Orabug: 22194248

Signed-off-by: Allen Pais <allen.pais@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agodtrace: fire proc:::signal-send for queued signals too
Nick Alcock [Thu, 15 Oct 2015 11:18:11 +0000 (12:18 +0100)]
dtrace: fire proc:::signal-send for queued signals too

A sigqueue()d signal is a sent signal too, so we should fire
proc:::signal-send for such signals.

Orabug: 22027302
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Acked-by: Kris Van Hees <kris.van.hees@oracle.com>
9 years agodtrace: correct signal-handle probe semantics
Kris Van Hees [Wed, 14 Oct 2015 09:27:44 +0000 (05:27 -0400)]
dtrace: correct signal-handle probe semantics

The proc:::signal-handle probe should fire when a signal is presented
to a task for handling, regardless of the handler settings.  Previously,
we were only firing this probe when the signal actually had a specific
handler associated with it.

Orabug: 21974641
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
9 years agodtrace: remove trailing space in psargs
Kris Van Hees [Wed, 14 Oct 2015 09:33:08 +0000 (05:33 -0400)]
dtrace: remove trailing space in psargs

Due to an implementation error, the psargs string contained a trailing
space that was not meant to be there.  This has been corrected.

Orabug: 21974606
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
9 years ago SPARC64: UEK4 LDOMS DOMAIN SERVICES UPDATE 1
Aaron Young [Wed, 11 Nov 2015 14:24:54 +0000 (06:24 -0800)]
SPARC64: UEK4 LDOMS DOMAIN SERVICES UPDATE 1

    This update provides several fixes for LDoms on UEK4
    (i.e. fixes/updates for the ldoms UEK4 port done previously
    - See BUG 21644721) and updates for ldoms to work with Zeus.
    It also provides support for libpri which requires a HV call
    to retrieve the PRI from the SP and enhancements to the vlds
    driver to allow multiple process to register/use a service
    simultaneously - so multiple processes can use libpri at the
    same time.

Signed-off-by: Aaron Young <aaron.young@oracle.com>
    Orabug: 22185080
(cherry picked from commit f078f7f618c8c127d7562d946c630d106ed3b1b8)

9 years agoi40e: Look up MAC address in Open Firmware or IDPROM
Sowmini Varadhan [Wed, 4 Nov 2015 19:39:56 +0000 (14:39 -0500)]
i40e: Look up MAC address in Open Firmware or IDPROM

This is the i40e equivalent of commit c762dff24c06 ("ixgbe: Look up MAC
address in Open Firmware or IDPROM").

As with that fix, attempt to look up the MAC address in Open Firmware
on systems that support it, and use IDPROM on SPARC if no OF address
is found.

In the case of the i40e there is an assumption that the default mac
address has already been set up as the primary mac filter on probe,
so if this filter is obtained from the Open Firmware or IDPROM, an
explicit write is needed via i40e_aq_mac_address_write() and
i40e_aq_add_macvlan() invocation.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
(cherry picked from commit c7a3fd4e5d009b6b5bc90ee373aac232a7089068)

9 years agoRDS: Fix out-of-order RDS_CMSG_RDMA_SEND_STATUS
Wei Lin Guay [Wed, 11 Nov 2015 17:31:14 +0000 (09:31 -0800)]
RDS: Fix out-of-order RDS_CMSG_RDMA_SEND_STATUS

Orabug: 22126982

If the RDS user application requests notification of RDMA send
completions, there is a possibility that RDS_CMSG_RDMA_SEND_STATUS
will be delivered out-of-order.

This can happen if RDS drops sending ACK after it received an explicit
ACK. In this case, the rds message ended up in reverse order in the
list.

Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Reviewed-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Signed-off-by: Wei Lin Guay <wei.lin.guay@oracle.com>
9 years agouek-rpm: ol7: update linux-firmware dependency to 20140911-0.1.git365e80c.0.4
Dan Duval [Thu, 5 Nov 2015 15:42:49 +0000 (10:42 -0500)]
uek-rpm: ol7: update linux-firmware dependency to 20140911-0.1.git365e80c.0.4

Orabug: 22146380

Version 20140911-0.1.git365e80c.0.3 of the linux-firmware package did
not have the latest firmware for the bnx2x NICs.  Since the bnx2x driver
requests a specific version of the firmware, the result was that probing
of bnx2x devices would fail.

linux-firmware version 20140911-0.1.git365e80c.0.4 contains the updated
firmware.

Signed-off-by: Dan Duval <dan.duval@oracle.com>
9 years agouek-rpm: configs: disable PS2_VMMOUSE to avoid vmware platform breakage
Santosh Shilimkar [Mon, 9 Nov 2015 18:14:16 +0000 (10:14 -0800)]
uek-rpm: configs: disable PS2_VMMOUSE to avoid vmware platform breakage

While at it sync up the configs

Orabug: 22166599

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agouek-rpm: configs: ol7: don't set EFI_VARS_PSTORE_DEFAULT_DISABLE
Santosh Shilimkar [Mon, 9 Nov 2015 22:58:54 +0000 (14:58 -0800)]
uek-rpm: configs: ol7: don't set EFI_VARS_PSTORE_DEFAULT_DISABLE

To keep OL7 and OL6 build in sync and also follow the Arch Linux
recommondation on EFI_VARS.

https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface#Inconsistency_between_efivarfs_and_sysfs-efivars

Orabug: 21806900

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoDisable VLAN 0 tagging for none VLAN traffic
Brian Maly [Wed, 28 Oct 2015 23:03:09 +0000 (19:03 -0400)]
Disable VLAN 0 tagging for none VLAN traffic

Orabug: 22074114

Cisco enic driver on UCS blades tags a None VLAN traffic with VLAN 0, this causes VMs
that do not have the kernel patch " VLAN 0 should be treated as no vlan tag" to drop all
receive traffic as these VMs do not know how to deal with the VLAN 0 tag.
This is also a problem for older VMs that can not take the mentioned patch.

This fix disables the enic driver from tagging a None VLAN traffic with VLAN 0.This
fix is controlled by a driver parameters " disable_vlan0". the default value is disable_vlan0=1
which to disable the driver from tagging traffic with VLAN 0. To revert to original behavior
add "options enic disable_vlan0=0" to /etc/modprobe.con

Signed-off-by: Adnan Misherfi <adnan.misherfi@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
9 years agoMerge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek-ofed into...
Santosh Shilimkar [Tue, 10 Nov 2015 02:17:26 +0000 (18:17 -0800)]
Merge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek-ofed into topic/uek-4.1/ofed

9 years agoMerge branch 'topic/uek-4.1/ofed.ovn' into topic/uek-4.1/ofed
Qing Huang [Tue, 10 Nov 2015 00:23:23 +0000 (16:23 -0800)]
Merge branch 'topic/uek-4.1/ofed.ovn' into topic/uek-4.1/ofed

* topic/uek-4.1/ofed.ovn:
  Integrate Uvnic functionality into uek-4.1 Revision 8008
  1) S_IRWXU causing kernel soft crash changing to 0644 WARNING: CPU: 0 PID: 20907 at fs/sysfs/group.c:61 create_files+0x171/0x180() Oct 12 21:43:14 ovn87-180 kernel: [252606.588541] Attribute vhba_default_scsi_timeout: Invalid permissions 0700 [Rev 8008]
  1) Support vnic for EDR based platform(uVnic) 2) Supported Types now Type 0 - XSMP_XCM_OVN - Xsigo VP780/OSDN standalone Chassis, (add pvi) Type 1 - XSMP_XCM_NOUPLINK - EDR Without uplink (add public-network) Type 2 - XSMP_XCM_UPLINK -EDR with uplink (add public-network <with -if> 3) Intelligence in driver to support all the modes 4) Added Code for printing Multicast LID [Revision 8008] 5) removed style errors

9 years agoIntegrate Uvnic functionality into uek-4.1 Revision 8008
Pradeep Gopanapalli [Sat, 7 Nov 2015 02:14:12 +0000 (18:14 -0800)]
Integrate Uvnic functionality into uek-4.1 Revision 8008

Reviewed-by: Sajid Zia <sajid.zia@oracle.com>
Signed-off-by: Pradeep Gopanapalli <pradeep.gopanapalli@oracle.com>
Signed-off-by: Qing Huang <qing.huang@oracle.com>
9 years ago1) S_IRWXU causing kernel soft crash changing to 0644 WARNING: CPU: 0 PID: 20907...
Pradeep Gopanapalli [Sat, 7 Nov 2015 02:11:33 +0000 (18:11 -0800)]
1) S_IRWXU causing kernel soft crash changing to 0644 WARNING: CPU: 0 PID: 20907 at fs/sysfs/group.c:61 create_files+0x171/0x180() Oct 12 21:43:14 ovn87-180 kernel: [252606.588541] Attribute vhba_default_scsi_timeout: Invalid permissions 0700 [Rev 8008]

Reviewed-by: Sajid Zia <sajid.zia@oracle.com>
Signed-off-by: Pradeep Gopanapalli <pradeep.gopanapalli@oracle.com>
Signed-off-by: Qing Huang <qing.huang@oracle.com>
9 years ago1) Support vnic for EDR based platform(uVnic) 2) Supported Types now Type 0 - XSMP_XC...
Pradeep Gopanapalli [Thu, 5 Nov 2015 02:58:15 +0000 (18:58 -0800)]
1) Support vnic for EDR based platform(uVnic) 2) Supported Types now Type 0 - XSMP_XCM_OVN - Xsigo VP780/OSDN standalone Chassis, (add pvi) Type 1 - XSMP_XCM_NOUPLINK - EDR Without uplink (add public-network) Type 2 - XSMP_XCM_UPLINK -EDR with uplink (add public-network <with -if> 3) Intelligence in driver to support all the modes 4) Added Code for printing Multicast LID [Revision 8008] 5) removed style errors

Reviewed-by: Sajid Zia <sajid.zia@oracle.com>
Signed-off-by: Pradeep Gopanapalli <pradeep.gopanapalli@oracle.com>
Signed-off-by: Qing Huang <qing.huang@oracle.com>
9 years agosparc64, vdso: update the CLOCK_MONOTONIC_COARSE clock
Nick Alcock [Mon, 2 Nov 2015 21:44:27 +0000 (21:44 +0000)]
sparc64, vdso: update the CLOCK_MONOTONIC_COARSE clock

In the significant rewrite involved in porting the SPARC vDSO code to
v4.1, the CLOCK_MONOTONIC_COARSE clock moved from being computed from
the CLOCK_REALTIME variable in the vvar page to being tracked by its own
vvar (mirroring a similar change done for x86): this vvar is maintained
in the same way, but is derived only once per jiffy tick rather than
every time clock_gettime() is called, which is likely faster under
sufficiently insane clock_gettime() than the way we did it in v3.0.

Unfortunately, the code to maintain this variable in
arch/sparc/kernel/vsyscall_gtod.c was never implemented, so
clock_gettime(CLOCK_MONOTONIC_COARSE) always returns zero. This is a
little coarser than the user would probably like.

Easily fixed by updating the relevant vvar in the same way as is done on
x86.

Reported-by: Wim Coekaerts <wim.coekaerts@oracle.com>
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Tested-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Orabug: 22137842

9 years agoMerge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Tue, 3 Nov 2015 21:15:03 +0000 (13:15 -0800)]
Merge branch 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/rpm-build' of git://ca-git.us.oracle.com/linux-uek:
  uek-rpm: builds: add dependency on latest linux-firmware package
  uek-rpm: build: Update the base release to 12 with stable v4.1.12

9 years agoMerge branch 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux...
Santosh Shilimkar [Tue, 3 Nov 2015 21:14:51 +0000 (13:14 -0800)]
Merge branch 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/stable-cherry-picks' of git://ca-git.us.oracle.com/linux-uek: (252 commits)
  Linux 4.1.12
  sched/preempt, powerpc, kvm: Use need_resched() instead of should_resched()
  sched/preempt, xen: Use need_resched() instead of should_resched()
  nfs4: have do_vfs_lock take an inode pointer
  locks: inline posix_lock_file_wait and flock_lock_file_wait
  locks: new helpers - flock_lock_inode_wait and posix_lock_inode_wait
  locks: have flock_lock_file take an inode pointer instead of a filp
  svcrdma: handle rdma read with a non-zero initial page offset
  arm64: Fix THP protection change logic
  pinctrl: imx25: ensure that a pin with id i is at position i in the info array
  sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()
  sched/preempt: Rename PREEMPT_CHECK_OFFSET to PREEMPT_DISABLE_OFFSET
  rbd: fix double free on rbd_dev->header_name
  dm thin: fix missing pool reference count decrement in pool_ctr error path
  drm/radeon: add pm sysfs files late
  drm/radeon: attach tile property to mst connector
  drm/dp/mst: make mst i2c transfer code more robust.
  drm/nouveau/fbcon: take runpm reference when userspace has an open fd
  workqueue: make sure delayed work run in local cpu
  i2c: designware-platdrv: enable RuntimePM before registering to the core
  ...

9 years agouek-rpm: builds: add dependency on latest linux-firmware package
Dan Duval [Fri, 23 Oct 2015 18:51:22 +0000 (14:51 -0400)]
uek-rpm: builds: add dependency on latest linux-firmware package

Orabug: 22084583

Signed-off-by: Dan Duval <dan.duval@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agouek-rpm: build: Update the base release to 12 with stable v4.1.12
Santosh Shilimkar [Tue, 4 Aug 2015 17:20:25 +0000 (10:20 -0700)]
uek-rpm: build: Update the base release to 12 with stable v4.1.12

Stable v4.1.12 is available so lets get that in. Update the
spec file accordingly.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoMerge tag 'v4.1.12' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Santosh Shilimkar [Sat, 31 Oct 2015 00:57:48 +0000 (17:57 -0700)]
Merge tag 'v4.1.12' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into topic/uek-4.1/stable-cherry-picks

9 years agoMerge tag 'v4.1.11' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Santosh Shilimkar [Sat, 31 Oct 2015 00:57:21 +0000 (17:57 -0700)]
Merge tag 'v4.1.11' of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into topic/uek-4.1/stable-cherry-picks

9 years agoMerge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 30 Oct 2015 16:25:14 +0000 (09:25 -0700)]
Merge branch 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/drivers' of git://ca-git.us.oracle.com/linux-uek:
  i40e: relax fw api minor version for fortville 4 nvm image

9 years agoMerge branch 'topic/uek-4.1/ocfs2' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Fri, 30 Oct 2015 16:25:07 +0000 (09:25 -0700)]
Merge branch 'topic/uek-4.1/ocfs2' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/ocfs2' of git://ca-git.us.oracle.com/linux-uek:
  Revert "ocfs2: change ip_unaligned_aio to of type mutex from atomit_t"
  ocfs2: fix a performance issue with synced buffer io

9 years agoMerge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Fri, 30 Oct 2015 16:25:00 +0000 (09:25 -0700)]
Merge branch 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/ofed' of git://ca-git.us.oracle.com/linux-uek:
  IB/mlx4: Use vmalloc for WR buffers when needed

9 years agoMerge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into...
Santosh Shilimkar [Fri, 30 Oct 2015 16:24:52 +0000 (09:24 -0700)]
Merge branch 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/uek-carry' of git://ca-git.us.oracle.com/linux-uek:
  crypto: testmgr - Disable fips-allowed for authenc() and des() ciphers

9 years agoMerge branch 'topic/uek-4.1/xen' of git://ca-git.us.oracle.com/linux-uek into uek...
Santosh Shilimkar [Fri, 30 Oct 2015 16:24:43 +0000 (09:24 -0700)]
Merge branch 'topic/uek-4.1/xen' of git://ca-git.us.oracle.com/linux-uek into uek/uek-4.1

* 'topic/uek-4.1/xen' of git://ca-git.us.oracle.com/linux-uek:
  xen-netfront: update num_queues to real created
  xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)

9 years agoIB/mlx4: Use vmalloc for WR buffers when needed
Wengang Wang [Thu, 29 Oct 2015 06:32:45 +0000 (14:32 +0800)]
IB/mlx4: Use vmalloc for WR buffers when needed

Orabug: 22025570

There are several hits that WR buffer allocation(kmalloc) failed.
It failed at order 3 and/or 4 contigous pages allocation. At the same time
there are actually 100MB+ free memory but well fragmented.
So try vmalloc when kmalloc failed.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
9 years agoi40e: relax fw api minor version for fortville 4 nvm image
Brian Maly [Wed, 21 Oct 2015 21:04:10 +0000 (17:04 -0400)]
i40e: relax fw api minor version for fortville 4 nvm image

Orabug: 22074738

Change I40E_FW_API_VERSION_MINOR to be consistent with 1.3.38
sourceforge driver. Currently i40e driver is reporting NVM
image is too old with the latest production image from 1.3.38.

Signed-off-by: Brian Maly <brian.maly@oracle.com>
9 years agocrypto: testmgr - Disable fips-allowed for authenc() and des() ciphers
John Haxby [Thu, 24 Sep 2015 17:24:35 +0000 (18:24 +0100)]
crypto: testmgr - Disable fips-allowed for authenc() and des() ciphers

No authenc() ciphers are FIPS approved, nor is ecb(des).
After the end of 2015, ansi_cprng will also be non-approved.

Signed-off-by: John Haxby <john.haxby@oracle.com>
Acked-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 284a0f6e87b0721e1be8bca419893902d9cf577a)
Orabug: 21863123
Signed-off-by: John Haxby <john.haxby@oracle.com>
9 years agoRevert "ocfs2: change ip_unaligned_aio to of type mutex from atomit_t"
Ryan Ding [Fri, 16 Oct 2015 08:26:40 +0000 (16:26 +0800)]
Revert "ocfs2: change ip_unaligned_aio to of type mutex from atomit_t"

This reverts commit c18ceab01240fd4c354b78d877571b729908e4a3.

Test shows ip_unaligned_aio will cost much cpu clock when doing aio+dio(in a
function named mutex_spin_on_owner), and will significant affect performance in
a system with poor cpu.

The cause is we should not call mutex_unlock(see the comments above
mutex_unlock) in ocfs2_dio_end_io, which will be in irq context when doing
aio+dio.

Revert the patch to use wait_event/wake_up_all to do the work.

Signed-off-by: Ryan Ding <ryan.ding@oracle.com>
Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com>
9 years agoocfs2: fix a performance issue with synced buffer io
Ryan Ding [Tue, 20 Oct 2015 08:47:33 +0000 (16:47 +0800)]
ocfs2: fix a performance issue with synced buffer io

orabug: 20396205

If we flush data with WB_SYNC_ALL which is set in struct writeback_control. It
will be transfered to a bio with WRITE_SYNC flag(that is done in the interface
block_write_full_page()). And after multi-queue is introduced to kernel block
layer, a bio with SYNC flag will be sent to disk without queue. It will affect
the performance significantly if the disk has a poor iops.

This patch is a work around to this. Use filemap_flush() to try to flush dirty
pages with WB_SYNC_NONE flag.
* In journal=order mode, this is safe because the following
  jbd2_journal_force_commit() will ensure data integrity.
* In journal=writeback mode, we will call filemap_write_and_wait_range() to
  meet the semantics of O_SYNC & O_DIRECT.

It should help to improve performance with direct io (in the case when direct
io fall to buffer io), and buffer io with O_SYNC.

Signed-off-by: Ryan Ding <ryan.ding@oracle.com>
Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com>
9 years agoxen-netfront: update num_queues to real created
Joe Jin [Mon, 19 Oct 2015 05:37:17 +0000 (13:37 +0800)]
xen-netfront: update num_queues to real created

Sometimes xennet_create_queues() may failed to created all requested
queues, we need to update num_queues to real created to avoid NULL
pointer dereference.

Orabug: 22069665

Signed-off-by: Joe Jin <joe.jin@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: David S. Miller <davem@davemloft.net>
9 years agoxen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)
Cathy Avery [Fri, 23 Oct 2015 10:12:46 +0000 (18:12 +0800)]
xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing)

Orabug: 21935345

xen-blkfront will crash if the check to talk_to_blkback()
in blkback_changed()(XenbusStateInitWait) returns an error.
The driver data is freed and info is set to NULL. Later during
the close process via talk_to_blkback's call to xenbus_dev_fatal()
the null pointer is passed to and dereference in blkfront_closing.

Signed-off-by: Cathy Avery <cathy.avery@oracle.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
9 years agoLinux 4.1.12 v4.1.12
Greg Kroah-Hartman [Tue, 27 Oct 2015 00:52:28 +0000 (09:52 +0900)]
Linux 4.1.12

9 years agosched/preempt, powerpc, kvm: Use need_resched() instead of should_resched()
Konstantin Khlebnikov [Wed, 15 Jul 2015 09:52:03 +0000 (12:52 +0300)]
sched/preempt, powerpc, kvm: Use need_resched() instead of should_resched()

commit c56dadf39761a6157239cac39e3988998c994f98 upstream.

Function should_resched() is equal to (!preempt_count() && need_resched()).
In preemptive kernel preempt_count here is non-zero because of vc->lock.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Graf <agraf@suse.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150715095203.12246.72922.stgit@buzz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agosched/preempt, xen: Use need_resched() instead of should_resched()
Konstantin Khlebnikov [Wed, 15 Jul 2015 09:52:01 +0000 (12:52 +0300)]
sched/preempt, xen: Use need_resched() instead of should_resched()

commit 0fa2f5cb2b0ecd8d56baa51f35f09aab234eb0bf upstream.

This code is used only when CONFIG_PREEMPT=n and only in non-atomic context:
xen_in_preemptible_hcall is set only in privcmd_ioctl_hypercall().
Thus preempt_count is zero and should_resched() is equal to need_resched().

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Graf <agraf@suse.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20150715095201.12246.49283.stgit@buzz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agonfs4: have do_vfs_lock take an inode pointer
Jeff Layton [Sat, 11 Jul 2015 10:43:03 +0000 (06:43 -0400)]
nfs4: have do_vfs_lock take an inode pointer

commit 83bfff23e9ed19f37c4ef0bba84e75bd88e5cf21 upstream.

Now that we have file locking helpers that can deal with an inode
instead of a filp, we can change the NFSv4 locking code to use that
instead.

This should fix the case where we have a filp that is closed while flock
or OFD locks are set on it, and the task is signaled so that it doesn't
wait for the LOCKU reply to come in before the filp is freed. At that
point we can end up with a use-after-free with the current code, which
relies on dereferencing the fl_file in the lock request.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Reviewed-by: "J. Bruce Fields" <bfields@fieldses.org>
Tested-by: "J. Bruce Fields" <bfields@fieldses.org>
Cc: William Dauchy <william@gandi.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agolocks: inline posix_lock_file_wait and flock_lock_file_wait
Jeff Layton [Sat, 11 Jul 2015 10:43:03 +0000 (06:43 -0400)]
locks: inline posix_lock_file_wait and flock_lock_file_wait

commit ee296d7c5709440f8abd36b5b65c6b3e388538d9 upstream.

They just call file_inode and then the corresponding *_inode_file_wait
function. Just make them static inlines instead.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Cc: William Dauchy <william@gandi.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agolocks: new helpers - flock_lock_inode_wait and posix_lock_inode_wait
Jeff Layton [Sat, 11 Jul 2015 10:43:02 +0000 (06:43 -0400)]
locks: new helpers - flock_lock_inode_wait and posix_lock_inode_wait

commit 29d01b22eaa18d8b46091d3c98c6001c49f78e4a upstream.

Allow callers to pass in an inode instead of a filp.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Reviewed-by: "J. Bruce Fields" <bfields@fieldses.org>
Tested-by: "J. Bruce Fields" <bfields@fieldses.org>
Cc: William Dauchy <william@gandi.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agolocks: have flock_lock_file take an inode pointer instead of a filp
Jeff Layton [Sat, 11 Jul 2015 10:43:02 +0000 (06:43 -0400)]
locks: have flock_lock_file take an inode pointer instead of a filp

commit bcd7f78d078ff6197715c1ed070c92aca57ec12c upstream.

...and rename it to better describe how it works.

In order to fix a use-after-free in NFS, we need to be able to remove
locks from an inode after the filp associated with them may have already
been freed. flock_lock_file already only dereferences the filp to get to
the inode, so just change it so the callers do that.

All of the callers already pass in a lock request that has the fl_file
set properly, so we don't need to pass it in individually. With that
change it now only dereferences the filp to get to the inode, so just
push that out to the callers.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Reviewed-by: "J. Bruce Fields" <bfields@fieldses.org>
Tested-by: "J. Bruce Fields" <bfields@fieldses.org>
Cc: William Dauchy <william@gandi.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agosvcrdma: handle rdma read with a non-zero initial page offset
Steve Wise [Mon, 28 Sep 2015 21:46:06 +0000 (16:46 -0500)]
svcrdma: handle rdma read with a non-zero initial page offset

commit c91aed9896946721bb30705ea2904edb3725dd61 upstream.

The server rdma_read_chunk_lcl() and rdma_read_chunk_frmr() functions
were not taking into account the initial page_offset when determining
the rdma read length.  This resulted in a read who's starting address
and length exceeded the base/bounds of the frmr.

The server gets an async error from the rdma device and kills the
connection, and the client then reconnects and resends.  This repeats
indefinitely, and the application hangs.

Most work loads don't tickle this bug apparently, but one test hit it
every time: building the linux kernel on a 16 core node with 'make -j
16 O=/mnt/0' where /mnt/0 is a ramdisk mounted via NFSRDMA.

This bug seems to only be tripped with devices having small fastreg page
list depths.  I didn't see it with mlx4, for instance.

Fixes: 0bf4828983df ('svcrdma: refactor marshalling logic')
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Tested-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoarm64: Fix THP protection change logic
Steve Capper [Thu, 1 Oct 2015 12:06:07 +0000 (13:06 +0100)]
arm64: Fix THP protection change logic

commit 1a541b4e3cd6f5795022514114854b3e1345f24e upstream.

6910fa1 ("arm64: enable PTE type bit in the mask for pte_modify") fixes
a problem whereby a large block of PROT_NONE mapped memory is
incorrectly mapped as block descriptors when mprotect is called.

Unfortunately, a subtle bug was introduced by this fix to the THP logic.

If one mmaps a large block of memory, then faults it such that it is
collapsed into THPs; resulting calls to mprotect on this area of memory
will lead to incorrect table descriptors being written instead of block
descriptors. This is because pmd_modify calls pte_modify which is now
allowed to modify the type of the page table entry.

This patch reverts commit 6910fa16dbe142f6a0fd0fd7c249f9883ff7fc8a, and
fixes the problem it was trying to address by adjusting PAGE_NONE to
represent a table entry. Thus no change in pte type is required when
moving from PROT_NONE to a different protection.

Fixes: 6910fa16dbe1 ("arm64: enable PTE type bit in the mask for pte_modify")
Cc: <stable@vger.kernel.org> # 4.0+
Cc: Feng Kan <fkan@apm.com>
Reported-by: Ganapatrao Kulkarni <Ganapatrao.Kulkarni@caviumnetworks.com>
Tested-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[SteveC: backported 1a541b4e3cd6f5795022514114854b3e1345f24e to 4.1 and
 4.2 stable. Just one minor fix to second part to allow patch to apply
cleanly, no logic changed.]
Signed-off-by: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agopinctrl: imx25: ensure that a pin with id i is at position i in the info array
Uwe Kleine-König [Wed, 23 Sep 2015 14:35:09 +0000 (16:35 +0200)]
pinctrl: imx25: ensure that a pin with id i is at position i in the info array

commit 9911a2d5e9d14e39692b751929a92cb5a1d9d0e0 upstream.

The code in pinctrl-imx.c only works correctly if in the
imx_pinctrl_soc_info passed to imx_pinctrl_probe we have:

info->pins[i].number = i
conf_reg(info->pins[i]) = 4 * i

(which conf_reg(pin) being the offset of the pin's configuration
register).

When the imx25 specific part was introduced in b4a87c9b966f ("pinctrl:
pinctrl-imx: add imx25 pinctrl driver") we had:

info->pins[i].number = i + 1
conf_reg(info->pins[i]) = 4 * i

. Commit 34027ca2bbc6 ("pinctrl: imx25: fix numbering for pins") tried
to fix that but made the situation:

info->pins[i-1].number = i
conf_reg(info->pins[i-1]) = 4 * i

which is hardly better but fixed the error seen back then.

So insert another reserved entry in the array to finally yield:

info->pins[i].number = i
conf_reg(info->pins[i]) = 4 * i

Fixes: 34027ca2bbc6 ("pinctrl: imx25: fix numbering for pins")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agosched/preempt: Fix cond_resched_lock() and cond_resched_softirq()
Konstantin Khlebnikov [Wed, 15 Jul 2015 09:52:04 +0000 (12:52 +0300)]
sched/preempt: Fix cond_resched_lock() and cond_resched_softirq()

commit fe32d3cd5e8eb0f82e459763374aa80797023403 upstream.

These functions check should_resched() before unlocking spinlock/bh-enable:
preempt_count always non-zero => should_resched() always returns false.
cond_resched_lock() worked iff spin_needbreak is set.

This patch adds argument "preempt_offset" to should_resched().

preempt_count offset constants for that:

  PREEMPT_DISABLE_OFFSET  - offset after preempt_disable()
  PREEMPT_LOCK_OFFSET     - offset after spin_lock()
  SOFTIRQ_DISABLE_OFFSET  - offset after local_bh_distable()
  SOFTIRQ_LOCK_OFFSET     - offset after spin_lock_bh()

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Graf <agraf@suse.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: bdb438065890 ("sched: Extract the basic add/sub preempt_count modifiers")
Link: http://lkml.kernel.org/r/20150715095204.12246.98268.stgit@buzz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agosched/preempt: Rename PREEMPT_CHECK_OFFSET to PREEMPT_DISABLE_OFFSET
Frederic Weisbecker [Tue, 12 May 2015 14:41:48 +0000 (16:41 +0200)]
sched/preempt: Rename PREEMPT_CHECK_OFFSET to PREEMPT_DISABLE_OFFSET

commit 90b62b5129d5cb50f62f40e684de7a1961e57197 upstream.

"CHECK" suggests it's only used as a comparison mask. But now it's used
further as a config-conditional preempt disabler offset. Lets
disambiguate this name.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1431441711-29753-4-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agorbd: fix double free on rbd_dev->header_name
Ilya Dryomov [Mon, 31 Aug 2015 12:21:39 +0000 (15:21 +0300)]
rbd: fix double free on rbd_dev->header_name

commit 3ebe138ac642a195c7f2efdb918f464734421fd6 upstream.

If rbd_dev_image_probe() in rbd_dev_probe_parent() fails, header_name
is freed twice: once in rbd_dev_probe_parent() and then in its caller
rbd_dev_image_probe() (rbd_dev_image_probe() is called recursively to
handle parent images).

rbd_dev_probe_parent() is responsible for probing the parent, so it
shouldn't muck with clone's fields.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodm thin: fix missing pool reference count decrement in pool_ctr error path
Mike Snitzer [Tue, 13 Oct 2015 16:04:28 +0000 (12:04 -0400)]
dm thin: fix missing pool reference count decrement in pool_ctr error path

commit ba30670f4d5292c4e7f7980bbd5071f7c4794cdd upstream.

Fixes: ac8c3f3df ("dm thin: generate event when metadata threshold passed")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrm/radeon: add pm sysfs files late
Alex Deucher [Wed, 30 Sep 2015 20:45:52 +0000 (16:45 -0400)]
drm/radeon: add pm sysfs files late

commit 51a4726b04e880fdd9b4e0e58b13f70b0a68a7f5 upstream.

They were added relatively early in the driver init process
which meant that in some cases the driver was not finished
initializing before external tools tried to use them which
could result in a crash depending on the timing.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrm/radeon: attach tile property to mst connector
Dave Airlie [Wed, 14 Oct 2015 23:04:21 +0000 (09:04 +1000)]
drm/radeon: attach tile property to mst connector

commit bc8c131ccdd62d4ed4f33c6b50f92907e7c32dee upstream.

This allows tiled monitors to work with radeon once mst is enabled.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrm/dp/mst: make mst i2c transfer code more robust.
Dave Airlie [Wed, 14 Oct 2015 08:51:17 +0000 (18:51 +1000)]
drm/dp/mst: make mst i2c transfer code more robust.

commit ae491542cbbbcca0ec8938c37d4079a985e58440 upstream.

This zeroes the msg so no random stack data ends up getting
sent, it also limits the function to not accepting > 4
i2c msgs.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrm/nouveau/fbcon: take runpm reference when userspace has an open fd
Ben Skeggs [Fri, 2 Oct 2015 04:03:19 +0000 (14:03 +1000)]
drm/nouveau/fbcon: take runpm reference when userspace has an open fd

commit f231976c2e8964ceaa9250e57d27c35ff03825c2 upstream.

We need to do this in order to prevent accesses to the device while it's
powered down.  Userspace may have an mmap of the fb, and there's no good
way (that I know of) to prevent it from touching the device otherwise.

This fixes some nasty races between runpm and plymouth on some systems,
which result in the GPU getting very upset and hanging the boot.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoworkqueue: make sure delayed work run in local cpu
Shaohua Li [Wed, 30 Sep 2015 16:05:30 +0000 (09:05 -0700)]
workqueue: make sure delayed work run in local cpu

commit 874bbfe600a660cba9c776b3957b1ce393151b76 upstream.

My system keeps crashing with below message. vmstat_update() schedules a delayed
work in current cpu and expects the work runs in the cpu.
schedule_delayed_work() is expected to make delayed work run in local cpu. The
problem is timer can be migrated with NO_HZ. __queue_work() queues work in
timer handler, which could run in a different cpu other than where the delayed
work is scheduled. The end result is the delayed work runs in different cpu.
The patch makes __queue_delayed_work records local cpu earlier. Where the timer
runs doesn't change where the work runs with the change.

[   28.010131] ------------[ cut here ]------------
[   28.010609] kernel BUG at ../mm/vmstat.c:1392!
[   28.011099] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN
[   28.011860] Modules linked in:
[   28.012245] CPU: 0 PID: 289 Comm: kworker/0:3 Tainted: G        W4.3.0-rc3+ #634
[   28.013065] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140709_153802- 04/01/2014
[   28.014160] Workqueue: events vmstat_update
[   28.014571] task: ffff880117682580 ti: ffff8800ba428000 task.ti: ffff8800ba428000
[   28.015445] RIP: 0010:[<ffffffff8115f921>]  [<ffffffff8115f921>]vmstat_update+0x31/0x80
[   28.016282] RSP: 0018:ffff8800ba42fd80  EFLAGS: 00010297
[   28.016812] RAX: 0000000000000000 RBX: ffff88011a858dc0 RCX:0000000000000000
[   28.017585] RDX: ffff880117682580 RSI: ffffffff81f14d8c RDI:ffffffff81f4df8d
[   28.018366] RBP: ffff8800ba42fd90 R08: 0000000000000001 R09:0000000000000000
[   28.019169] R10: 0000000000000000 R11: 0000000000000121 R12:ffff8800baa9f640
[   28.019947] R13: ffff88011a81e340 R14: ffff88011a823700 R15:0000000000000000
[   28.020071] FS:  0000000000000000(0000) GS:ffff88011a800000(0000)knlGS:0000000000000000
[   28.020071] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[   28.020071] CR2: 00007ff6144b01d0 CR3: 00000000b8e93000 CR4:00000000000006f0
[   28.020071] Stack:
[   28.020071]  ffff88011a858dc0 ffff8800baa9f640 ffff8800ba42fe00ffffffff8106bd88
[   28.020071]  ffffffff8106bd0b 0000000000000096 0000000000000000ffffffff82f9b1e8
[   28.020071]  ffffffff829f0b10 0000000000000000 ffffffff81f18460ffff88011a81e340
[   28.020071] Call Trace:
[   28.020071]  [<ffffffff8106bd88>] process_one_work+0x1c8/0x540
[   28.020071]  [<ffffffff8106bd0b>] ? process_one_work+0x14b/0x540
[   28.020071]  [<ffffffff8106c214>] worker_thread+0x114/0x460
[   28.020071]  [<ffffffff8106c100>] ? process_one_work+0x540/0x540
[   28.020071]  [<ffffffff81071bf8>] kthread+0xf8/0x110
[   28.020071]  [<ffffffff81071b00>] ?kthread_create_on_node+0x200/0x200
[   28.020071]  [<ffffffff81a6522f>] ret_from_fork+0x3f/0x70
[   28.020071]  [<ffffffff81071b00>] ?kthread_create_on_node+0x200/0x200

Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoi2c: designware-platdrv: enable RuntimePM before registering to the core
Wolfram Sang [Fri, 9 Oct 2015 09:39:24 +0000 (10:39 +0100)]
i2c: designware-platdrv: enable RuntimePM before registering to the core

commit 36d48fb5766aee9717e429f772046696b215282d upstream.

The core may register clients attached to this master which may use
funtionality from the master. So, RuntimePM must be enabled before, otherwise
this will fail.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoi2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348
Mika Westerberg [Thu, 24 Sep 2015 09:06:54 +0000 (12:06 +0300)]
i2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348

commit 56d4b8a24cef5d66f0d10ac778a520d3c2c68a48 upstream.

ACPI SSCN/FMCN methods were originally added because then the platform can
provide the most accurate HCNT/LCNT values to the driver. However, this
seems not to be true for Dell Inspiron 7348 where using these causes the
touchpad to fail in boot:

  i2c_hid i2c-DLL0675:00: failed to retrieve report from device.
  i2c_designware INT3433:00: i2c_dw_handle_tx_abort: lost arbitration
  i2c_hid i2c-DLL0675:00: failed to retrieve report from device.
  i2c_designware INT3433:00: controller timed out

The values received from ACPI are (in fast mode):

  HCNT: 72
  LCNT: 160

this translates to following timings (input clock is 100MHz on Broadwell):

  tHIGH: 720 ns (spec min 600 ns)
  tLOW: 1600 ns (spec min 1300 ns)
  Bus period: 2920 ns (assuming 300 ns tf and tr)
  Bus speed: 342.5 kHz

Both tHIGH and tLOW are within the I2C specification.

The calculated values when ACPI parameters are not used are (in fast mode):

  HCNT: 87
  LCNT: 159

which translates to:

  tHIGH: 870 ns (spec min 600 ns)
  tLOW: 1590 ns (spec min 1300 ns)
  Bus period 3060 ns (assuming 300 ns tf and tr)
  Bus speed 326.8 kHz

These values are also within the I2C specification.

Since both ACPI and calculated values meet the I2C specification timing
requirements it is hard to say why the touchpad does not function properly
with the ACPI values except that the bus speed is higher in this case (but
still well below the max 400kHz).

Solve this by adding DMI quirk to the driver that disables using ACPI
parameters on this particulare machine.

Reported-by: Pavel Roskin <plroskin@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Pavel Roskin <plroskin@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>