This is the start of the stable review cycle for the 4.9.118 release.
There are 32 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Mon Aug 6 08:26:35 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.118-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.9.118-rc1
Tony Battersby <tonyb(a)cybernetics.com>
scsi: sg: fix minor memory leak in error path
Boris Brezillon <boris.brezillon(a)bootlin.com>
drm/vc4: Reset ->{x, y}_scaling[1] when dealing with uniplanar formats
Herbert Xu <herbert(a)gondor.apana.org.au>
crypto: padlock-aes - Fix Nano workaround data corruption
Roman Kagan <rkagan(a)virtuozzo.com>
kvm: x86: vmx: fix vpid leak
Jiang Biao <jiang.biao2(a)zte.com.cn>
virtio_balloon: fix another race between migration and ballooning
Jeremy Cline <jcline(a)redhat.com>
net: socket: fix potential spectre v1 gadget in socketcall
Anton Vasilyev <vasilyev(a)ispras.ru>
can: ems_usb: Fix memory leak on ems_usb_disconnect()
Linus Torvalds <torvalds(a)linux-foundation.org>
squashfs: more metadata hardenings
Linus Torvalds <torvalds(a)linux-foundation.org>
squashfs: more metadata hardening
Jose Abreu <Jose.Abreu(a)synopsys.com>
net: stmmac: Fix WoL for PCI-based setups
Jeremy Cline <jcline(a)redhat.com>
netlink: Fix spectre v1 gadget in netlink_create()
Florian Fainelli <f.fainelli(a)gmail.com>
net: dsa: Do not suspend/resume closed slave_dev
Eric Dumazet <edumazet(a)google.com>
ipv4: frags: handle possible skb truesize change
Eric Dumazet <edumazet(a)google.com>
inet: frag: enforce memory limits earlier
Eric Dumazet <edumazet(a)google.com>
bonding: avoid lockdep confusion in bond_get_stats()
Boqun Feng <boqun.feng(a)gmail.com>
sched/wait: Remove the lockless swait_active() check in swake_up*()
Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
pinctrl: intel: Read back TX buffer state
Eric Dumazet <edumazet(a)google.com>
tcp: add one more quick ack after after ECN events
Yousuk Seung <ysseung(a)google.com>
tcp: refactor tcp_ecn_check_ce to remove sk type cast
Eric Dumazet <edumazet(a)google.com>
tcp: do not aggressively quick ack after ECN events
Eric Dumazet <edumazet(a)google.com>
tcp: add max_quickacks param to tcp_incr_quickack and tcp_enter_quickack_mode
Eric Dumazet <edumazet(a)google.com>
tcp: do not force quickack when receiving out-of-order packets
Dmitry Safonov <dima(a)arista.com>
netlink: Don't shift with UB on nlk->ngroups
Dmitry Safonov <dima(a)arista.com>
netlink: Do not subscribe to non-existent groups
Xiao Liang <xiliang(a)redhat.com>
xen-netfront: wait xenbus state change when load module manually
Neal Cardwell <ncardwell(a)google.com>
tcp_bbr: fix bw probing to raise in-flight data for very small BDPs
Eugeniy Paltsev <Eugeniy.Paltsev(a)synopsys.com>
NET: stmmac: align DMA stuff to largest cache line length
Anton Vasilyev <vasilyev(a)ispras.ru>
net: mdio-mux: bcm-iproc: fix wrong getter and setter pair
Stefan Wahren <stefan.wahren(a)i2se.com>
net: lan78xx: fix rx handling before first packet is send
tangpengpeng <tangpengpeng(a)higon.com>
net: fix amd-xgbe flow-control issue
Gal Pressman <pressmangal(a)gmail.com>
net: ena: Fix use of uninitialized DMA address bits field
Lorenzo Bianconi <lorenzo.bianconi(a)redhat.com>
ipv4: remove BUG_ON() from fib_compute_spec_dst
-------------
Diffstat:
Makefile | 4 +-
arch/x86/kvm/vmx.c | 7 ++--
drivers/crypto/padlock-aes.c | 8 +++-
drivers/gpu/drm/vc4/vc4_plane.c | 3 ++
drivers/net/bonding/bond_main.c | 14 ++++++-
drivers/net/can/usb/ems_usb.c | 1 +
drivers/net/ethernet/amazon/ena/ena_com.c | 1 +
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 40 ++++++++++++++++++-
drivers/net/phy/mdio-mux-bcm-iproc.c | 2 +-
drivers/net/usb/lan78xx.c | 2 +
drivers/net/xen-netfront.c | 6 +++
drivers/pinctrl/intel/pinctrl-intel.c | 7 +++-
drivers/scsi/sg.c | 1 +
drivers/virtio/virtio_balloon.c | 2 +
fs/squashfs/block.c | 2 +
fs/squashfs/fragment.c | 13 ++++--
fs/squashfs/squashfs_fs_sb.h | 1 +
fs/squashfs/super.c | 5 ++-
include/net/tcp.h | 2 +-
kernel/sched/swait.c | 6 ---
net/dsa/slave.c | 6 +++
net/ipv4/fib_frontend.c | 4 +-
net/ipv4/inet_fragment.c | 10 ++---
net/ipv4/ip_fragment.c | 5 +++
net/ipv4/tcp_bbr.c | 4 ++
net/ipv4/tcp_dctcp.c | 4 +-
net/ipv4/tcp_input.c | 48 ++++++++++++-----------
net/netlink/af_netlink.c | 7 ++++
net/socket.c | 2 +
31 files changed, 161 insertions(+), 62 deletions(-)
This is the start of the stable review cycle for the 4.14.61 release.
There are 23 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Mon Aug 6 08:26:30 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.61-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.61-rc1
Tony Battersby <tonyb(a)cybernetics.com>
scsi: sg: fix minor memory leak in error path
Boris Brezillon <boris.brezillon(a)bootlin.com>
drm/vc4: Reset ->{x, y}_scaling[1] when dealing with uniplanar formats
Herbert Xu <herbert(a)gondor.apana.org.au>
crypto: padlock-aes - Fix Nano workaround data corruption
Jack Morgenstein <jackm(a)dev.mellanox.co.il>
RDMA/uverbs: Expand primary and alt AV port checks
Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
iwlwifi: add more card IDs for 9000 series
Mike Rapoport <rppt(a)linux.vnet.ibm.com>
userfaultfd: remove uffd flags from vma->vm_flags if UFFD_EVENT_FORK fails
Yi Wang <wang.yi59(a)zte.com.cn>
audit: fix potential null dereference 'context->module.name'
Roman Kagan <rkagan(a)virtuozzo.com>
kvm: x86: vmx: fix vpid leak
Andy Lutomirski <luto(a)kernel.org>
x86/entry/64: Remove %ebx handling from error_entry/exit
Len Brown <len.brown(a)intel.com>
x86/apic: Future-proof the TSC_DEADLINE quirk for SKX
Jiang Biao <jiang.biao2(a)zte.com.cn>
virtio_balloon: fix another race between migration and ballooning
Jeremy Cline <jcline(a)redhat.com>
net: socket: fix potential spectre v1 gadget in socketcall
Anton Vasilyev <vasilyev(a)ispras.ru>
can: ems_usb: Fix memory leak on ems_usb_disconnect()
Linus Torvalds <torvalds(a)linux-foundation.org>
squashfs: more metadata hardenings
Linus Torvalds <torvalds(a)linux-foundation.org>
squashfs: more metadata hardening
Eli Cohen <eli(a)mellanox.com>
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
YueHaibing <yuehaibing(a)huawei.com>
rxrpc: Fix user call ID check in rxrpc_service_prealloc_one
Jose Abreu <Jose.Abreu(a)synopsys.com>
net: stmmac: Fix WoL for PCI-based setups
Jeremy Cline <jcline(a)redhat.com>
netlink: Fix spectre v1 gadget in netlink_create()
Florian Fainelli <f.fainelli(a)gmail.com>
net: dsa: Do not suspend/resume closed slave_dev
Eric Dumazet <edumazet(a)google.com>
ipv4: frags: handle possible skb truesize change
Eric Dumazet <edumazet(a)google.com>
inet: frag: enforce memory limits earlier
Eric Dumazet <edumazet(a)google.com>
bonding: avoid lockdep confusion in bond_get_stats()
-------------
Diffstat:
Makefile | 4 +-
arch/x86/entry/entry_64.S | 18 ++----
arch/x86/kernel/apic/apic.c | 3 +
arch/x86/kvm/vmx.c | 7 +--
drivers/crypto/padlock-aes.c | 8 ++-
drivers/gpu/drm/vc4/vc4_plane.c | 3 +
drivers/infiniband/core/uverbs_cmd.c | 59 +++++++++++++++++--
drivers/net/bonding/bond_main.c | 14 ++++-
drivers/net/can/usb/ems_usb.c | 1 +
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 40 ++++++++++++-
drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 69 +++++++++++++++++++++++
drivers/net/wireless/intel/iwlwifi/iwl-config.h | 5 ++
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 22 ++++++++
drivers/scsi/sg.c | 1 +
drivers/virtio/virtio_balloon.c | 2 +
fs/squashfs/block.c | 2 +
fs/squashfs/fragment.c | 13 +++--
fs/squashfs/squashfs_fs_sb.h | 1 +
fs/squashfs/super.c | 5 +-
fs/userfaultfd.c | 4 +-
kernel/auditsc.c | 13 +++--
net/dsa/slave.c | 6 ++
net/ipv4/inet_fragment.c | 10 ++--
net/ipv4/ip_fragment.c | 5 ++
net/netlink/af_netlink.c | 2 +
net/rxrpc/call_accept.c | 4 +-
net/socket.c | 2 +
28 files changed, 276 insertions(+), 51 deletions(-)
This is the start of the stable review cycle for the 4.17.13 release.
There are 31 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Mon Aug 6 08:26:21 UTC 2018.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.17.13-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.17.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.17.13-rc1
Tony Battersby <tonyb(a)cybernetics.com>
scsi: sg: fix minor memory leak in error path
Boris Brezillon <boris.brezillon(a)bootlin.com>
drm/atomic: Initialize variables in drm_atomic_helper_async_check() to make gcc happy
Boris Brezillon <boris.brezillon(a)bootlin.com>
drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check()
Boris Brezillon <boris.brezillon(a)bootlin.com>
drm/vc4: Reset ->{x, y}_scaling[1] when dealing with uniplanar formats
Herbert Xu <herbert(a)gondor.apana.org.au>
crypto: padlock-aes - Fix Nano workaround data corruption
Jack Morgenstein <jackm(a)dev.mellanox.co.il>
RDMA/uverbs: Expand primary and alt AV port checks
Rafał Miłecki <rafal(a)milecki.pl>
brcmfmac: fix regression in parsing NVRAM for multiple devices
Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
iwlwifi: add more card IDs for 9000 series
Mike Rapoport <rppt(a)linux.vnet.ibm.com>
userfaultfd: remove uffd flags from vma->vm_flags if UFFD_EVENT_FORK fails
Jane Chu <jane.chu(a)oracle.com>
ipc/shm.c add ->pagesize function to shm_vm_ops
Yi Wang <wang.yi59(a)zte.com.cn>
audit: fix potential null dereference 'context->module.name'
Roman Kagan <rkagan(a)virtuozzo.com>
kvm: x86: vmx: fix vpid leak
Andy Lutomirski <luto(a)kernel.org>
x86/entry/64: Remove %ebx handling from error_entry/exit
Len Brown <len.brown(a)intel.com>
x86/apic: Future-proof the TSC_DEADLINE quirk for SKX
Brijesh Singh <brijesh.singh(a)amd.com>
x86/efi: Access EFI MMIO data as unencrypted when SEV is active
Jiang Biao <jiang.biao2(a)zte.com.cn>
virtio_balloon: fix another race between migration and ballooning
Jeremy Cline <jcline(a)redhat.com>
net: socket: Fix potential spectre v1 gadget in sock_is_registered
Jeremy Cline <jcline(a)redhat.com>
net: socket: fix potential spectre v1 gadget in socketcall
Anton Vasilyev <vasilyev(a)ispras.ru>
can: ems_usb: Fix memory leak on ems_usb_disconnect()
Linus Torvalds <torvalds(a)linux-foundation.org>
squashfs: more metadata hardenings
Linus Torvalds <torvalds(a)linux-foundation.org>
squashfs: more metadata hardening
Feras Daoud <ferasda(a)mellanox.com>
net/mlx5e: IPoIB, Set the netdevice sw mtu in ipoib enhanced flow
Or Gerlitz <ogerlitz(a)mellanox.com>
net/mlx5e: Set port trust mode to PCP as default
Eli Cohen <eli(a)mellanox.com>
net/mlx5e: E-Switch, Initialize eswitch only if eswitch manager
YueHaibing <yuehaibing(a)huawei.com>
rxrpc: Fix user call ID check in rxrpc_service_prealloc_one
Jose Abreu <Jose.Abreu(a)synopsys.com>
net: stmmac: Fix WoL for PCI-based setups
Jeremy Cline <jcline(a)redhat.com>
netlink: Fix spectre v1 gadget in netlink_create()
Florian Fainelli <f.fainelli(a)gmail.com>
net: dsa: Do not suspend/resume closed slave_dev
Eric Dumazet <edumazet(a)google.com>
ipv4: frags: handle possible skb truesize change
Eric Dumazet <edumazet(a)google.com>
inet: frag: enforce memory limits earlier
Eric Dumazet <edumazet(a)google.com>
bonding: avoid lockdep confusion in bond_get_stats()
-------------
Diffstat:
Makefile | 4 +-
arch/x86/entry/entry_64.S | 18 ++----
arch/x86/kernel/apic/apic.c | 3 +
arch/x86/kvm/vmx.c | 7 +--
arch/x86/platform/efi/efi_64.c | 2 +-
drivers/crypto/padlock-aes.c | 8 ++-
drivers/gpu/drm/drm_atomic_helper.c | 8 ++-
drivers/gpu/drm/vc4/vc4_plane.c | 3 +
drivers/infiniband/core/uverbs_cmd.c | 59 ++++++++++++++++--
drivers/net/bonding/bond_main.c | 14 ++++-
drivers/net/can/usb/ems_usb.c | 1 +
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 2 +
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 4 +-
.../net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 4 ++
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 40 ++++++++++++-
.../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 3 +-
drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 69 ++++++++++++++++++++++
drivers/net/wireless/intel/iwlwifi/iwl-config.h | 5 ++
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 22 +++++++
drivers/scsi/sg.c | 1 +
drivers/virtio/virtio_balloon.c | 2 +
fs/squashfs/block.c | 2 +
fs/squashfs/fragment.c | 13 ++--
fs/squashfs/squashfs_fs_sb.h | 1 +
fs/squashfs/super.c | 5 +-
fs/userfaultfd.c | 4 +-
ipc/shm.c | 12 ++++
kernel/auditsc.c | 13 ++--
mm/hugetlb.c | 7 +++
net/dsa/slave.c | 6 ++
net/ipv4/inet_fragment.c | 6 +-
net/ipv4/ip_fragment.c | 5 ++
net/netlink/af_netlink.c | 2 +
net/rxrpc/call_accept.c | 4 +-
net/socket.c | 5 +-
35 files changed, 309 insertions(+), 55 deletions(-)
It's legal to have 64 groups for netlink_sock.
As user-supplied nladdr->nl_groups is __u32, it's possible to subscribe
only to first 32 groups.
The check for correctness of .bind() userspace supplied parameter
is done by applying mask made from ngroups shift. Which broke Android
as they have 64 groups and the shift for mask resulted in an overflow.
Fixes: 61f4b23769f0 ("netlink: Don't shift with UB on nlk->ngroups")
Cc: "David S. Miller" <davem(a)davemloft.net>
Cc: Herbert Xu <herbert(a)gondor.apana.org.au>
Cc: Steffen Klassert <steffen.klassert(a)secunet.com>
Cc: netdev(a)vger.kernel.org
Cc: stable(a)vger.kernel.org
Reported-and-Tested-by: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Dmitry Safonov <dima(a)arista.com>
---
v2:
sizeof() is in bytes
net/netlink/af_netlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7d860a22e5fb..d6ff4d409437 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1011,8 +1011,8 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
if (nlk->ngroups == 0)
groups = 0;
- else
- groups &= (1ULL << nlk->ngroups) - 1;
+ else if (nlk->ngroups < 8*sizeof(groups))
+ groups &= (1UL << nlk->ngroups) - 1;
bound = nlk->bound;
if (bound) {
--
2.13.6
It's legal to have 64 groups for netlink_sock.
As user-supplied nladdr->nl_groups is __u32, it's possible to subscribe
only to first 32 groups.
The check for correctness of .bind() userspace supplied parameter
is done by applying mask made from ngroups shift. Which broke Android
as they have 64 groups and the shift for mask resulted in an overflow.
Fixes: 61f4b23769f0 ("netlink: Don't shift with UB on nlk->ngroups")
Cc: "David S. Miller" <davem(a)davemloft.net>
Cc: Herbert Xu <herbert(a)gondor.apana.org.au>
Cc: Steffen Klassert <steffen.klassert(a)secunet.com>
Cc: netdev(a)vger.kernel.org
Cc: stable(a)vger.kernel.org
Reported-and-Tested-by: Nathan Chancellor <natechancellor(a)gmail.com>
Signed-off-by: Dmitry Safonov <dima(a)arista.com>
---
net/netlink/af_netlink.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7d860a22e5fb..e44edadfad20 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1011,8 +1011,8 @@ static int netlink_bind(struct socket *sock, struct sockaddr *addr,
if (nlk->ngroups == 0)
groups = 0;
- else
- groups &= (1ULL << nlk->ngroups) - 1;
+ else if (nlk->ngroups < sizeof(long unsigned int))
+ groups &= (1UL << nlk->ngroups) - 1;
bound = nlk->bound;
if (bound) {
--
2.13.6
Dear Prospective Client,
We provide funding for up to 500 Million USD. Loans are available
at 3% interest
rate with re-payment period of 1 year to 30 years. We provide:-
*Business Loans
*Project Loans
*Personal Loans
*Home Loans e.t.c
If interested, please provide the information below:-
Name:
Amount Needed:
Duration:
Loan Type(e.g Business, Project or Personal):
Country of residence:
The above information would help us determine the best way to
assist you.
Regards
Sanwomi Brad
Hi,
Please pull this usercopy fix for v4.18-rc8. Bart Massey discovered that
the usercopy whitelist for JFS was incomplete: the inline inode data may
intentionally "overflow" into the neighboring "extended area", so the
size of the whitelist needed to be raised to include the neighboring
field.
Thanks!
-Kees
The following changes since commit 7daf201d7fe8334e2d2364d4e8ed3394ec9af819:
Linux 4.18-rc2 (2018-06-24 20:54:29 +0800)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/usercopy-fix-v4.18-rc8
for you to fetch changes up to 961b33c244e5ba1543ae26270a1ba29f29c2db83:
jfs: Fix usercopy whitelist for inline inode data (2018-08-04 07:53:46 -0700)
----------------------------------------------------------------
- Fix JFS usercopy whitelist (it needed to cover neighboring field too) for
"overflow" inline inode data.
----------------------------------------------------------------
Kees Cook (1):
jfs: Fix usercopy whitelist for inline inode data
fs/jfs/jfs_dinode.h | 7 +++++++
fs/jfs/jfs_incore.h | 1 +
fs/jfs/super.c | 3 +--
3 files changed, 9 insertions(+), 2 deletions(-)
--
Kees Cook
Pixel Security
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From de2d8db395c32d121d02871819444b631f73e0b6 Mon Sep 17 00:00:00 2001
From: Boris Brezillon <boris.brezillon(a)bootlin.com>
Date: Tue, 24 Jul 2018 15:33:00 +0200
Subject: [PATCH] drm/atomic: Initialize variables in
drm_atomic_helper_async_check() to make gcc happy
drm_atomic_helper_async_check() declares the plane, old_plane_state and
new_plane_state variables to iterate over all planes of the atomic
state and make sure only one plane is enabled.
Unfortunately gcc is not smart enough to figure out that the check on
n_planes is enough to guarantee that plane, new_plane_state and
old_plane_state are initialized.
Explicitly initialize those variables to NULL to make gcc happy.
Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon(a)bootlin.com>
Reviewed-by: Sean Paul <seanpaul(a)chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180724133300.32023-1-boris.…
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index ff858b890045..81e32199d3ef 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1510,8 +1510,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
{
struct drm_crtc *crtc;
struct drm_crtc_state *crtc_state;
- struct drm_plane *plane;
- struct drm_plane_state *old_plane_state, *new_plane_state;
+ struct drm_plane *plane = NULL;
+ struct drm_plane_state *old_plane_state = NULL;
+ struct drm_plane_state *new_plane_state = NULL;
const struct drm_plane_helper_funcs *funcs;
int i, n_planes = 0;
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 603ba2dfb338b307aebe95fe344c479a59b3a175 Mon Sep 17 00:00:00 2001
From: Boris Brezillon <boris.brezillon(a)bootlin.com>
Date: Tue, 24 Jul 2018 15:32:15 +0200
Subject: [PATCH] drm/atomic: Check old_plane_state->crtc in
drm_atomic_helper_async_check()
Async plane update is supposed to work only when updating the FB or FB
position of an already enabled plane. That does not apply to requests
where the plane was previously disabled or assigned to a different
CTRC.
Check old_plane_state->crtc value to make sure async plane update is
allowed.
Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon(a)bootlin.com>
Reviewed-by: Eric Anholt <eric(a)anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180724133215.31917-1-boris.…
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 130da5195f3b..ff858b890045 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1527,7 +1527,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
if (n_planes != 1)
return -EINVAL;
- if (!new_plane_state->crtc)
+ if (!new_plane_state->crtc ||
+ old_plane_state->crtc != new_plane_state->crtc)
return -EINVAL;
funcs = plane->helper_private;
The patch below does not apply to the 4.17-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 0ca54b29054151b7a52cbb8904732280afe5a302 Mon Sep 17 00:00:00 2001
From: Sean Young <sean(a)mess.org>
Date: Tue, 26 Jun 2018 11:03:18 -0400
Subject: [PATCH] media: rc: be less noisy when driver misbehaves
Since commit 48231f289e52 ("media: rc: drivers should produce alternate
pulse and space timing events"), on meson-ir we are regularly producing
errors. Reduce to warning level and only warn once to avoid flooding
the log.
A proper fix for meson-ir is going to be too large for v4.18.
Signed-off-by: Sean Young <sean(a)mess.org>
Cc: stable(a)vger.kernel.org # 4.17+
Tested-by: Jerome Brunet <jbrunet(a)baylibre.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index 2e0066b1a31c..e7948908e78c 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -30,13 +30,13 @@ static int ir_raw_event_thread(void *data)
while (kfifo_out(&raw->kfifo, &ev, 1)) {
if (is_timing_event(ev)) {
if (ev.duration == 0)
- dev_err(&dev->dev, "nonsensical timing event of duration 0");
+ dev_warn_once(&dev->dev, "nonsensical timing event of duration 0");
if (is_timing_event(raw->prev_ev) &&
!is_transition(&ev, &raw->prev_ev))
- dev_err(&dev->dev, "two consecutive events of type %s",
- TO_STR(ev.pulse));
+ dev_warn_once(&dev->dev, "two consecutive events of type %s",
+ TO_STR(ev.pulse));
if (raw->prev_ev.reset && ev.pulse == 0)
- dev_err(&dev->dev, "timing event after reset should be pulse");
+ dev_warn_once(&dev->dev, "timing event after reset should be pulse");
}
list_for_each_entry(handler, &ir_raw_handler_list, list)
if (dev->enabled_protocols &
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From e978de7a6d382ec378830ca2cf38e902df0b6d84 Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jcline(a)redhat.com>
Date: Fri, 27 Jul 2018 22:43:02 +0000
Subject: [PATCH] net: socket: Fix potential spectre v1 gadget in
sock_is_registered
'family' can be a user-controlled value, so sanitize it after the bounds
check to avoid speculative out-of-bounds access.
Cc: Josh Poimboeuf <jpoimboe(a)redhat.com>
Cc: stable(a)vger.kernel.org
Signed-off-by: Jeremy Cline <jcline(a)redhat.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
diff --git a/net/socket.c b/net/socket.c
index 4ac3b834cce9..8c24d5dc4bc8 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2690,7 +2690,8 @@ EXPORT_SYMBOL(sock_unregister);
bool sock_is_registered(int family)
{
- return family < NPROTO && rcu_access_pointer(net_families[family]);
+ return family < NPROTO &&
+ rcu_access_pointer(net_families[array_index_nospec(family, NPROTO)]);
}
static int __init sock_init(void)
net/ipv4/fib_frontend.c: In function ‘fib_compute_spec_dst’:
net/ipv4/fib_frontend.c:225:3: error: expected expression before ‘if’
if (!fib_lookup(net, &fl4, &res))
Looking into the source, it is indeed bad.
fl4.flowi4_mark = vmark ? skb->mark : 0,
if (!fib_lookup(net, &fl4, &res))
return FIB_RES_PREFSRC(net, res);
Guenter
reetings,
I represent business group in Middle East looking for projects to
fund; we seek any business that will guaranty a safe and secure
return on investments. Alternative powers, movies, start up
companies etc. We are also looking for commercial building
projects, hotels, casino, strip malls etc.
If you have a project that differs from these and current budget
is over $40M, Write us and Provide Executive Summary and project
details.
(a)100% financing is available.
(b)Possible JV partnerships or 100% loans.
(c)Project must be over $20M total budget.
I look forward to your reply,
Sir Abraham james,
Sahara Petrochems Ltd
(abrahamjames377(a)gmail.com)
Greetings,
I represent business group in Middle East looking for projects to
fund; we seek any business that will guaranty a safe and secure
return
on investments. Alternative powers, movies, start up companies
etc. We
are also looking for commercial building projects, hotels,
casino,
strip malls etc.
If you have a project that differs from these and current budget
is
over $40M, Write us and Provide Executive Summary and project
details.
(a)100% financing is available.
(b)Possible JV partnerships or 100% loans.
(c)Project must be over $20M total budget.
I look forward to your reply,
Sir Abraham Oded
Sahara Petrochems Ltd
odoabraham5(a)gmail.com
From: Prasad Sodagudi <psodagud(a)codeaurora.org>
When cpu_stop_queue_work() releases the lock for the stopper
thread that was queued into its wake queue, preemption is
enabled, which leads to the following deadlock:
CPU0 CPU1
sched_setaffinity(0, ...)
__set_cpus_allowed_ptr()
stop_one_cpu(0, ...) stop_two_cpus(0, 1, ...)
cpu_stop_queue_work(0, ...) cpu_stop_queue_two_works(0, ..., 1, ...)
-grabs lock for migration/0-
-spins with preemption disabled,
waiting for migration/0's lock to be
released-
-adds work items for migration/0
and queues migration/0 to its
wake_q-
-releases lock for migration/0
and preemption is enabled-
-current thread is preempted,
and __set_cpus_allowed_ptr
has changed the thread's
cpu allowed mask to CPU1 only-
-acquires migration/0 and migration/1's
locks-
-adds work for migration/0 but does not
add migration/0 to wake_q, since it is
already in a wake_q-
-adds work for migration/1 and adds
migration/1 to its wake_q-
-releases migration/0 and migration/1's
locks, wakes migration/1, and enables
preemption-
-since migration/1 is requested to run,
migration/1 begins to run and waits on
migration/0, but migration/0 will never
be able to run, since the thread that
can wake it is affine to CPU1-
Disable preemption in cpu_stop_queue_work() before
queueing works for stopper threads, and queueing the stopper
thread in the wake queue, to ensure that the operation
of queueing the works and waking the stopper threads is atomic.
Fixes: 0b26351b910f ("stop_machine, sched: Fix migrate_swap() vs. active_balance() deadlock")
Co-Developed-by: Isaac J. Manjarres <isaacm(a)codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud(a)codeaurora.org>
Signed-off-by: Isaac J. Manjarres <isaacm(a)codeaurora.org>
Cc: stable(a)vger.kernel.org
---
kernel/stop_machine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 34b6652..067cb83 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -81,6 +81,7 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
unsigned long flags;
bool enabled;
+ preempt_disable();
raw_spin_lock_irqsave(&stopper->lock, flags);
enabled = stopper->enabled;
if (enabled)
@@ -90,6 +91,7 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work)
raw_spin_unlock_irqrestore(&stopper->lock, flags);
wake_up_q(&wakeq);
+ preempt_enable();
return enabled;
}
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
The patch titled
Subject: userfaultfd: remove uffd flags from vma->vm_flags if UFFD_EVENT_FORK fails
has been removed from the -mm tree. Its filename was
userfaultfd-remove-uffd-flags-from-vma-vm_flags-if-uffd_event_fork-fails.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Mike Rapoport <rppt(a)linux.vnet.ibm.com>
Subject: userfaultfd: remove uffd flags from vma->vm_flags if UFFD_EVENT_FORK fails
The fix in 0cbb4b4f4c44 ("userfaultfd: clear the vma->vm_userfaultfd_ctx
if UFFD_EVENT_FORK fails") cleared the vma->vm_userfaultfd_ctx but kept
userfaultfd flags in vma->vm_flags that were copied from the parent
process VMA.
As the result, there is an inconsistency between the values of
vma->vm_userfaultfd_ctx.ctx and vma->vm_flags which triggers BUG_ON in
userfaultfd_release().
Clearing the uffd flags from vma->vm_flags in case of UFFD_EVENT_FORK
failure resolves the issue.
Link: http://lkml.kernel.org/r/1532931975-25473-1-git-send-email-rppt@linux.vnet.…
Fixes: 0cbb4b4f4c44 ("userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails")
Signed-off-by: Mike Rapoport <rppt(a)linux.vnet.ibm.com>
Reported-by: syzbot+121be635a7a35ddb7dcb(a)syzkaller.appspotmail.com
Cc: Andrea Arcangeli <aarcange(a)redhat.com>
Cc: Eric Biggers <ebiggers3(a)gmail.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
fs/userfaultfd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/fs/userfaultfd.c~userfaultfd-remove-uffd-flags-from-vma-vm_flags-if-uffd_event_fork-fails
+++ a/fs/userfaultfd.c
@@ -633,8 +633,10 @@ static void userfaultfd_event_wait_compl
/* the various vma->vm_userfaultfd_ctx still points to it */
down_write(&mm->mmap_sem);
for (vma = mm->mmap; vma; vma = vma->vm_next)
- if (vma->vm_userfaultfd_ctx.ctx == release_new_ctx)
+ if (vma->vm_userfaultfd_ctx.ctx == release_new_ctx) {
vma->vm_userfaultfd_ctx = NULL_VM_UFFD_CTX;
+ vma->vm_flags &= ~(VM_UFFD_WP | VM_UFFD_MISSING);
+ }
up_write(&mm->mmap_sem);
userfaultfd_ctx_put(release_new_ctx);
_
Patches currently in -mm which might be from rppt(a)linux.vnet.ibm.com are
mm-make-deferred_struct_page_init-explicitly-depend-on-sparsemem.patch
mm-memblock-replace-u64-with-phys_addr_t-where-appropriate.patch
mm-mempool-add-missing-parameter-description.patch
mm-util-make-strndup_user-description-a-kernel-doc-comment.patch
mm-util-add-kernel-doc-for-kvfree.patch
docs-core-api-kill-trailing-whitespace-in-kernel-apirst.patch
docs-core-api-move-strmemdup-to-string-manipulation.patch
docs-core-api-split-memory-management-api-to-a-separate-file.patch
docs-mm-make-gfp-flags-descriptions-usable-as-kernel-doc.patch
docs-core-api-mm-api-add-section-about-gfp-flags.patch
The patch titled
Subject: ipc/shm.c add ->pagesize function to shm_vm_ops
has been removed from the -mm tree. Its filename was
ipc-shmc-add-pagesize-function-to-shm_vm_ops.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Jane Chu <jane.chu(a)oracle.com>
Subject: ipc/shm.c add ->pagesize function to shm_vm_ops
05ea88608d4e13 ("mm, hugetlbfs: introduce ->pagesize() to
vm_operations_struct") adds a new ->pagesize() function to hugetlb_vm_ops,
intended to cover all hugetlbfs backed files.
With System V shared memory model, if "huge page" is specified, the
"shared memory" is backed by hugetlbfs files, but the mappings initiated
via shmget/shmat have their original vm_ops overwritten with shm_vm_ops,
so we need to add a ->pagesize function to shm_vm_ops. Otherwise,
vma_kernel_pagesize() returns PAGE_SIZE given a hugetlbfs backed vma,
result in below BUG:
fs/hugetlbfs/inode.c
443 if (unlikely(page_mapped(page))) {
444 BUG_ON(truncate_op);
[ 242.268342] hugetlbfs: oracle (4592): Using mlock ulimits for SHM_HUGETLB is deprecated
[ 282.653208] ------------[ cut here ]------------
[ 282.708447] kernel BUG at fs/hugetlbfs/inode.c:444!
[ 282.818957] Modules linked in: nfsv3 rpcsec_gss_krb5 nfsv4 ...
[ 284.025873] CPU: 35 PID: 5583 Comm: oracle_5583_sbt Not tainted 4.14.35-1829.el7uek.x86_64 #2
[ 284.246609] task: ffff9bf0507aaf80 task.stack: ffffa9e625628000
[ 284.317455] RIP: 0010:remove_inode_hugepages+0x3db/0x3e2
....
[ 285.292389] Call Trace:
[ 285.321630] hugetlbfs_evict_inode+0x1e/0x3e
[ 285.372707] evict+0xdb/0x1af
[ 285.408185] iput+0x1a2/0x1f7
[ 285.443661] dentry_unlink_inode+0xc6/0xf0
[ 285.492661] __dentry_kill+0xd8/0x18d
[ 285.536459] dput+0x1b5/0x1ed
[ 285.571939] __fput+0x18b/0x216
[ 285.609495] ____fput+0xe/0x10
[ 285.646030] task_work_run+0x90/0xa7
[ 285.688788] exit_to_usermode_loop+0xdd/0x116
[ 285.740905] do_syscall_64+0x187/0x1ae
[ 285.785740] entry_SYSCALL_64_after_hwframe+0x150/0x0
Link: http://lkml.kernel.org/r/20180727211727.5020-1-jane.chu@oracle.com
Fixes: 05ea88608d4e13 ("mm, hugetlbfs: introduce ->pagesize() to vm_operations_struct")
Signed-off-by: Jane Chu <jane.chu(a)oracle.com>
Suggested-by: Mike Kravetz <mike.kravetz(a)oracle.com>
Reviewed-by: Mike Kravetz <mike.kravetz(a)oracle.com>
Acked-by: Davidlohr Bueso <dave(a)stgolabs.net>
Acked-by: Michal Hocko <mhocko(a)suse.com>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Jan Kara <jack(a)suse.cz>
Cc: Jérôme Glisse <jglisse(a)redhat.com>
Cc: Manfred Spraul <manfred(a)colorfullife.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/mm.h | 7 +++++++
ipc/shm.c | 12 ++++++++++++
2 files changed, 19 insertions(+)
--- a/include/linux/mm.h~ipc-shmc-add-pagesize-function-to-shm_vm_ops
+++ a/include/linux/mm.h
@@ -389,6 +389,13 @@ enum page_entry_size {
* These are the virtual MM functions - opening of an area, closing and
* unmapping it (needed to keep files on disk up-to-date etc), pointer
* to the functions called when a no-page or a wp-page exception occurs.
+ *
+ * Note, when a new function is introduced to vm_operations_struct and
+ * added to hugetlb_vm_ops, please consider adding the function to
+ * shm_vm_ops. This is because under System V memory model, though
+ * mappings created via shmget/shmat with "huge page" specified are
+ * backed by hugetlbfs files, their original vm_ops are overwritten with
+ * shm_vm_ops.
*/
struct vm_operations_struct {
void (*open)(struct vm_area_struct * area);
--- a/ipc/shm.c~ipc-shmc-add-pagesize-function-to-shm_vm_ops
+++ a/ipc/shm.c
@@ -427,6 +427,17 @@ static int shm_split(struct vm_area_stru
return 0;
}
+static unsigned long shm_pagesize(struct vm_area_struct *vma)
+{
+ struct file *file = vma->vm_file;
+ struct shm_file_data *sfd = shm_file_data(file);
+
+ if (sfd->vm_ops->pagesize)
+ return sfd->vm_ops->pagesize(vma);
+
+ return PAGE_SIZE;
+}
+
#ifdef CONFIG_NUMA
static int shm_set_policy(struct vm_area_struct *vma, struct mempolicy *new)
{
@@ -554,6 +565,7 @@ static const struct vm_operations_struct
.close = shm_close, /* callback for when the vm-area is released */
.fault = shm_fault,
.split = shm_split,
+ .pagesize = shm_pagesize,
#if defined(CONFIG_NUMA)
.set_policy = shm_set_policy,
.get_policy = shm_get_policy,
_
Patches currently in -mm which might be from jane.chu(a)oracle.com are
Hi all,
We'd like to have the following commit backport to 4.9 branch to fix an
issue we are seeing.
35a2897c2a306cca344ca5c0b43416707018f434
sched/wait: Remove the lockless swait_active() check in swake_up*()
In 4.9 branch, we hit an issue in RCU, where the NOCB follower list not getting
reclaimed and causing OOM.
In discussion with Paul, we were able to figure out the problem was because of
missed wake up resulted from lack of proper memory barrier between setting
wake up condition and swake_up().
nocb_leader_wait()
{
*tail = rdp->nocb_gp_head;
smp_mb__after_atomic(); /* Store *tail before wakeup. */
if (rdp != my_rdp && tail == &rdp->nocb_follower_head) {
swake_up(&rdp->nocb_wq);
Note, that the smp_mb__after_atomic() is only a compiler barrier on x86.
Originally I was going to change the barrier to smp_mb(). But then I found out
master has the above mentioned patch that solves the same class of problem by
removing the lockless check inside swake_up().
So I'm wonder if we can backport this patch to 4.9 branch to solve this issue,
and maybe solve other potential missed wake up issue as well.
Thanks,
David
Greetings. I'd like to request a backport/cherry-pick of an existing
patch from the Linus tree onto the linux-4.9.y tree as I'm helping some
folk try to get Debian-stable-vintage Linux running on an instance of the
affected hardware. Without this patch the GPIO pins don't function, but
with the cherry-picked patch they come to life.
The commit is d68b42e30bbacd24354d644f430d088435b15e83 in the mainline
Linux tree and it applied cleanly to the linux-4.9.y tree as of 4.9.115
(dbcdf42bab53d219caa51bcfe54c8b9066010290); I include a copy of it
for reference.
Thanks.
---
>From d68b42e30bbacd24354d644f430d088435b15e83 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Date: Thu, 24 Aug 2017 11:19:33 +0300
Subject: [PATCH] pinctrl: intel: Read back TX buffer state
In the same way as it's done in pinctrl-cherryview.c we would provide
a readback TX buffer state.
Fixes: 17fab473693 ("pinctrl: intel: Set pin direction properly")
Reported-by: "Bourque, Francis" <francis.bourque(a)intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko(a)linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg(a)linux.intel.com>
Tested-by: "Bourque, Francis" <francis.bourque(a)intel.com>
Signed-off-by: Linus Walleij <linus.walleij(a)linaro.org>
---
drivers/pinctrl/intel/pinctrl-intel.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c
index ac806891ff81..71df0f70b61f 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -751,12 +751,17 @@ static int intel_gpio_get(struct gpio_chip *chip, unsigned offset)
{
struct intel_pinctrl *pctrl = gpiochip_get_data(chip);
void __iomem *reg;
+ u32 padcfg0;
reg = intel_get_padcfg(pctrl, offset, PADCFG0);
if (!reg)
return -EINVAL;
- return !!(readl(reg) & PADCFG0_GPIORXSTATE);
+ padcfg0 = readl(reg);
+ if (!(padcfg0 & PADCFG0_GPIOTXDIS))
+ return !!(padcfg0 & PADCFG0_GPIOTXSTATE);
+
+ return !!(padcfg0 & PADCFG0_GPIORXSTATE);
}
static void intel_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
--
2.11.0
--
Anthony de Boer
From: Michael J. Ruhl <michael.j.ruhl(a)intel.com>
commit b697d7d8c741f27b728a878fc55852b06d0f6f5e upstream.
The __get_txreq() function can return a pointer, ERR_PTR(-EBUSY),
or NULL. All of the relevant call sites look for IS_ERR, so the
NULL return would lead to a NULL pointer exception.
Do not use the ERR_PTR mechanism for this function.
Update all call sites to handle the return value correctly.
Clean up error paths to reflect return value.
Adjusted patch for the 4.9.x branch.
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn(a)intel.com>
Reviewed-by: Kamenee Arumugam <kamenee.arumugam(a)intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl(a)intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro(a)intel.com>
---
drivers/infiniband/hw/hfi1/rc.c | 2 +-
drivers/infiniband/hw/hfi1/uc.c | 4 ++--
drivers/infiniband/hw/hfi1/ud.c | 4 ++--
drivers/infiniband/hw/hfi1/verbs_txreq.c | 4 ++--
drivers/infiniband/hw/hfi1/verbs_txreq.h | 4 ++--
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c
index 613074e..e8e0fa5 100644
--- a/drivers/infiniband/hw/hfi1/rc.c
+++ b/drivers/infiniband/hw/hfi1/rc.c
@@ -397,7 +397,7 @@ int hfi1_make_rc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps)
lockdep_assert_held(&qp->s_lock);
ps->s_txreq = get_txreq(ps->dev, qp);
- if (IS_ERR(ps->s_txreq))
+ if (!ps->s_txreq)
goto bail_no_tx;
ohdr = &ps->s_txreq->phdr.hdr.u.oth;
diff --git a/drivers/infiniband/hw/hfi1/uc.c b/drivers/infiniband/hw/hfi1/uc.c
index 5e6d1ba..de21128 100644
--- a/drivers/infiniband/hw/hfi1/uc.c
+++ b/drivers/infiniband/hw/hfi1/uc.c
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2015, 2016 Intel Corporation.
+ * Copyright(c) 2015 - 2018 Intel Corporation.
*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
@@ -72,7 +72,7 @@ int hfi1_make_uc_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps)
int middle = 0;
ps->s_txreq = get_txreq(ps->dev, qp);
- if (IS_ERR(ps->s_txreq))
+ if (!ps->s_txreq)
goto bail_no_tx;
if (!(ib_rvt_state_ops[qp->state] & RVT_PROCESS_SEND_OK)) {
diff --git a/drivers/infiniband/hw/hfi1/ud.c b/drivers/infiniband/hw/hfi1/ud.c
index 97ae24b..1a7ce1d 100644
--- a/drivers/infiniband/hw/hfi1/ud.c
+++ b/drivers/infiniband/hw/hfi1/ud.c
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2015, 2016 Intel Corporation.
+ * Copyright(c) 2015 - 2018 Intel Corporation.
*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
@@ -285,7 +285,7 @@ int hfi1_make_ud_req(struct rvt_qp *qp, struct hfi1_pkt_state *ps)
u8 sc5;
ps->s_txreq = get_txreq(ps->dev, qp);
- if (IS_ERR(ps->s_txreq))
+ if (!ps->s_txreq)
goto bail_no_tx;
if (!(ib_rvt_state_ops[qp->state] & RVT_PROCESS_NEXT_SEND_OK)) {
diff --git a/drivers/infiniband/hw/hfi1/verbs_txreq.c b/drivers/infiniband/hw/hfi1/verbs_txreq.c
index 094ab82..d8a5bad 100644
--- a/drivers/infiniband/hw/hfi1/verbs_txreq.c
+++ b/drivers/infiniband/hw/hfi1/verbs_txreq.c
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2016 Intel Corporation.
+ * Copyright(c) 2016 - 2018 Intel Corporation.
*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
@@ -94,7 +94,7 @@ struct verbs_txreq *__get_txreq(struct hfi1_ibdev *dev,
struct rvt_qp *qp)
__must_hold(&qp->s_lock)
{
- struct verbs_txreq *tx = ERR_PTR(-EBUSY);
+ struct verbs_txreq *tx = NULL;
write_seqlock(&dev->iowait_lock);
if (ib_rvt_state_ops[qp->state] & RVT_PROCESS_RECV_OK) {
diff --git a/drivers/infiniband/hw/hfi1/verbs_txreq.h b/drivers/infiniband/hw/hfi1/verbs_txreq.h
index 5660897..31ded57 100644
--- a/drivers/infiniband/hw/hfi1/verbs_txreq.h
+++ b/drivers/infiniband/hw/hfi1/verbs_txreq.h
@@ -1,5 +1,5 @@
/*
- * Copyright(c) 2016 Intel Corporation.
+ * Copyright(c) 2016 - 2018 Intel Corporation.
*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
@@ -82,7 +82,7 @@ struct verbs_txreq *__get_txreq(struct hfi1_ibdev *dev,
if (unlikely(!tx)) {
/* call slow path to get the lock */
tx = __get_txreq(dev, qp);
- if (IS_ERR(tx))
+ if (!tx)
return tx;
}
tx->qp = qp;