Magellan Linux

Annotation of /trunk/kernel-alx/patches-5.4/0210-5.4.111-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3635 - (hide annotations) (download)
Mon Oct 24 12:34:12 2022 UTC (20 months ago) by niro
File size: 14949 byte(s)
-sync kernel patches
1 niro 3635 diff --git a/Makefile b/Makefile
2     index b028b5ead5f7e..25680098f51b2 100644
3     --- a/Makefile
4     +++ b/Makefile
5     @@ -1,7 +1,7 @@
6     # SPDX-License-Identifier: GPL-2.0
7     VERSION = 5
8     PATCHLEVEL = 4
9     -SUBLEVEL = 110
10     +SUBLEVEL = 111
11     EXTRAVERSION =
12     NAME = Kleptomaniac Octopus
13    
14     diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
15     index fb6b8aa12cc56..77fa7c0f21046 100644
16     --- a/arch/arm/boot/dts/am33xx.dtsi
17     +++ b/arch/arm/boot/dts/am33xx.dtsi
18     @@ -40,6 +40,9 @@
19     ethernet1 = &cpsw_emac1;
20     spi0 = &spi0;
21     spi1 = &spi1;
22     + mmc0 = &mmc1;
23     + mmc1 = &mmc2;
24     + mmc2 = &mmc3;
25     };
26    
27     cpus {
28     diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c
29     index 8b5b8e6bc9d9a..dd5bfed52031d 100644
30     --- a/arch/ia64/kernel/err_inject.c
31     +++ b/arch/ia64/kernel/err_inject.c
32     @@ -59,7 +59,7 @@ show_##name(struct device *dev, struct device_attribute *attr, \
33     char *buf) \
34     { \
35     u32 cpu=dev->id; \
36     - return sprintf(buf, "%lx\n", name[cpu]); \
37     + return sprintf(buf, "%llx\n", name[cpu]); \
38     }
39    
40     #define store(name) \
41     @@ -86,9 +86,9 @@ store_call_start(struct device *dev, struct device_attribute *attr,
42    
43     #ifdef ERR_INJ_DEBUG
44     printk(KERN_DEBUG "pal_mc_err_inject for cpu%d:\n", cpu);
45     - printk(KERN_DEBUG "err_type_info=%lx,\n", err_type_info[cpu]);
46     - printk(KERN_DEBUG "err_struct_info=%lx,\n", err_struct_info[cpu]);
47     - printk(KERN_DEBUG "err_data_buffer=%lx, %lx, %lx.\n",
48     + printk(KERN_DEBUG "err_type_info=%llx,\n", err_type_info[cpu]);
49     + printk(KERN_DEBUG "err_struct_info=%llx,\n", err_struct_info[cpu]);
50     + printk(KERN_DEBUG "err_data_buffer=%llx, %llx, %llx.\n",
51     err_data_buffer[cpu].data1,
52     err_data_buffer[cpu].data2,
53     err_data_buffer[cpu].data3);
54     @@ -117,8 +117,8 @@ store_call_start(struct device *dev, struct device_attribute *attr,
55    
56     #ifdef ERR_INJ_DEBUG
57     printk(KERN_DEBUG "Returns: status=%d,\n", (int)status[cpu]);
58     - printk(KERN_DEBUG "capabilities=%lx,\n", capabilities[cpu]);
59     - printk(KERN_DEBUG "resources=%lx\n", resources[cpu]);
60     + printk(KERN_DEBUG "capabilities=%llx,\n", capabilities[cpu]);
61     + printk(KERN_DEBUG "resources=%llx\n", resources[cpu]);
62     #endif
63     return size;
64     }
65     @@ -131,7 +131,7 @@ show_virtual_to_phys(struct device *dev, struct device_attribute *attr,
66     char *buf)
67     {
68     unsigned int cpu=dev->id;
69     - return sprintf(buf, "%lx\n", phys_addr[cpu]);
70     + return sprintf(buf, "%llx\n", phys_addr[cpu]);
71     }
72    
73     static ssize_t
74     @@ -145,7 +145,7 @@ store_virtual_to_phys(struct device *dev, struct device_attribute *attr,
75     ret = get_user_pages_fast(virt_addr, 1, FOLL_WRITE, NULL);
76     if (ret<=0) {
77     #ifdef ERR_INJ_DEBUG
78     - printk("Virtual address %lx is not existing.\n",virt_addr);
79     + printk("Virtual address %llx is not existing.\n", virt_addr);
80     #endif
81     return -EINVAL;
82     }
83     @@ -163,7 +163,7 @@ show_err_data_buffer(struct device *dev,
84     {
85     unsigned int cpu=dev->id;
86    
87     - return sprintf(buf, "%lx, %lx, %lx\n",
88     + return sprintf(buf, "%llx, %llx, %llx\n",
89     err_data_buffer[cpu].data1,
90     err_data_buffer[cpu].data2,
91     err_data_buffer[cpu].data3);
92     @@ -178,13 +178,13 @@ store_err_data_buffer(struct device *dev,
93     int ret;
94    
95     #ifdef ERR_INJ_DEBUG
96     - printk("write err_data_buffer=[%lx,%lx,%lx] on cpu%d\n",
97     + printk("write err_data_buffer=[%llx,%llx,%llx] on cpu%d\n",
98     err_data_buffer[cpu].data1,
99     err_data_buffer[cpu].data2,
100     err_data_buffer[cpu].data3,
101     cpu);
102     #endif
103     - ret=sscanf(buf, "%lx, %lx, %lx",
104     + ret = sscanf(buf, "%llx, %llx, %llx",
105     &err_data_buffer[cpu].data1,
106     &err_data_buffer[cpu].data2,
107     &err_data_buffer[cpu].data3);
108     diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
109     index bf2cb9294795c..d96c68122eae0 100644
110     --- a/arch/ia64/kernel/mca.c
111     +++ b/arch/ia64/kernel/mca.c
112     @@ -1851,7 +1851,7 @@ ia64_mca_cpu_init(void *cpu_data)
113     data = mca_bootmem();
114     first_time = 0;
115     } else
116     - data = (void *)__get_free_pages(GFP_KERNEL,
117     + data = (void *)__get_free_pages(GFP_ATOMIC,
118     get_order(sz));
119     if (!data)
120     panic("Could not allocate MCA memory for cpu %d\n",
121     diff --git a/arch/x86/Makefile b/arch/x86/Makefile
122     index 8ca3cf7c5ec97..59942e349e5f0 100644
123     --- a/arch/x86/Makefile
124     +++ b/arch/x86/Makefile
125     @@ -34,7 +34,7 @@ M16_CFLAGS := $(call cc-option, -m16, $(CODE16GCC_CFLAGS))
126     REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os -DDISABLE_BRANCH_PROFILING \
127     -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
128     -fno-strict-aliasing -fomit-frame-pointer -fno-pic \
129     - -mno-mmx -mno-sse
130     + -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
131    
132     REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding)
133     REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
134     diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
135     index 18936533666e3..6e884f17634fe 100644
136     --- a/arch/x86/net/bpf_jit_comp.c
137     +++ b/arch/x86/net/bpf_jit_comp.c
138     @@ -1050,7 +1050,16 @@ emit_jmp:
139     }
140    
141     if (image) {
142     - if (unlikely(proglen + ilen > oldproglen)) {
143     + /*
144     + * When populating the image, assert that:
145     + *
146     + * i) We do not write beyond the allocated space, and
147     + * ii) addrs[i] did not change from the prior run, in order
148     + * to validate assumptions made for computing branch
149     + * displacements.
150     + */
151     + if (unlikely(proglen + ilen > oldproglen ||
152     + proglen + ilen != addrs[i])) {
153     pr_err("bpf_jit: fatal error\n");
154     return -EFAULT;
155     }
156     @@ -1118,7 +1127,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
157     extra_pass = true;
158     goto skip_init_addrs;
159     }
160     - addrs = kmalloc_array(prog->len + 1, sizeof(*addrs), GFP_KERNEL);
161     + addrs = kvmalloc_array(prog->len + 1, sizeof(*addrs), GFP_KERNEL);
162     if (!addrs) {
163     prog = orig_prog;
164     goto out_addrs;
165     @@ -1195,7 +1204,7 @@ out_image:
166     if (image)
167     bpf_prog_fill_jited_linfo(prog, addrs + 1);
168     out_addrs:
169     - kfree(addrs);
170     + kvfree(addrs);
171     kfree(jit_data);
172     prog->aux->jit_data = NULL;
173     }
174     diff --git a/arch/x86/net/bpf_jit_comp32.c b/arch/x86/net/bpf_jit_comp32.c
175     index 66cd150b7e541..0fcba32077c87 100644
176     --- a/arch/x86/net/bpf_jit_comp32.c
177     +++ b/arch/x86/net/bpf_jit_comp32.c
178     @@ -2278,7 +2278,16 @@ notyet:
179     }
180    
181     if (image) {
182     - if (unlikely(proglen + ilen > oldproglen)) {
183     + /*
184     + * When populating the image, assert that:
185     + *
186     + * i) We do not write beyond the allocated space, and
187     + * ii) addrs[i] did not change from the prior run, in order
188     + * to validate assumptions made for computing branch
189     + * displacements.
190     + */
191     + if (unlikely(proglen + ilen > oldproglen ||
192     + proglen + ilen != addrs[i])) {
193     pr_err("bpf_jit: fatal error\n");
194     return -EFAULT;
195     }
196     diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
197     index 3934ce3385ac3..f9ff6d433dfe1 100644
198     --- a/drivers/bus/ti-sysc.c
199     +++ b/drivers/bus/ti-sysc.c
200     @@ -2685,7 +2685,9 @@ static int sysc_remove(struct platform_device *pdev)
201    
202     pm_runtime_put_sync(&pdev->dev);
203     pm_runtime_disable(&pdev->dev);
204     - reset_control_assert(ddata->rsts);
205     +
206     + if (!reset_control_status(ddata->rsts))
207     + reset_control_assert(ddata->rsts);
208    
209     unprepare:
210     sysc_unprepare(ddata);
211     diff --git a/drivers/gpu/drm/msm/adreno/a5xx_power.c b/drivers/gpu/drm/msm/adreno/a5xx_power.c
212     index a3a06db675ba3..ee3ff32da0048 100644
213     --- a/drivers/gpu/drm/msm/adreno/a5xx_power.c
214     +++ b/drivers/gpu/drm/msm/adreno/a5xx_power.c
215     @@ -300,7 +300,7 @@ int a5xx_power_init(struct msm_gpu *gpu)
216     /* Set up the limits management */
217     if (adreno_is_a530(adreno_gpu))
218     a530_lm_setup(gpu);
219     - else
220     + else if (adreno_is_a540(adreno_gpu))
221     a540_lm_setup(gpu);
222    
223     /* Set up SP/TP power collpase */
224     diff --git a/drivers/gpu/drm/msm/msm_fence.c b/drivers/gpu/drm/msm/msm_fence.c
225     index ad2703698b052..cd59a59180385 100644
226     --- a/drivers/gpu/drm/msm/msm_fence.c
227     +++ b/drivers/gpu/drm/msm/msm_fence.c
228     @@ -45,7 +45,7 @@ int msm_wait_fence(struct msm_fence_context *fctx, uint32_t fence,
229     int ret;
230    
231     if (fence > fctx->last_fence) {
232     - DRM_ERROR("%s: waiting on invalid fence: %u (of %u)\n",
233     + DRM_ERROR_RATELIMITED("%s: waiting on invalid fence: %u (of %u)\n",
234     fctx->name, fence, fctx->last_fence);
235     return -EINVAL;
236     }
237     diff --git a/drivers/isdn/hardware/mISDN/mISDNipac.c b/drivers/isdn/hardware/mISDN/mISDNipac.c
238     index bca880213e919..51e3d45daaa78 100644
239     --- a/drivers/isdn/hardware/mISDN/mISDNipac.c
240     +++ b/drivers/isdn/hardware/mISDN/mISDNipac.c
241     @@ -694,7 +694,7 @@ isac_release(struct isac_hw *isac)
242     {
243     if (isac->type & IPAC_TYPE_ISACX)
244     WriteISAC(isac, ISACX_MASK, 0xff);
245     - else
246     + else if (isac->type != 0)
247     WriteISAC(isac, ISAC_MASK, 0xff);
248     if (isac->dch.timer.function != NULL) {
249     del_timer(&isac->dch.timer);
250     diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
251     index 51b77c2de400a..235bbb2940a88 100644
252     --- a/drivers/net/ethernet/marvell/pxa168_eth.c
253     +++ b/drivers/net/ethernet/marvell/pxa168_eth.c
254     @@ -1554,8 +1554,8 @@ static int pxa168_eth_remove(struct platform_device *pdev)
255    
256     mdiobus_unregister(pep->smi_bus);
257     mdiobus_free(pep->smi_bus);
258     - unregister_netdev(dev);
259     cancel_work_sync(&pep->tx_timeout_task);
260     + unregister_netdev(dev);
261     free_netdev(dev);
262     return 0;
263     }
264     diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
265     index 8b8581f71e793..36b9a364ef26b 100644
266     --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
267     +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
268     @@ -2365,8 +2365,9 @@ static u8 mlx5e_build_icosq_log_wq_sz(struct mlx5e_params *params,
269     {
270     switch (params->rq_wq_type) {
271     case MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ:
272     - return order_base_2(MLX5E_UMR_WQEBBS) +
273     - mlx5e_get_rq_log_wq_sz(rqp->rqc);
274     + return max_t(u8, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE,
275     + order_base_2(MLX5E_UMR_WQEBBS) +
276     + mlx5e_get_rq_log_wq_sz(rqp->rqc));
277     default: /* MLX5_WQ_TYPE_CYCLIC */
278     return MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE;
279     }
280     diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
281     index 0ac0bd4c65c4c..207a88ea10f38 100644
282     --- a/drivers/nvme/host/multipath.c
283     +++ b/drivers/nvme/host/multipath.c
284     @@ -330,7 +330,7 @@ static blk_qc_t nvme_ns_head_make_request(struct request_queue *q,
285     trace_block_bio_remap(bio->bi_disk->queue, bio,
286     disk_devt(ns->head->disk),
287     bio->bi_iter.bi_sector);
288     - ret = direct_make_request(bio);
289     + ret = generic_make_request(bio);
290     } else if (nvme_available_path(head)) {
291     dev_warn_ratelimited(dev, "no usable path - requeuing I/O\n");
292    
293     diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
294     index ad1399dcb21f5..164bebbfea214 100644
295     --- a/drivers/platform/x86/intel-hid.c
296     +++ b/drivers/platform/x86/intel-hid.c
297     @@ -84,6 +84,13 @@ static const struct dmi_system_id button_array_table[] = {
298     DMI_MATCH(DMI_PRODUCT_NAME, "HP Spectre x2 Detachable"),
299     },
300     },
301     + {
302     + .ident = "Lenovo ThinkPad X1 Tablet Gen 2",
303     + .matches = {
304     + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
305     + DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Tablet Gen 2"),
306     + },
307     + },
308     { }
309     };
310    
311     diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
312     index 8c54d3707fba3..e8257de495fd3 100644
313     --- a/drivers/platform/x86/thinkpad_acpi.c
314     +++ b/drivers/platform/x86/thinkpad_acpi.c
315     @@ -4089,13 +4089,19 @@ static bool hotkey_notify_6xxx(const u32 hkey,
316    
317     case TP_HKEY_EV_KEY_NUMLOCK:
318     case TP_HKEY_EV_KEY_FN:
319     - case TP_HKEY_EV_KEY_FN_ESC:
320     /* key press events, we just ignore them as long as the EC
321     * is still reporting them in the normal keyboard stream */
322     *send_acpi_ev = false;
323     *ignore_acpi_ev = true;
324     return true;
325    
326     + case TP_HKEY_EV_KEY_FN_ESC:
327     + /* Get the media key status to foce the status LED to update */
328     + acpi_evalf(hkey_handle, NULL, "GMKS", "v");
329     + *send_acpi_ev = false;
330     + *ignore_acpi_ev = true;
331     + return true;
332     +
333     case TP_HKEY_EV_TABLET_CHANGED:
334     tpacpi_input_send_tabletsw();
335     hotkey_tablet_mode_notify_change();
336     diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
337     index c9d92b3e777d9..5a047ce77bc0b 100644
338     --- a/drivers/target/target_core_pscsi.c
339     +++ b/drivers/target/target_core_pscsi.c
340     @@ -939,6 +939,14 @@ new_bio:
341    
342     return 0;
343     fail:
344     + if (bio)
345     + bio_put(bio);
346     + while (req->bio) {
347     + bio = req->bio;
348     + req->bio = bio->bi_next;
349     + bio_put(bio);
350     + }
351     + req->biotail = NULL;
352     return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
353     }
354    
355     diff --git a/fs/cifs/file.c b/fs/cifs/file.c
356     index 31d578739341b..1aac8d38f887d 100644
357     --- a/fs/cifs/file.c
358     +++ b/fs/cifs/file.c
359     @@ -164,6 +164,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode,
360     goto posix_open_ret;
361     }
362     } else {
363     + cifs_revalidate_mapping(*pinode);
364     cifs_fattr_to_inode(*pinode, &fattr);
365     }
366    
367     diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
368     index 7d875a47d0226..7177720e822e1 100644
369     --- a/fs/cifs/smb2misc.c
370     +++ b/fs/cifs/smb2misc.c
371     @@ -738,8 +738,8 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
372     }
373     }
374     spin_unlock(&cifs_tcp_ses_lock);
375     - cifs_dbg(FYI, "Can not process oplock break for non-existent connection\n");
376     - return false;
377     + cifs_dbg(FYI, "No file id matched, oplock break ignored\n");
378     + return true;
379     }
380    
381     void
382     diff --git a/init/Kconfig b/init/Kconfig
383     index 96fc45d1b686b..4f9fd78e2200b 100644
384     --- a/init/Kconfig
385     +++ b/init/Kconfig
386     @@ -76,8 +76,7 @@ config INIT_ENV_ARG_LIMIT
387    
388     config COMPILE_TEST
389     bool "Compile also drivers which will not load"
390     - depends on !UML
391     - default n
392     + depends on HAS_IOMEM
393     help
394     Some drivers can be compiled on a different platform than they are
395     intended to be run on. Despite they cannot be loaded there (or even
396     diff --git a/net/mac80211/main.c b/net/mac80211/main.c
397     index 3e8561c3b0e7b..5b3189a376802 100644
398     --- a/net/mac80211/main.c
399     +++ b/net/mac80211/main.c
400     @@ -954,8 +954,19 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
401     continue;
402    
403     if (!dflt_chandef.chan) {
404     + /*
405     + * Assign the first enabled channel to dflt_chandef
406     + * from the list of channels
407     + */
408     + for (i = 0; i < sband->n_channels; i++)
409     + if (!(sband->channels[i].flags &
410     + IEEE80211_CHAN_DISABLED))
411     + break;
412     + /* if none found then use the first anyway */
413     + if (i == sband->n_channels)
414     + i = 0;
415     cfg80211_chandef_create(&dflt_chandef,
416     - &sband->channels[0],
417     + &sband->channels[i],
418     NL80211_CHAN_NO_HT);
419     /* init channel we're on */
420     if (!local->use_chanctx && !local->_oper_chandef.chan) {
421     diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c
422     index 5b05487a60d21..db11e403d8187 100644
423     --- a/net/netfilter/nf_conntrack_proto_gre.c
424     +++ b/net/netfilter/nf_conntrack_proto_gre.c
425     @@ -218,9 +218,6 @@ int nf_conntrack_gre_packet(struct nf_conn *ct,
426     enum ip_conntrack_info ctinfo,
427     const struct nf_hook_state *state)
428     {
429     - if (state->pf != NFPROTO_IPV4)
430     - return -NF_ACCEPT;
431     -
432     if (!nf_ct_is_confirmed(ct)) {
433     unsigned int *timeouts = nf_ct_timeout_lookup(ct);
434