]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Mar 2023 07:24:54 +0000 (08:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Mar 2023 07:24:54 +0000 (08:24 +0100)
added patches:
tipc-improve-function-tipc_wait_for_cond.patch

queue-4.14/series
queue-4.14/tipc-improve-function-tipc_wait_for_cond.patch [new file with mode: 0644]

index 68d0d0368e2fca60e79746e37fbb4b84a7360cc4..b9d078659a7fe90e5fb1861cb939c11fde3498a4 100644 (file)
@@ -16,3 +16,4 @@ macintosh-windfarm-use-unsigned-type-for-1-bit-bitfi.patch
 pci-add-solidrun-vendor-id.patch
 pci-avoid-flr-for-solidrun-snet-dpu-rev-1.patch
 media-ov5640-fix-analogue-gain-control.patch
+tipc-improve-function-tipc_wait_for_cond.patch
diff --git a/queue-4.14/tipc-improve-function-tipc_wait_for_cond.patch b/queue-4.14/tipc-improve-function-tipc_wait_for_cond.patch
new file mode 100644 (file)
index 0000000..45c0d5e
--- /dev/null
@@ -0,0 +1,38 @@
+From 223b7329ec6a0dae1b7f7db7b770e93f4a069ef9 Mon Sep 17 00:00:00 2001
+From: Tung Nguyen <tung.q.nguyen@dektech.com.au>
+Date: Tue, 19 Feb 2019 11:20:47 +0700
+Subject: tipc: improve function tipc_wait_for_cond()
+
+From: Tung Nguyen <tung.q.nguyen@dektech.com.au>
+
+commit 223b7329ec6a0dae1b7f7db7b770e93f4a069ef9 upstream.
+
+Commit 844cf763fba6 ("tipc: make macro tipc_wait_for_cond() smp safe")
+replaced finish_wait() with remove_wait_queue() but still used
+prepare_to_wait(). This causes unnecessary conditional
+checking  before adding to wait queue in prepare_to_wait().
+
+This commit replaces prepare_to_wait() with add_wait_queue()
+as the pair function with remove_wait_queue().
+
+Acked-by: Ying Xue <ying.xue@windriver.com>
+Acked-by: Jon Maloy <jon.maloy@ericsson.com>
+Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Cc: Lee Jones <lee@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/tipc/socket.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/tipc/socket.c
++++ b/net/tipc/socket.c
+@@ -373,7 +373,7 @@ static int tipc_sk_sock_err(struct socke
+               rc_ = tipc_sk_sock_err((sock_), timeo_);                       \
+               if (rc_)                                                       \
+                       break;                                                 \
+-              prepare_to_wait(sk_sleep(sk_), &wait_, TASK_INTERRUPTIBLE);    \
++              add_wait_queue(sk_sleep(sk_), &wait_);                         \
+               release_sock(sk_);                                             \
+               *(timeo_) = wait_woken(&wait_, TASK_INTERRUPTIBLE, *(timeo_)); \
+               sched_annotate_sleep();                                        \