Skip to content

Commit c00cd8c

Browse files
committed
Merge tag 'v5.10.59' into 5.10.y
This is the 5.10.59 stable release
2 parents 60b5006 + 5805e5e commit c00cd8c

File tree

27 files changed

+169
-100
lines changed

27 files changed

+169
-100
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 5
33
PATCHLEVEL = 10
4-
SUBLEVEL = 58
4+
SUBLEVEL = 59
55
EXTRAVERSION =.3
66
NAME = Dare mighty things
77

arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,12 @@
271271
&ehci0 {
272272
dr_mode = "otg";
273273
status = "okay";
274-
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
274+
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>;
275275
};
276276

277277
&ehci1 {
278278
status = "okay";
279-
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>;
279+
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>;
280280
};
281281

282282
&hdmi0 {

arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi

+4-2
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,10 @@
295295
status = "okay";
296296
};
297297

298-
&usb_extal_clk {
299-
clock-frequency = <50000000>;
298+
&usb2_clksel {
299+
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
300+
<&versaclock5 3>, <&usb3s0_clk>;
301+
status = "okay";
300302
};
301303

302304
&usb3s0_clk {

arch/arm64/boot/dts/renesas/r8a774a1.dtsi

+15
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,21 @@
836836
status = "disabled";
837837
};
838838

839+
usb2_clksel: clock-controller@e6590630 {
840+
compatible = "renesas,r8a774a1-rcar-usb2-clock-sel",
841+
"renesas,rcar-gen3-usb2-clock-sel";
842+
reg = <0 0xe6590630 0 0x02>;
843+
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
844+
<&usb_extal_clk>, <&usb3s0_clk>;
845+
clock-names = "ehci_ohci", "hs-usb-if",
846+
"usb_extal", "usb_xtal";
847+
#clock-cells = <0>;
848+
power-domains = <&sysc R8A774A1_PD_ALWAYS_ON>;
849+
resets = <&cpg 703>, <&cpg 704>;
850+
reset-names = "ehci_ohci", "hs-usb-if";
851+
status = "disabled";
852+
};
853+
839854
usb_dmac0: dma-controller@e65a0000 {
840855
compatible = "renesas,r8a774a1-usb-dmac",
841856
"renesas,usb-dmac";

arch/arm64/boot/dts/renesas/r8a774b1.dtsi

+15
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,21 @@
709709
status = "disabled";
710710
};
711711

712+
usb2_clksel: clock-controller@e6590630 {
713+
compatible = "renesas,r8a774b1-rcar-usb2-clock-sel",
714+
"renesas,rcar-gen3-usb2-clock-sel";
715+
reg = <0 0xe6590630 0 0x02>;
716+
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
717+
<&usb_extal_clk>, <&usb3s0_clk>;
718+
clock-names = "ehci_ohci", "hs-usb-if",
719+
"usb_extal", "usb_xtal";
720+
#clock-cells = <0>;
721+
power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
722+
resets = <&cpg 703>, <&cpg 704>;
723+
reset-names = "ehci_ohci", "hs-usb-if";
724+
status = "disabled";
725+
};
726+
712727
usb_dmac0: dma-controller@e65a0000 {
713728
compatible = "renesas,r8a774b1-usb-dmac",
714729
"renesas,usb-dmac";

arch/arm64/boot/dts/renesas/r8a774e1.dtsi

+15
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,21 @@
890890
status = "disabled";
891891
};
892892

893+
usb2_clksel: clock-controller@e6590630 {
894+
compatible = "renesas,r8a774e1-rcar-usb2-clock-sel",
895+
"renesas,rcar-gen3-usb2-clock-sel";
896+
reg = <0 0xe6590630 0 0x02>;
897+
clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>,
898+
<&usb_extal_clk>, <&usb3s0_clk>;
899+
clock-names = "ehci_ohci", "hs-usb-if",
900+
"usb_extal", "usb_xtal";
901+
#clock-cells = <0>;
902+
power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
903+
resets = <&cpg 703>, <&cpg 704>;
904+
reset-names = "ehci_ohci", "hs-usb-if";
905+
status = "disabled";
906+
};
907+
893908
usb_dmac0: dma-controller@e65a0000 {
894909
compatible = "renesas,r8a774e1-usb-dmac",
895910
"renesas,usb-dmac";

arch/x86/kvm/svm/sev.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static void sev_asid_free(int asid)
124124

125125
for_each_possible_cpu(cpu) {
126126
sd = per_cpu(svm_data, cpu);
127-
sd->sev_vmcbs[pos] = NULL;
127+
sd->sev_vmcbs[asid] = NULL;
128128
}
129129

130130
mutex_unlock(&sev_bitmap_lock);

drivers/firmware/broadcom/tee_bnxt_fw.c

+11-3
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,9 @@ static int tee_bnxt_fw_probe(struct device *dev)
212212

213213
pvt_data.dev = dev;
214214

215-
fw_shm_pool = tee_shm_alloc(pvt_data.ctx, MAX_SHM_MEM_SZ,
216-
TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
215+
fw_shm_pool = tee_shm_alloc_kernel_buf(pvt_data.ctx, MAX_SHM_MEM_SZ);
217216
if (IS_ERR(fw_shm_pool)) {
218-
dev_err(pvt_data.dev, "tee_shm_alloc failed\n");
217+
dev_err(pvt_data.dev, "tee_shm_alloc_kernel_buf failed\n");
219218
err = PTR_ERR(fw_shm_pool);
220219
goto out_sess;
221220
}
@@ -242,6 +241,14 @@ static int tee_bnxt_fw_remove(struct device *dev)
242241
return 0;
243242
}
244243

244+
static void tee_bnxt_fw_shutdown(struct device *dev)
245+
{
246+
tee_shm_free(pvt_data.fw_shm_pool);
247+
tee_client_close_session(pvt_data.ctx, pvt_data.session_id);
248+
tee_client_close_context(pvt_data.ctx);
249+
pvt_data.ctx = NULL;
250+
}
251+
245252
static const struct tee_client_device_id tee_bnxt_fw_id_table[] = {
246253
{UUID_INIT(0x6272636D, 0x2019, 0x0716,
247254
0x42, 0x43, 0x4D, 0x5F, 0x53, 0x43, 0x48, 0x49)},
@@ -257,6 +264,7 @@ static struct tee_client_driver tee_bnxt_fw_driver = {
257264
.bus = &tee_bus_type,
258265
.probe = tee_bnxt_fw_probe,
259266
.remove = tee_bnxt_fw_remove,
267+
.shutdown = tee_bnxt_fw_shutdown,
260268
},
261269
};
262270

drivers/net/ethernet/xilinx/xilinx_emaclite.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -1191,9 +1191,8 @@ static int xemaclite_of_probe(struct platform_device *ofdev)
11911191
}
11921192

11931193
dev_info(dev,
1194-
"Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n",
1195-
(unsigned int __force)ndev->mem_start,
1196-
(unsigned int __force)lp->base_addr, ndev->irq);
1194+
"Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n",
1195+
(unsigned int __force)ndev->mem_start, lp->base_addr, ndev->irq);
11971196
return 0;
11981197

11991198
error:

drivers/net/ppp/ppp_generic.c

+15-4
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static struct channel *ppp_find_channel(struct ppp_net *pn, int unit);
283283
static int ppp_connect_channel(struct channel *pch, int unit);
284284
static int ppp_disconnect_channel(struct channel *pch);
285285
static void ppp_destroy_channel(struct channel *pch);
286-
static int unit_get(struct idr *p, void *ptr);
286+
static int unit_get(struct idr *p, void *ptr, int min);
287287
static int unit_set(struct idr *p, void *ptr, int n);
288288
static void unit_put(struct idr *p, int n);
289289
static void *unit_find(struct idr *p, int n);
@@ -1045,9 +1045,20 @@ static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)
10451045
mutex_lock(&pn->all_ppp_mutex);
10461046

10471047
if (unit < 0) {
1048-
ret = unit_get(&pn->units_idr, ppp);
1048+
ret = unit_get(&pn->units_idr, ppp, 0);
10491049
if (ret < 0)
10501050
goto err;
1051+
if (!ifname_is_set) {
1052+
while (1) {
1053+
snprintf(ppp->dev->name, IFNAMSIZ, "ppp%i", ret);
1054+
if (!__dev_get_by_name(ppp->ppp_net, ppp->dev->name))
1055+
break;
1056+
unit_put(&pn->units_idr, ret);
1057+
ret = unit_get(&pn->units_idr, ppp, ret + 1);
1058+
if (ret < 0)
1059+
goto err;
1060+
}
1061+
}
10511062
} else {
10521063
/* Caller asked for a specific unit number. Fail with -EEXIST
10531064
* if unavailable. For backward compatibility, return -EEXIST
@@ -3378,9 +3389,9 @@ static int unit_set(struct idr *p, void *ptr, int n)
33783389
}
33793390

33803391
/* get new free unit number and associate pointer with it */
3381-
static int unit_get(struct idr *p, void *ptr)
3392+
static int unit_get(struct idr *p, void *ptr, int min)
33823393
{
3383-
return idr_alloc(p, ptr, 0, 0, GFP_KERNEL);
3394+
return idr_alloc(p, ptr, min, 0, GFP_KERNEL);
33843395
}
33853396

33863397
/* put unit number back to a pool */

drivers/tee/optee/call.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static struct tee_shm *get_msg_arg(struct tee_context *ctx, size_t num_params,
181181
struct optee_msg_arg *ma;
182182

183183
shm = tee_shm_alloc(ctx, OPTEE_MSG_GET_ARG_SIZE(num_params),
184-
TEE_SHM_MAPPED);
184+
TEE_SHM_MAPPED | TEE_SHM_PRIV);
185185
if (IS_ERR(shm))
186186
return shm;
187187

drivers/tee/optee/core.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ static void optee_release(struct tee_context *ctx)
278278
if (!ctxdata)
279279
return;
280280

281-
shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg), TEE_SHM_MAPPED);
281+
shm = tee_shm_alloc(ctx, sizeof(struct optee_msg_arg),
282+
TEE_SHM_MAPPED | TEE_SHM_PRIV);
282283
if (!IS_ERR(shm)) {
283284
arg = tee_shm_get_va(shm, 0);
284285
/*

drivers/tee/optee/rpc.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx,
313313
shm = cmd_alloc_suppl(ctx, sz);
314314
break;
315315
case OPTEE_MSG_RPC_SHM_TYPE_KERNEL:
316-
shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED);
316+
shm = tee_shm_alloc(ctx, sz, TEE_SHM_MAPPED | TEE_SHM_PRIV);
317317
break;
318318
default:
319319
arg->ret = TEEC_ERROR_BAD_PARAMETERS;
@@ -501,7 +501,8 @@ void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,
501501

502502
switch (OPTEE_SMC_RETURN_GET_RPC_FUNC(param->a0)) {
503503
case OPTEE_SMC_RPC_FUNC_ALLOC:
504-
shm = tee_shm_alloc(ctx, param->a1, TEE_SHM_MAPPED);
504+
shm = tee_shm_alloc(ctx, param->a1,
505+
TEE_SHM_MAPPED | TEE_SHM_PRIV);
505506
if (!IS_ERR(shm) && !tee_shm_get_pa(shm, 0, &pa)) {
506507
reg_pair_from_64(&param->a1, &param->a2, pa);
507508
reg_pair_from_64(&param->a4, &param->a5,

drivers/tee/optee/shm_pool.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
2727
shm->paddr = page_to_phys(page);
2828
shm->size = PAGE_SIZE << order;
2929

30-
if (shm->flags & TEE_SHM_DMA_BUF) {
30+
/*
31+
* Shared memory private to the OP-TEE driver doesn't need
32+
* to be registered with OP-TEE.
33+
*/
34+
if (!(shm->flags & TEE_SHM_PRIV)) {
3135
unsigned int nr_pages = 1 << order, i;
3236
struct page **pages;
3337

@@ -60,7 +64,7 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,
6064
static void pool_op_free(struct tee_shm_pool_mgr *poolm,
6165
struct tee_shm *shm)
6266
{
63-
if (shm->flags & TEE_SHM_DMA_BUF)
67+
if (!(shm->flags & TEE_SHM_PRIV))
6468
optee_shm_unregister(shm->ctx, shm);
6569

6670
free_pages((unsigned long)shm->kaddr, get_order(shm->size));

drivers/tee/tee_shm.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ struct tee_shm *tee_shm_alloc(struct tee_context *ctx, size_t size, u32 flags)
117117
return ERR_PTR(-EINVAL);
118118
}
119119

120-
if ((flags & ~(TEE_SHM_MAPPED | TEE_SHM_DMA_BUF))) {
120+
if ((flags & ~(TEE_SHM_MAPPED | TEE_SHM_DMA_BUF | TEE_SHM_PRIV))) {
121121
dev_err(teedev->dev.parent, "invalid shm flags 0x%x", flags);
122122
return ERR_PTR(-EINVAL);
123123
}
@@ -207,7 +207,7 @@ EXPORT_SYMBOL_GPL(tee_shm_alloc);
207207
*/
208208
struct tee_shm *tee_shm_alloc_kernel_buf(struct tee_context *ctx, size_t size)
209209
{
210-
return tee_shm_alloc(ctx, size, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
210+
return tee_shm_alloc(ctx, size, TEE_SHM_MAPPED);
211211
}
212212
EXPORT_SYMBOL_GPL(tee_shm_alloc_kernel_buf);
213213

drivers/usb/host/ehci-pci.c

+3
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
297297
if (pdev->vendor == PCI_VENDOR_ID_STMICRO
298298
&& pdev->device == PCI_DEVICE_ID_STMICRO_USB_HOST)
299299
; /* ConneXT has no sbrn register */
300+
else if (pdev->vendor == PCI_VENDOR_ID_HUAWEI
301+
&& pdev->device == 0xa239)
302+
; /* HUAWEI Kunpeng920 USB EHCI has no sbrn register */
300303
else
301304
pci_read_config_byte(pdev, 0x60, &ehci->sbrn);
302305

fs/namespace.c

+28-14
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,20 @@ void drop_collected_mounts(struct vfsmount *mnt)
19191919
namespace_unlock();
19201920
}
19211921

1922+
static bool has_locked_children(struct mount *mnt, struct dentry *dentry)
1923+
{
1924+
struct mount *child;
1925+
1926+
list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) {
1927+
if (!is_subdir(child->mnt_mountpoint, dentry))
1928+
continue;
1929+
1930+
if (child->mnt.mnt_flags & MNT_LOCKED)
1931+
return true;
1932+
}
1933+
return false;
1934+
}
1935+
19221936
/**
19231937
* clone_private_mount - create a private clone of a path
19241938
*
@@ -1933,17 +1947,30 @@ struct vfsmount *clone_private_mount(const struct path *path)
19331947
struct mount *old_mnt = real_mount(path->mnt);
19341948
struct mount *new_mnt;
19351949

1950+
down_read(&namespace_sem);
19361951
if (IS_MNT_UNBINDABLE(old_mnt))
1937-
return ERR_PTR(-EINVAL);
1952+
goto invalid;
1953+
1954+
if (!check_mnt(old_mnt))
1955+
goto invalid;
1956+
1957+
if (has_locked_children(old_mnt, path->dentry))
1958+
goto invalid;
19381959

19391960
new_mnt = clone_mnt(old_mnt, path->dentry, CL_PRIVATE);
1961+
up_read(&namespace_sem);
1962+
19401963
if (IS_ERR(new_mnt))
19411964
return ERR_CAST(new_mnt);
19421965

19431966
/* Longterm mount to be removed by kern_unmount*() */
19441967
new_mnt->mnt_ns = MNT_NS_INTERNAL;
19451968

19461969
return &new_mnt->mnt;
1970+
1971+
invalid:
1972+
up_read(&namespace_sem);
1973+
return ERR_PTR(-EINVAL);
19471974
}
19481975
EXPORT_SYMBOL_GPL(clone_private_mount);
19491976

@@ -2295,19 +2322,6 @@ static int do_change_type(struct path *path, int ms_flags)
22952322
return err;
22962323
}
22972324

2298-
static bool has_locked_children(struct mount *mnt, struct dentry *dentry)
2299-
{
2300-
struct mount *child;
2301-
list_for_each_entry(child, &mnt->mnt_mounts, mnt_child) {
2302-
if (!is_subdir(child->mnt_mountpoint, dentry))
2303-
continue;
2304-
2305-
if (child->mnt.mnt_flags & MNT_LOCKED)
2306-
return true;
2307-
}
2308-
return false;
2309-
}
2310-
23112325
static struct mount *__do_loopback(struct path *old_path, int recurse)
23122326
{
23132327
struct mount *mnt = ERR_PTR(-EINVAL), *old = real_mount(old_path->mnt);

0 commit comments

Comments
 (0)