diff options
author | Jeremy Cline <jcline@redhat.com> | 2019-12-04 13:38:43 -0500 |
---|---|---|
committer | Jeremy Cline <jcline@redhat.com> | 2019-12-04 13:38:43 -0500 |
commit | 079e0f545a491903a6acb0dc783d162ae84a2e6c (patch) | |
tree | 7a030bec812ab5e3e50079ebf0015ce8504a5b3e /0001-ath9k_htc-release-allocated-buffer-if-timed-out.patch | |
parent | c1e2dca7bf02f21854445669ab48f82dead65dfc (diff) | |
download | kernel-079e0f545a491903a6acb0dc783d162ae84a2e6c.tar.gz kernel-079e0f545a491903a6acb0dc783d162ae84a2e6c.tar.xz kernel-079e0f545a491903a6acb0dc783d162ae84a2e6c.zip |
Sync up stabilization with f31
Diffstat (limited to '0001-ath9k_htc-release-allocated-buffer-if-timed-out.patch')
-rw-r--r-- | 0001-ath9k_htc-release-allocated-buffer-if-timed-out.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/0001-ath9k_htc-release-allocated-buffer-if-timed-out.patch b/0001-ath9k_htc-release-allocated-buffer-if-timed-out.patch new file mode 100644 index 000000000..0d21d61c7 --- /dev/null +++ b/0001-ath9k_htc-release-allocated-buffer-if-timed-out.patch @@ -0,0 +1,46 @@ +From 853acf7caf10b828102d92d05b5c101666a6142b Mon Sep 17 00:00:00 2001 +From: Navid Emamdoost <navid.emamdoost@gmail.com> +Date: Fri, 6 Sep 2019 13:26:03 -0500 +Subject: [PATCH] ath9k_htc: release allocated buffer if timed out + +In htc_config_pipe_credits, htc_setup_complete, and htc_connect_service +if time out happens, the allocated buffer needs to be released. +Otherwise there will be memory leak. + +Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + drivers/net/wireless/ath/ath9k/htc_hst.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c +index 1bf63a4efb4c..d091c8ebdcf0 100644 +--- a/drivers/net/wireless/ath/ath9k/htc_hst.c ++++ b/drivers/net/wireless/ath/ath9k/htc_hst.c +@@ -170,6 +170,7 @@ static int htc_config_pipe_credits(struct htc_target *target) + time_left = wait_for_completion_timeout(&target->cmd_wait, HZ); + if (!time_left) { + dev_err(target->dev, "HTC credit config timeout\n"); ++ kfree_skb(skb); + return -ETIMEDOUT; + } + +@@ -205,6 +206,7 @@ static int htc_setup_complete(struct htc_target *target) + time_left = wait_for_completion_timeout(&target->cmd_wait, HZ); + if (!time_left) { + dev_err(target->dev, "HTC start timeout\n"); ++ kfree_skb(skb); + return -ETIMEDOUT; + } + +@@ -277,6 +279,7 @@ int htc_connect_service(struct htc_target *target, + if (!time_left) { + dev_err(target->dev, "Service connection timeout for: %d\n", + service_connreq->service_id); ++ kfree_skb(skb); + return -ETIMEDOUT; + } + +-- +2.23.0 + |