Skip to content

Commit c252081

Browse files
stefanhh0jerpelea
authored andcommitted
treewide: Linux 4.14.188
source kernel.org https://cdn.kernel.org/pub/linux/kernel/v4.x/incr/patch-4.14.187-188.xz Signed-off-by: Stefan Rücker <s.ruecker@gmx.de>
1 parent 3a2d2ab commit c252081

File tree

34 files changed

+238
-178
lines changed

34 files changed

+238
-178
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 4
33
PATCHLEVEL = 14
4-
SUBLEVEL = 187
4+
SUBLEVEL = 188
55
EXTRAVERSION =
66
NAME = Petit Gorille
77

arch/mips/kernel/traps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2135,6 +2135,7 @@ static void configure_status(void)
21352135

21362136
change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
21372137
status_set);
2138+
back_to_back_c0_hazard();
21382139
}
21392140

21402141
unsigned int hwrena;

crypto/af_alg.c

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,21 +133,15 @@ EXPORT_SYMBOL_GPL(af_alg_release);
133133
void af_alg_release_parent(struct sock *sk)
134134
{
135135
struct alg_sock *ask = alg_sk(sk);
136-
unsigned int nokey = ask->nokey_refcnt;
137-
bool last = nokey && !ask->refcnt;
136+
unsigned int nokey = atomic_read(&ask->nokey_refcnt);
138137

139138
sk = ask->parent;
140139
ask = alg_sk(sk);
141140

142-
local_bh_disable();
143-
bh_lock_sock(sk);
144-
ask->nokey_refcnt -= nokey;
145-
if (!last)
146-
last = !--ask->refcnt;
147-
bh_unlock_sock(sk);
148-
local_bh_enable();
141+
if (nokey)
142+
atomic_dec(&ask->nokey_refcnt);
149143

150-
if (last)
144+
if (atomic_dec_and_test(&ask->refcnt))
151145
sock_put(sk);
152146
}
153147
EXPORT_SYMBOL_GPL(af_alg_release_parent);
@@ -192,7 +186,7 @@ static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
192186

193187
err = -EBUSY;
194188
lock_sock(sk);
195-
if (ask->refcnt | ask->nokey_refcnt)
189+
if (atomic_read(&ask->refcnt))
196190
goto unlock;
197191

198192
swap(ask->type, type);
@@ -241,7 +235,7 @@ static int alg_setsockopt(struct socket *sock, int level, int optname,
241235
int err = -EBUSY;
242236

243237
lock_sock(sk);
244-
if (ask->refcnt)
238+
if (atomic_read(&ask->refcnt) != atomic_read(&ask->nokey_refcnt))
245239
goto unlock;
246240

247241
type = ask->type;
@@ -308,12 +302,14 @@ int af_alg_accept(struct sock *sk, struct socket *newsock, bool kern)
308302

309303
sk2->sk_family = PF_ALG;
310304

311-
if (nokey || !ask->refcnt++)
305+
if (atomic_inc_return_relaxed(&ask->refcnt) == 1)
312306
sock_hold(sk);
313-
ask->nokey_refcnt += nokey;
307+
if (nokey) {
308+
atomic_inc(&ask->nokey_refcnt);
309+
atomic_set(&alg_sk(sk2)->nokey_refcnt, 1);
310+
}
314311
alg_sk(sk2)->parent = sk;
315312
alg_sk(sk2)->type = type;
316-
alg_sk(sk2)->nokey_refcnt = nokey;
317313

318314
newsock->ops = type->ops;
319315
newsock->state = SS_CONNECTED;

crypto/algif_aead.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ static int aead_check_key(struct socket *sock)
389389
struct alg_sock *ask = alg_sk(sk);
390390

391391
lock_sock(sk);
392-
if (ask->refcnt)
392+
if (!atomic_read(&ask->nokey_refcnt))
393393
goto unlock_child;
394394

395395
psk = ask->parent;
@@ -401,11 +401,8 @@ static int aead_check_key(struct socket *sock)
401401
if (!tfm->has_key)
402402
goto unlock;
403403

404-
if (!pask->refcnt++)
405-
sock_hold(psk);
406-
407-
ask->refcnt = 1;
408-
sock_put(psk);
404+
atomic_dec(&pask->nokey_refcnt);
405+
atomic_set(&ask->nokey_refcnt, 0);
409406

410407
err = 0;
411408

crypto/algif_hash.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static int hash_check_key(struct socket *sock)
309309
struct alg_sock *ask = alg_sk(sk);
310310

311311
lock_sock(sk);
312-
if (ask->refcnt)
312+
if (!atomic_read(&ask->nokey_refcnt))
313313
goto unlock_child;
314314

315315
psk = ask->parent;
@@ -321,11 +321,8 @@ static int hash_check_key(struct socket *sock)
321321
if (crypto_ahash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY)
322322
goto unlock;
323323

324-
if (!pask->refcnt++)
325-
sock_hold(psk);
326-
327-
ask->refcnt = 1;
328-
sock_put(psk);
324+
atomic_dec(&pask->nokey_refcnt);
325+
atomic_set(&ask->nokey_refcnt, 0);
329326

330327
err = 0;
331328

crypto/algif_skcipher.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ static int skcipher_check_key(struct socket *sock)
223223
struct alg_sock *ask = alg_sk(sk);
224224

225225
lock_sock(sk);
226-
if (ask->refcnt)
226+
if (!atomic_read(&ask->nokey_refcnt))
227227
goto unlock_child;
228228

229229
psk = ask->parent;
@@ -235,11 +235,8 @@ static int skcipher_check_key(struct socket *sock)
235235
if (!tfm->has_key)
236236
goto unlock;
237237

238-
if (!pask->refcnt++)
239-
sock_hold(psk);
240-
241-
ask->refcnt = 1;
242-
sock_put(psk);
238+
atomic_dec(&pask->nokey_refcnt);
239+
atomic_set(&ask->nokey_refcnt, 0);
243240

244241
err = 0;
245242

drivers/block/virtio_blk.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ static int virtblk_probe(struct virtio_device *vdev)
879879
put_disk(vblk->disk);
880880
out_free_vq:
881881
vdev->config->del_vqs(vdev);
882+
kfree(vblk->vqs);
882883
out_free_vblk:
883884
kfree(vblk);
884885
out_free_index:

drivers/edac/amd64_edac.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ static int get_scrub_rate(struct mem_ctl_info *mci)
261261

262262
if (pvt->model == 0x60)
263263
amd64_read_pci_cfg(pvt->F2, F15H_M60H_SCRCTRL, &scrubval);
264+
else
265+
amd64_read_pci_cfg(pvt->F3, SCRCTRL, &scrubval);
264266
break;
265267

266268
case 0x17:

drivers/firmware/efi/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,17 @@ config RESET_ATTACK_MITIGATION
164164
have been evicted, since otherwise it will trigger even on clean
165165
reboots.
166166

167+
config EFI_CUSTOM_SSDT_OVERLAYS
168+
bool "Load custom ACPI SSDT overlay from an EFI variable"
169+
depends on EFI_VARS && ACPI
170+
default ACPI_TABLE_UPGRADE
171+
help
172+
Allow loading of an ACPI SSDT overlay from an EFI variable specified
173+
by a kernel command line option.
174+
175+
See Documentation/admin-guide/acpi/ssdt-overlays.rst for more
176+
information.endmenu
177+
167178
endmenu
168179

169180
config UEFI_CPER

drivers/firmware/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static void generic_ops_unregister(void)
221221
efivars_unregister(&generic_efivars);
222222
}
223223

224-
#if IS_ENABLED(CONFIG_ACPI)
224+
#ifdef CONFIG_EFI_CUSTOM_SSDT_OVERLAYS
225225
#define EFIVAR_SSDT_NAME_MAX 16
226226
static char efivar_ssdt[EFIVAR_SSDT_NAME_MAX] __initdata;
227227
static int __init efivar_ssdt_setup(char *str)

0 commit comments

Comments
 (0)