From: Greg Kroah-Hartman Date: Mon, 4 Jan 2021 10:31:04 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.19.165~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b289ede69b2479d7b62bdf886b1742650d90b60;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: uapi-move-constants-from-linux-kernel.h-to-linux-const.h.patch --- diff --git a/queue-4.4/series b/queue-4.4/series index d3c99afd7c7..02c8d84d238 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -8,3 +8,4 @@ s390-smp-use-smp_get_base_cpu-helper-function.patch s390-smp-perform-initial-cpu-reset-also-for-smt-sibl.patch s390-dasd-fix-hanging-device-offline-processing.patch usb-serial-digi_acceleport-fix-write-wakeup-deadlock.patch +uapi-move-constants-from-linux-kernel.h-to-linux-const.h.patch diff --git a/queue-4.4/uapi-move-constants-from-linux-kernel.h-to-linux-const.h.patch b/queue-4.4/uapi-move-constants-from-linux-kernel.h-to-linux-const.h.patch new file mode 100644 index 00000000000..06c1e5015c4 --- /dev/null +++ b/queue-4.4/uapi-move-constants-from-linux-kernel.h-to-linux-const.h.patch @@ -0,0 +1,104 @@ +From a85cbe6159ffc973e5702f70a3bd5185f8f3c38d Mon Sep 17 00:00:00 2001 +From: Petr Vorel +Date: Mon, 14 Dec 2020 19:03:21 -0800 +Subject: uapi: move constants from to + +From: Petr Vorel + +commit a85cbe6159ffc973e5702f70a3bd5185f8f3c38d upstream. + +and include in UAPI headers instead of . + +The reason is to avoid indirect include when using +some network headers: or others -> +-> . + +This indirect include causes on MUSL redefinition of struct sysinfo when +included both and some of UAPI headers: + + In file included from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/kernel.h:5, + from x86_64-buildroot-linux-musl/sysroot/usr/include/linux/netlink.h:5, + from ../include/tst_netlink.h:14, + from tst_crypto.c:13: + x86_64-buildroot-linux-musl/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of `struct sysinfo' + struct sysinfo { + ^~~~~~~ + In file included from ../include/tst_safe_macros.h:15, + from ../include/tst_test.h:93, + from tst_crypto.c:11: + x86_64-buildroot-linux-musl/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here + +Link: https://lkml.kernel.org/r/20201015190013.8901-1-petr.vorel@gmail.com +Signed-off-by: Petr Vorel +Suggested-by: Rich Felker +Acked-by: Rich Felker +Cc: Peter Korsgaard +Cc: Baruch Siach +Cc: Florian Weimer +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + include/uapi/linux/const.h | 5 +++++ + include/uapi/linux/lightnvm.h | 2 +- + include/uapi/linux/netfilter/x_tables.h | 2 +- + include/uapi/linux/netlink.h | 2 +- + include/uapi/linux/sysctl.h | 2 +- + 5 files changed, 9 insertions(+), 4 deletions(-) + +--- a/include/uapi/linux/const.h ++++ b/include/uapi/linux/const.h +@@ -24,4 +24,9 @@ + #define _BITUL(x) (_AC(1,UL) << (x)) + #define _BITULL(x) (_AC(1,ULL) << (x)) + ++#define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) ++#define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) ++ ++#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ++ + #endif /* !(_LINUX_CONST_H) */ +--- a/include/uapi/linux/lightnvm.h ++++ b/include/uapi/linux/lightnvm.h +@@ -20,7 +20,7 @@ + #define _UAPI_LINUX_LIGHTNVM_H + + #ifdef __KERNEL__ +-#include ++#include + #include + #else /* __KERNEL__ */ + #include +--- a/include/uapi/linux/netfilter/x_tables.h ++++ b/include/uapi/linux/netfilter/x_tables.h +@@ -1,6 +1,6 @@ + #ifndef _UAPI_X_TABLES_H + #define _UAPI_X_TABLES_H +-#include ++#include + #include + + #define XT_FUNCTION_MAXNAMELEN 30 +--- a/include/uapi/linux/netlink.h ++++ b/include/uapi/linux/netlink.h +@@ -1,7 +1,7 @@ + #ifndef _UAPI__LINUX_NETLINK_H + #define _UAPI__LINUX_NETLINK_H + +-#include ++#include + #include /* for __kernel_sa_family_t */ + #include + +--- a/include/uapi/linux/sysctl.h ++++ b/include/uapi/linux/sysctl.h +@@ -22,7 +22,7 @@ + #ifndef _UAPI_LINUX_SYSCTL_H + #define _UAPI_LINUX_SYSCTL_H + +-#include ++#include + #include + #include + diff --git a/queue-4.4/usb-serial-digi_acceleport-fix-write-wakeup-deadlock.patch b/queue-4.4/usb-serial-digi_acceleport-fix-write-wakeup-deadlock.patch index 6ef9d03a9b5..ea15dfb8561 100644 --- a/queue-4.4/usb-serial-digi_acceleport-fix-write-wakeup-deadlock.patch +++ b/queue-4.4/usb-serial-digi_acceleport-fix-write-wakeup-deadlock.patch @@ -21,12 +21,11 @@ Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman --- - drivers/usb/serial/digi_acceleport.c | 45 ++++++++-------------------- + drivers/usb/serial/digi_acceleport.c | 45 ++++++++++------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) -diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c -index be93b9ff2d989..b630048c49883 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -23,7 +23,6 @@ @@ -79,7 +78,7 @@ index be93b9ff2d989..b630048c49883 100644 /* * Digi Write OOB Command * -@@ -986,6 +963,7 @@ static void digi_write_bulk_callback(struct urb *urb) +@@ -986,6 +963,7 @@ static void digi_write_bulk_callback(str struct digi_serial *serial_priv; int ret = 0; int status = urb->status; @@ -87,7 +86,7 @@ index be93b9ff2d989..b630048c49883 100644 /* port and serial sanity check */ if (port == NULL || (priv = usb_get_serial_port_data(port)) == NULL) { -@@ -1012,6 +990,7 @@ static void digi_write_bulk_callback(struct urb *urb) +@@ -1012,6 +990,7 @@ static void digi_write_bulk_callback(str } /* try to send any buffered data on this port */ @@ -95,7 +94,7 @@ index be93b9ff2d989..b630048c49883 100644 spin_lock(&priv->dp_port_lock); priv->dp_write_urb_in_use = 0; if (priv->dp_out_buf_len > 0) { -@@ -1027,19 +1006,18 @@ static void digi_write_bulk_callback(struct urb *urb) +@@ -1027,19 +1006,18 @@ static void digi_write_bulk_callback(str if (ret == 0) { priv->dp_write_urb_in_use = 1; priv->dp_out_buf_len = 0; @@ -120,7 +119,7 @@ index be93b9ff2d989..b630048c49883 100644 } static int digi_write_room(struct tty_struct *tty) -@@ -1239,7 +1217,6 @@ static int digi_port_init(struct usb_serial_port *port, unsigned port_num) +@@ -1239,7 +1217,6 @@ static int digi_port_init(struct usb_ser init_waitqueue_head(&priv->dp_transmit_idle_wait); init_waitqueue_head(&priv->dp_flush_wait); init_waitqueue_head(&priv->dp_close_wait); @@ -128,7 +127,7 @@ index be93b9ff2d989..b630048c49883 100644 priv->dp_port = port; init_waitqueue_head(&port->write_wait); -@@ -1525,13 +1502,14 @@ static int digi_read_oob_callback(struct urb *urb) +@@ -1525,13 +1502,14 @@ static int digi_read_oob_callback(struct rts = tty->termios.c_cflag & CRTSCTS; if (tty && opcode == DIGI_CMD_READ_INPUT_SIGNALS) { @@ -145,7 +144,7 @@ index be93b9ff2d989..b630048c49883 100644 } else { priv->dp_modem_signals &= ~TIOCM_CTS; /* port must be open to use tty struct */ -@@ -1550,6 +1528,9 @@ static int digi_read_oob_callback(struct urb *urb) +@@ -1550,6 +1528,9 @@ static int digi_read_oob_callback(struct priv->dp_modem_signals &= ~TIOCM_CD; spin_unlock(&priv->dp_port_lock); @@ -155,6 +154,3 @@ index be93b9ff2d989..b630048c49883 100644 } else if (opcode == DIGI_CMD_TRANSMIT_IDLE) { spin_lock(&priv->dp_port_lock); priv->dp_transmit_idle = 1; --- -2.27.0 -