]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.14
authorSasha Levin <sashal@kernel.org>
Mon, 30 Mar 2020 16:24:30 +0000 (12:24 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 30 Mar 2020 16:24:30 +0000 (12:24 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.14/afs-fix-some-tracing-details.patch [new file with mode: 0644]
queue-4.14/input-raydium_i2c_ts-fix-error-codes-in-raydium_i2c_.patch [new file with mode: 0644]
queue-4.14/input-raydium_i2c_ts-use-true-and-false-for-boolean-.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/afs-fix-some-tracing-details.patch b/queue-4.14/afs-fix-some-tracing-details.patch
new file mode 100644 (file)
index 0000000..11b15c2
--- /dev/null
@@ -0,0 +1,62 @@
+From 83dc24606a7bef315152de29133118a50c1483fe Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 13 Mar 2020 13:36:01 +0000
+Subject: afs: Fix some tracing details
+
+From: David Howells <dhowells@redhat.com>
+
+[ Upstream commit 4636cf184d6d9a92a56c2554681ea520dd4fe49a ]
+
+Fix a couple of tracelines to indicate the usage count after the atomic op,
+not the usage count before it to be consistent with other afs and rxrpc
+trace lines.
+
+Change the wording of the afs_call_trace_work trace ID label from "WORK" to
+"QUEUE" to reflect the fact that it's queueing work, not doing work.
+
+Fixes: 341f741f04be ("afs: Refcount the afs_call struct")
+Signed-off-by: David Howells <dhowells@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/afs/rxrpc.c             | 4 ++--
+ include/trace/events/afs.h | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
+index ccc9c708a860a..7dc9c78a1c31c 100644
+--- a/fs/afs/rxrpc.c
++++ b/fs/afs/rxrpc.c
+@@ -173,7 +173,7 @@ void afs_put_call(struct afs_call *call)
+       int n = atomic_dec_return(&call->usage);
+       int o = atomic_read(&afs_outstanding_calls);
+-      trace_afs_call(call, afs_call_trace_put, n + 1, o,
++      trace_afs_call(call, afs_call_trace_put, n, o,
+                      __builtin_return_address(0));
+       ASSERTCMP(n, >=, 0);
+@@ -619,7 +619,7 @@ static void afs_wake_up_async_call(struct sock *sk, struct rxrpc_call *rxcall,
+       u = __atomic_add_unless(&call->usage, 1, 0);
+       if (u != 0) {
+-              trace_afs_call(call, afs_call_trace_wake, u,
++              trace_afs_call(call, afs_call_trace_wake, u + 1,
+                              atomic_read(&afs_outstanding_calls),
+                              __builtin_return_address(0));
+diff --git a/include/trace/events/afs.h b/include/trace/events/afs.h
+index 8b95c16b70454..0978bdae2243b 100644
+--- a/include/trace/events/afs.h
++++ b/include/trace/events/afs.h
+@@ -40,7 +40,7 @@ enum afs_call_trace {
+       EM(afs_call_trace_free,                 "FREE ") \
+       EM(afs_call_trace_put,                  "PUT  ") \
+       EM(afs_call_trace_wake,                 "WAKE ") \
+-      E_(afs_call_trace_work,                 "WORK ")
++      E_(afs_call_trace_work,                 "QUEUE")
+ /*
+  * Export enum symbols via userspace.
+-- 
+2.20.1
+
diff --git a/queue-4.14/input-raydium_i2c_ts-fix-error-codes-in-raydium_i2c_.patch b/queue-4.14/input-raydium_i2c_ts-fix-error-codes-in-raydium_i2c_.patch
new file mode 100644 (file)
index 0000000..0a5e850
--- /dev/null
@@ -0,0 +1,61 @@
+From f10442494de0106773be649ddc0885c2f04fd758 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 6 Mar 2020 11:50:51 -0800
+Subject: Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+[ Upstream commit 32cf3a610c35cb21e3157f4bbf29d89960e30a36 ]
+
+These functions are supposed to return negative error codes but instead
+it returns true on failure and false on success.  The error codes are
+eventually propagated back to user space.
+
+Fixes: 48a2b783483b ("Input: add Raydium I2C touchscreen driver")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Link: https://lore.kernel.org/r/20200303101306.4potflz7na2nn3od@kili.mountain
+Cc: stable@vger.kernel.org
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/input/touchscreen/raydium_i2c_ts.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c
+index 172f66e9da2d1..7da44956555e5 100644
+--- a/drivers/input/touchscreen/raydium_i2c_ts.c
++++ b/drivers/input/touchscreen/raydium_i2c_ts.c
+@@ -441,7 +441,7 @@ static int raydium_i2c_write_object(struct i2c_client *client,
+       return 0;
+ }
+-static bool raydium_i2c_boot_trigger(struct i2c_client *client)
++static int raydium_i2c_boot_trigger(struct i2c_client *client)
+ {
+       static const u8 cmd[7][6] = {
+               { 0x08, 0x0C, 0x09, 0x00, 0x50, 0xD7 },
+@@ -466,10 +466,10 @@ static bool raydium_i2c_boot_trigger(struct i2c_client *client)
+               }
+       }
+-      return false;
++      return 0;
+ }
+-static bool raydium_i2c_fw_trigger(struct i2c_client *client)
++static int raydium_i2c_fw_trigger(struct i2c_client *client)
+ {
+       static const u8 cmd[5][11] = {
+               { 0, 0x09, 0x71, 0x0C, 0x09, 0x00, 0x50, 0xD7, 0, 0, 0 },
+@@ -492,7 +492,7 @@ static bool raydium_i2c_fw_trigger(struct i2c_client *client)
+               }
+       }
+-      return false;
++      return 0;
+ }
+ static int raydium_i2c_check_path(struct i2c_client *client)
+-- 
+2.20.1
+
diff --git a/queue-4.14/input-raydium_i2c_ts-use-true-and-false-for-boolean-.patch b/queue-4.14/input-raydium_i2c_ts-use-true-and-false-for-boolean-.patch
new file mode 100644 (file)
index 0000000..7b0ea4a
--- /dev/null
@@ -0,0 +1,46 @@
+From 63f8023e02918384e9e0881ab1959dd40ece6bca Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 6 Aug 2018 15:20:19 -0700
+Subject: Input: raydium_i2c_ts - use true and false for boolean values
+
+From: Gustavo A. R. Silva <gustavo@embeddedor.com>
+
+[ Upstream commit 6cad4e269e25dddd7260a53e9d9d90ba3a3cc35a ]
+
+Return statements in functions returning bool should use true or false
+instead of an integer value.
+
+This code was detected with the help of Coccinelle.
+
+Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/input/touchscreen/raydium_i2c_ts.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c
+index 4f1d3fd5d4121..172f66e9da2d1 100644
+--- a/drivers/input/touchscreen/raydium_i2c_ts.c
++++ b/drivers/input/touchscreen/raydium_i2c_ts.c
+@@ -466,7 +466,7 @@ static bool raydium_i2c_boot_trigger(struct i2c_client *client)
+               }
+       }
+-      return 0;
++      return false;
+ }
+ static bool raydium_i2c_fw_trigger(struct i2c_client *client)
+@@ -492,7 +492,7 @@ static bool raydium_i2c_fw_trigger(struct i2c_client *client)
+               }
+       }
+-      return 0;
++      return false;
+ }
+ static int raydium_i2c_check_path(struct i2c_client *client)
+-- 
+2.20.1
+
index df4a8db757b865bf0988bf30ba8cb3d940bea03a..94d217237aeb429c4a16899ae50f9375c9c342aa 100644 (file)
@@ -109,3 +109,6 @@ xfrm-policy-fix-doulbe-free-in-xfrm_policy_timer.patch
 netfilter-nft_fwd_netdev-validate-family-and-chain-type.patch
 netfilter-nft_fwd_netdev-allow-to-redirect-to-ifb-via-ingress.patch
 vti6-fix-memory-leak-of-skb-if-input-policy-check-fails.patch
+input-raydium_i2c_ts-use-true-and-false-for-boolean-.patch
+input-raydium_i2c_ts-fix-error-codes-in-raydium_i2c_.patch
+afs-fix-some-tracing-details.patch