commit:     afc259e522958b1fad1850233f82662881910da5
Author:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 16 11:19:18 2021 +0000
Commit:     Mike Pagano <mpagano <AT> gentoo <DOT> org>
CommitDate: Thu Sep 16 11:19:18 2021 +0000
URL:        https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=afc259e5

Linux patch 5.4.147

Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>

 0000_README              |  4 ++
 1146_linux-5.4.147.patch | 97 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 101 insertions(+)

diff --git a/0000_README b/0000_README
index f0cfe0c..4d2be88 100644
--- a/0000_README
+++ b/0000_README
@@ -627,6 +627,10 @@ Patch:  1145_linux-5.4.146.patch
 From:   http://www.kernel.org
 Desc:   Linux 5.4.146
 
+Patch:  1146_linux-5.4.147.patch
+From:   http://www.kernel.org
+Desc:   Linux 5.4.147
+
 Patch:  1500_XATTR_USER_PREFIX.patch
 From:   https://bugs.gentoo.org/show_bug.cgi?id=470644
 Desc:   Support for namespace user.pax.* on tmpfs.

diff --git a/1146_linux-5.4.147.patch b/1146_linux-5.4.147.patch
new file mode 100644
index 0000000..472a6d8
--- /dev/null
+++ b/1146_linux-5.4.147.patch
@@ -0,0 +1,97 @@
+diff --git a/Makefile b/Makefile
+index 48d0c03acfc55..98227dae34947 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0
+ VERSION = 5
+ PATCHLEVEL = 4
+-SUBLEVEL = 146
++SUBLEVEL = 147
+ EXTRAVERSION =
+ NAME = Kleptomaniac Octopus
+ 
+diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
+index bc3ab98855cf0..25e81b1a59a54 100644
+--- a/drivers/block/nbd.c
++++ b/drivers/block/nbd.c
+@@ -1744,17 +1744,7 @@ static int nbd_dev_add(int index)
+       refcount_set(&nbd->refs, 1);
+       INIT_LIST_HEAD(&nbd->list);
+       disk->major = NBD_MAJOR;
+-
+-      /* Too big first_minor can cause duplicate creation of
+-       * sysfs files/links, since first_minor will be truncated to
+-       * byte in __device_add_disk().
+-       */
+       disk->first_minor = index << part_shift;
+-      if (disk->first_minor > 0xff) {
+-              err = -EINVAL;
+-              goto out_free_idr;
+-      }
+-
+       disk->fops = &nbd_fops;
+       disk->private_data = nbd;
+       sprintf(disk->disk_name, "nbd%d", index);
+diff --git a/include/linux/time64.h b/include/linux/time64.h
+index f6059c505986b..5eab3f2635186 100644
+--- a/include/linux/time64.h
++++ b/include/linux/time64.h
+@@ -33,9 +33,7 @@ struct itimerspec64 {
+ #define TIME64_MIN                    (-TIME64_MAX - 1)
+ 
+ #define KTIME_MAX                     ((s64)~((u64)1 << 63))
+-#define KTIME_MIN                     (-KTIME_MAX - 1)
+ #define KTIME_SEC_MAX                 (KTIME_MAX / NSEC_PER_SEC)
+-#define KTIME_SEC_MIN                 (KTIME_MIN / NSEC_PER_SEC)
+ 
+ /*
+  * Limits for settimeofday():
+@@ -134,13 +132,10 @@ static inline bool timespec64_valid_settod(const struct 
timespec64 *ts)
+  */
+ static inline s64 timespec64_to_ns(const struct timespec64 *ts)
+ {
+-      /* Prevent multiplication overflow / underflow */
+-      if (ts->tv_sec >= KTIME_SEC_MAX)
++      /* Prevent multiplication overflow */
++      if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX)
+               return KTIME_MAX;
+ 
+-      if (ts->tv_sec <= KTIME_SEC_MIN)
+-              return KTIME_MIN;
+-
+       return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec;
+ }
+ 
+diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
+index 30e061b210b7c..eacb0ca301932 100644
+--- a/kernel/time/posix-cpu-timers.c
++++ b/kernel/time/posix-cpu-timers.c
+@@ -1201,6 +1201,8 @@ void set_process_cpu_timer(struct task_struct *tsk, 
unsigned int clkid,
+                       }
+               }
+ 
++              if (!*newval)
++                      return;
+               *newval += now;
+       }
+ 
+diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
+index bdd330527cfa2..c50e3e8afbd34 100644
+--- a/net/bluetooth/hci_core.c
++++ b/net/bluetooth/hci_core.c
+@@ -1691,14 +1691,6 @@ int hci_dev_do_close(struct hci_dev *hdev)
+       hci_request_cancel_all(hdev);
+       hci_req_sync_lock(hdev);
+ 
+-      if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
+-          !hci_dev_test_flag(hdev, HCI_USER_CHANNEL) &&
+-          test_bit(HCI_UP, &hdev->flags)) {
+-              /* Execute vendor specific shutdown routine */
+-              if (hdev->shutdown)
+-                      hdev->shutdown(hdev);
+-      }
+-
+       if (!test_and_clear_bit(HCI_UP, &hdev->flags)) {
+               cancel_delayed_work_sync(&hdev->cmd_timer);
+               hci_req_sync_unlock(hdev);

Reply via email to