Magellan Linux

Contents of /trunk/kernel-alx/patches-5.4/0246-5.4.147-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3635 - (show annotations) (download)
Mon Oct 24 12:34:12 2022 UTC (19 months ago) by niro
File size: 2926 byte(s)
-sync kernel patches
1 diff --git a/Makefile b/Makefile
2 index 48d0c03acfc55..98227dae34947 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 = 146
10 +SUBLEVEL = 147
11 EXTRAVERSION =
12 NAME = Kleptomaniac Octopus
13
14 diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
15 index bc3ab98855cf0..25e81b1a59a54 100644
16 --- a/drivers/block/nbd.c
17 +++ b/drivers/block/nbd.c
18 @@ -1744,17 +1744,7 @@ static int nbd_dev_add(int index)
19 refcount_set(&nbd->refs, 1);
20 INIT_LIST_HEAD(&nbd->list);
21 disk->major = NBD_MAJOR;
22 -
23 - /* Too big first_minor can cause duplicate creation of
24 - * sysfs files/links, since first_minor will be truncated to
25 - * byte in __device_add_disk().
26 - */
27 disk->first_minor = index << part_shift;
28 - if (disk->first_minor > 0xff) {
29 - err = -EINVAL;
30 - goto out_free_idr;
31 - }
32 -
33 disk->fops = &nbd_fops;
34 disk->private_data = nbd;
35 sprintf(disk->disk_name, "nbd%d", index);
36 diff --git a/include/linux/time64.h b/include/linux/time64.h
37 index f6059c505986b..5eab3f2635186 100644
38 --- a/include/linux/time64.h
39 +++ b/include/linux/time64.h
40 @@ -33,9 +33,7 @@ struct itimerspec64 {
41 #define TIME64_MIN (-TIME64_MAX - 1)
42
43 #define KTIME_MAX ((s64)~((u64)1 << 63))
44 -#define KTIME_MIN (-KTIME_MAX - 1)
45 #define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC)
46 -#define KTIME_SEC_MIN (KTIME_MIN / NSEC_PER_SEC)
47
48 /*
49 * Limits for settimeofday():
50 @@ -134,13 +132,10 @@ static inline bool timespec64_valid_settod(const struct timespec64 *ts)
51 */
52 static inline s64 timespec64_to_ns(const struct timespec64 *ts)
53 {
54 - /* Prevent multiplication overflow / underflow */
55 - if (ts->tv_sec >= KTIME_SEC_MAX)
56 + /* Prevent multiplication overflow */
57 + if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX)
58 return KTIME_MAX;
59
60 - if (ts->tv_sec <= KTIME_SEC_MIN)
61 - return KTIME_MIN;
62 -
63 return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec;
64 }
65
66 diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
67 index 30e061b210b7c..eacb0ca301932 100644
68 --- a/kernel/time/posix-cpu-timers.c
69 +++ b/kernel/time/posix-cpu-timers.c
70 @@ -1201,6 +1201,8 @@ void set_process_cpu_timer(struct task_struct *tsk, unsigned int clkid,
71 }
72 }
73
74 + if (!*newval)
75 + return;
76 *newval += now;
77 }
78
79 diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
80 index bdd330527cfa2..c50e3e8afbd34 100644
81 --- a/net/bluetooth/hci_core.c
82 +++ b/net/bluetooth/hci_core.c
83 @@ -1691,14 +1691,6 @@ int hci_dev_do_close(struct hci_dev *hdev)
84 hci_request_cancel_all(hdev);
85 hci_req_sync_lock(hdev);
86
87 - if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
88 - !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
89 - test_bit(HCI_UP, &hdev->flags)) {
90 - /* Execute vendor specific shutdown routine */
91 - if (hdev->shutdown)
92 - hdev->shutdown(hdev);
93 - }
94 -
95 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) {
96 cancel_delayed_work_sync(&hdev->cmd_timer);
97 hci_req_sync_unlock(hdev);