Linux v4.16.3

This commit is contained in:
Jeremy Cline 2018-04-19 10:13:19 -04:00
parent 8d319f1cc8
commit 280956f686
No known key found for this signature in database
GPG Key ID: 9223308FA9B246DB
5 changed files with 7 additions and 176 deletions

View File

@ -28,35 +28,6 @@ index a21039852f8d..cd20ce4ed87d 100644
ret = lan78xx_write_reg(dev, HW_CFG, buf);
ret = lan78xx_read_reg(dev, USB_CFG0, &buf);
From f8a798bb45ae15cbec980c8e921eb377fd1a3df6 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Tue, 28 Nov 2017 12:02:37 +0000
Subject: [PATCH] lan78xx: Correctly indicate invalid OTP
lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP
content, but the value gets overwritten before it is returned and the
read goes ahead anyway. Make the read conditional as it should be
and preserve the error code.
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
---
drivers/net/usb/lan78xx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index cd20ce4ed87d..b270935f3f8d 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -929,7 +929,8 @@ static int lan78xx_read_otp(struct lan78xx_net *dev, u32 offset,
offset += 0x100;
else
ret = -EINVAL;
- ret = lan78xx_read_raw_otp(dev, offset, length, data);
+ if (!ret)
+ ret = lan78xx_read_raw_otp(dev, offset, length, data);
}
return ret;
From 4a4710f3847cd087e150f83382dffd92e09d9914 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Sat, 17 Mar 2018 00:10:02 +0100

View File

@ -2372,89 +2372,3 @@ index 17f349459587..c2b23a9fdf3d 100644
--
2.14.3
From 426fa6179dae677134dfb37b21d057819418515b Mon Sep 17 00:00:00 2001
From: Corey Minyard <cminyard@mvista.com>
Date: Wed, 28 Feb 2018 08:09:49 -0600
Subject: [PATCH 9/9] ipmi: Fix some error cleanup issues
device_remove_group() was called on any cleanup, even if the
device attrs had not been added yet. That can occur in certain
error scenarios, so add a flag to know if it has been added.
Also make sure we remove the dev if we added it ourselves.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: stable@vger.kernel.org # 4.15
---
drivers/char/ipmi/ipmi_si_intf.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 5141ccf0b958..2b9f434775d4 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -232,6 +232,9 @@ struct smi_info {
/* Default driver model device. */
struct platform_device *pdev;
+ /* Have we added the device group to the device? */
+ bool dev_group_added;
+
/* Counters and things for the proc filesystem. */
atomic_t stats[SI_NUM_STATS];
@@ -2007,8 +2010,8 @@ int ipmi_si_add_smi(struct si_sm_io *io)
if (initialized) {
rv = try_smi_init(new_smi);
if (rv) {
- mutex_unlock(&smi_infos_lock);
cleanup_one_si(new_smi);
+ mutex_unlock(&smi_infos_lock);
return rv;
}
}
@@ -2167,6 +2170,7 @@ static int try_smi_init(struct smi_info *new_smi)
rv);
goto out_err_stop_timer;
}
+ new_smi->dev_group_added = true;
rv = ipmi_register_smi(&handlers,
new_smi,
@@ -2220,7 +2224,10 @@ static int try_smi_init(struct smi_info *new_smi)
return 0;
out_err_remove_attrs:
- device_remove_group(new_smi->io.dev, &ipmi_si_dev_attr_group);
+ if (new_smi->dev_group_added) {
+ device_remove_group(new_smi->io.dev, &ipmi_si_dev_attr_group);
+ new_smi->dev_group_added = false;
+ }
dev_set_drvdata(new_smi->io.dev, NULL);
out_err_stop_timer:
@@ -2268,6 +2275,7 @@ static int try_smi_init(struct smi_info *new_smi)
else
platform_device_put(new_smi->pdev);
new_smi->pdev = NULL;
+ new_smi->io.dev = NULL;
}
kfree(init_name);
@@ -2364,8 +2372,10 @@ static void cleanup_one_si(struct smi_info *to_clean)
}
}
- device_remove_group(to_clean->io.dev, &ipmi_si_dev_attr_group);
- dev_set_drvdata(to_clean->io.dev, NULL);
+ if (to_clean->dev_group_added)
+ device_remove_group(to_clean->io.dev, &ipmi_si_dev_attr_group);
+ if (to_clean->io.dev)
+ dev_set_drvdata(to_clean->io.dev, NULL);
list_del(&to_clean->link);
--
2.14.3

View File

@ -54,7 +54,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
%define stable_update 2
%define stable_update 3
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev %{stable_update}
@ -644,15 +644,12 @@ Patch502: input-rmi4-remove-the-need-for-artifical-IRQ.patch
# rhbz 1509461
Patch503: v3-2-2-Input-synaptics---Lenovo-X1-Carbon-5-should-use-SMBUS-RMI.patch
# rhbz 1558977
Patch504: sunrpc-remove-incorrect-HMAC-request-initialization.patch
# In v4.17
# rhbz 1549316
Patch505: ipmi-fixes.patch
Patch504: ipmi-fixes.patch
# rhbz 1566510
Patch506: net-Revert-macsec-missing-dev_put-on-error-in-macsec_newlink.patch
Patch505: net-Revert-macsec-missing-dev_put-on-error-in-macsec_newlink.patch
# END OF PATCH DEFINITIONS
@ -1903,6 +1900,9 @@ fi
#
#
%changelog
* Thu Apr 19 2018 Jeremy Cline <jeremy@jcline.org> - 4.16.3-300
- Linux v4.16.3
* Thu Apr 19 2018 Peter Robinson <pbrobinson@fedoraproject.org>
- Enable UFS storage options on ARM
- Add support for Pocket Beagle

View File

@ -1,2 +1,2 @@
SHA512 (linux-4.16.tar.xz) = ab47849314b177d0eec9dbf261f33972b0d89fb92fb0650130ffa7abc2f36c0fab2d06317dc1683c51a472a9a631573a9b1e7258d6281a2ee189897827f14662
SHA512 (patch-4.16.2.xz) = 3b9e2b8019f002443c7cd6510a878ab537351842e522848bdccd185dad6ea2b78a19b5c9179cd10aacccf20941632fd42340a5a3cef48ac875e57bd6cb3d57eb
SHA512 (patch-4.16.3.xz) = 7c7c2c090d7375a923524d88f86a714576321094de94bcfd78d467b78c3b933c2cdb4863db24b0091b28f78ae10a5d4e112c3d150998d552d29e737f043e5fa8

View File

@ -1,54 +0,0 @@
From 5cdbcf4aa78b57c4f10892f20725174829cca191 Mon Sep 17 00:00:00 2001
From: Eric Biggers <ebiggers@google.com>
Date: Wed, 28 Mar 2018 10:57:22 -0700
Subject: [PATCH] sunrpc: remove incorrect HMAC request initialization
make_checksum_hmac_md5() is allocating an HMAC transform and doing
crypto API calls in the following order:
crypto_ahash_init()
crypto_ahash_setkey()
crypto_ahash_digest()
This is wrong because it makes no sense to init() the request before a
key has been set, given that the initial state depends on the key. And
digest() is short for init() + update() + final(), so in this case
there's no need to explicitly call init() at all.
Before commit 9fa68f620041 ("crypto: hash - prevent using keyed hashes
without setting key") the extra init() had no real effect, at least for
the software HMAC implementation. (There are also hardware drivers that
implement HMAC-MD5, and it's not immediately obvious how gracefully they
handle init() before setkey().) But now the crypto API detects this
incorrect initialization and returns -ENOKEY. This is breaking NFS
mounts in some cases.
Fix it by removing the incorrect call to crypto_ahash_init().
Reported-by: Michael Young <m.a.young@durham.ac.uk>
Fixes: 9fa68f620041 ("crypto: hash - prevent using keyed hashes without setting key")
Fixes: fffdaef2eb4a ("gss_krb5: Add support for rc4-hmac encryption")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
---
net/sunrpc/auth_gss/gss_krb5_crypto.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c
index 12649c9fedab..8654494b4d0a 100644
--- a/net/sunrpc/auth_gss/gss_krb5_crypto.c
+++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c
@@ -237,9 +237,6 @@ make_checksum_hmac_md5(struct krb5_ctx *kctx, char *header, int hdrlen,
ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP, NULL, NULL);
- err = crypto_ahash_init(req);
- if (err)
- goto out;
err = crypto_ahash_setkey(hmac_md5, cksumkey, kctx->gk5e->keylength);
if (err)
goto out;
--
2.16.2