* [PATCH][next] ath11k: add missing null check on allocated skb
@ 2020-12-14 23:24 ` Colin King
0 siblings, 0 replies; 11+ messages in thread
From: Colin King @ 2020-12-14 23:24 UTC (permalink / raw)
To: Kalle Valo, David S . Miller, Jakub Kicinski, Carl Huang, ath11k,
linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently the null check on a newly allocated skb is missing and
this can lead to a null pointer dereference is the allocation fails.
Fix this by adding a null check and returning -ENOMEM.
Addresses-Coverity: ("Dereference null return")
Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath11k/wmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index da4b546b62cb..c869ff479212 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -3460,6 +3460,8 @@ int ath11k_wmi_set_hw_mode(struct ath11k_base *ab,
len = sizeof(*cmd);
skb = ath11k_wmi_alloc_skb(wmi_ab, len);
+ if (!skb)
+ return -ENOMEM;
cmd = (struct wmi_pdev_set_hw_mode_cmd_param *)skb->data;
cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_PDEV_SET_HW_MODE_CMD) |
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH][next] ath11k: add missing null check on allocated skb
@ 2020-12-14 23:24 ` Colin King
0 siblings, 0 replies; 11+ messages in thread
From: Colin King @ 2020-12-14 23:24 UTC (permalink / raw)
To: Kalle Valo, David S . Miller, Jakub Kicinski, Carl Huang, ath11k,
linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently the null check on a newly allocated skb is missing and
this can lead to a null pointer dereference is the allocation fails.
Fix this by adding a null check and returning -ENOMEM.
Addresses-Coverity: ("Dereference null return")
Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath11k/wmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index da4b546b62cb..c869ff479212 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -3460,6 +3460,8 @@ int ath11k_wmi_set_hw_mode(struct ath11k_base *ab,
len = sizeof(*cmd);
skb = ath11k_wmi_alloc_skb(wmi_ab, len);
+ if (!skb)
+ return -ENOMEM;
cmd = (struct wmi_pdev_set_hw_mode_cmd_param *)skb->data;
cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_PDEV_SET_HW_MODE_CMD) |
--
2.29.2
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
2020-12-14 23:24 ` Colin King
(?)
@ 2020-12-17 6:36 ` Kalle Valo
2020-12-17 6:39 ` Kalle Valo
-1 siblings, 1 reply; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:36 UTC (permalink / raw)
To: Colin King
Cc: kernel-janitors, netdev, Carl Huang, linux-wireless,
linux-kernel, ath11k, Jakub Kicinski, David S . Miller
Colin King <colin.king@canonical.com> wrote:
> Currently the null check on a newly allocated skb is missing and
> this can lead to a null pointer dereference is the allocation fails.
> Fix this by adding a null check and returning -ENOMEM.
>
> Addresses-Coverity: ("Dereference null return")
> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-current branch of ath.git, thanks.
c86a36a621f2 ath11k: add missing null check on allocated skb
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201214232417.84556-1-colin.king@canonical.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
2020-12-14 23:24 ` Colin King
@ 2020-12-17 6:36 ` Kalle Valo
-1 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:36 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Jakub Kicinski, Carl Huang, ath11k,
linux-wireless, netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> Currently the null check on a newly allocated skb is missing and
> this can lead to a null pointer dereference is the allocation fails.
> Fix this by adding a null check and returning -ENOMEM.
>
> Addresses-Coverity: ("Dereference null return")
> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-current branch of ath.git, thanks.
c86a36a621f2 ath11k: add missing null check on allocated skb
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201214232417.84556-1-colin.king@canonical.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
@ 2020-12-17 6:36 ` Kalle Valo
0 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:36 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Jakub Kicinski, Carl Huang, ath11k,
linux-wireless, netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> Currently the null check on a newly allocated skb is missing and
> this can lead to a null pointer dereference is the allocation fails.
> Fix this by adding a null check and returning -ENOMEM.
>
> Addresses-Coverity: ("Dereference null return")
> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-current branch of ath.git, thanks.
c86a36a621f2 ath11k: add missing null check on allocated skb
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201214232417.84556-1-colin.king@canonical.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
2020-12-17 6:36 ` Kalle Valo
2020-12-17 6:39 ` Kalle Valo
@ 2020-12-17 6:39 ` Kalle Valo
0 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:39 UTC (permalink / raw)
To: Colin King
Cc: kernel-janitors, netdev, Carl Huang, linux-wireless,
linux-kernel, ath11k, Jakub Kicinski, David S . Miller
Kalle Valo <kvalo@codeaurora.org> writes:
> Colin King <colin.king@canonical.com> wrote:
>
>> Currently the null check on a newly allocated skb is missing and
>> this can lead to a null pointer dereference is the allocation fails.
>> Fix this by adding a null check and returning -ENOMEM.
>>
>> Addresses-Coverity: ("Dereference null return")
>> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> Patch applied to ath-current branch of ath.git, thanks.
>
> c86a36a621f2 ath11k: add missing null check on allocated skb
I did a mistake and that commit id will change, so please disregard
this. There will be a new mail soon.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
@ 2020-12-17 6:39 ` Kalle Valo
0 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:39 UTC (permalink / raw)
To: Colin King
Cc: kernel-janitors, netdev, Carl Huang, linux-wireless,
linux-kernel, David S . Miller, Jakub Kicinski, ath11k
Kalle Valo <kvalo@codeaurora.org> writes:
> Colin King <colin.king@canonical.com> wrote:
>
>> Currently the null check on a newly allocated skb is missing and
>> this can lead to a null pointer dereference is the allocation fails.
>> Fix this by adding a null check and returning -ENOMEM.
>>
>> Addresses-Coverity: ("Dereference null return")
>> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> Patch applied to ath-current branch of ath.git, thanks.
>
> c86a36a621f2 ath11k: add missing null check on allocated skb
I did a mistake and that commit id will change, so please disregard
this. There will be a new mail soon.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
@ 2020-12-17 6:39 ` Kalle Valo
0 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:39 UTC (permalink / raw)
To: Colin King
Cc: kernel-janitors, netdev, Carl Huang, linux-wireless,
linux-kernel, David S . Miller, Jakub Kicinski, ath11k
Kalle Valo <kvalo@codeaurora.org> writes:
> Colin King <colin.king@canonical.com> wrote:
>
>> Currently the null check on a newly allocated skb is missing and
>> this can lead to a null pointer dereference is the allocation fails.
>> Fix this by adding a null check and returning -ENOMEM.
>>
>> Addresses-Coverity: ("Dereference null return")
>> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> Patch applied to ath-current branch of ath.git, thanks.
>
> c86a36a621f2 ath11k: add missing null check on allocated skb
I did a mistake and that commit id will change, so please disregard
this. There will be a new mail soon.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
2020-12-14 23:24 ` Colin King
@ 2020-12-17 6:45 ` Kalle Valo
-1 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:45 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Jakub Kicinski, Carl Huang, ath11k,
linux-wireless, netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> Currently the null check on a newly allocated skb is missing and
> this can lead to a null pointer dereference is the allocation fails.
> Fix this by adding a null check and returning -ENOMEM.
>
> Addresses-Coverity: ("Dereference null return")
> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-current branch of ath.git, thanks.
292bff9480c8 ath11k: add missing null check on allocated skb
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201214232417.84556-1-colin.king@canonical.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
@ 2020-12-17 6:45 ` Kalle Valo
0 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:45 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Jakub Kicinski, Carl Huang, ath11k,
linux-wireless, netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> Currently the null check on a newly allocated skb is missing and
> this can lead to a null pointer dereference is the allocation fails.
> Fix this by adding a null check and returning -ENOMEM.
>
> Addresses-Coverity: ("Dereference null return")
> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-current branch of ath.git, thanks.
292bff9480c8 ath11k: add missing null check on allocated skb
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201214232417.84556-1-colin.king@canonical.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] ath11k: add missing null check on allocated skb
2020-12-14 23:24 ` Colin King
` (2 preceding siblings ...)
(?)
@ 2020-12-17 6:45 ` Kalle Valo
-1 siblings, 0 replies; 11+ messages in thread
From: Kalle Valo @ 2020-12-17 6:45 UTC (permalink / raw)
To: Colin King
Cc: kernel-janitors, netdev, Carl Huang, linux-wireless,
linux-kernel, ath11k, Jakub Kicinski, David S . Miller
Colin King <colin.king@canonical.com> wrote:
> Currently the null check on a newly allocated skb is missing and
> this can lead to a null pointer dereference is the allocation fails.
> Fix this by adding a null check and returning -ENOMEM.
>
> Addresses-Coverity: ("Dereference null return")
> Fixes: 43ed15e1ee01 ("ath11k: put hw to DBS using WMI_PDEV_SET_HW_MODE_CMDID")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-current branch of ath.git, thanks.
292bff9480c8 ath11k: add missing null check on allocated skb
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201214232417.84556-1-colin.king@canonical.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-12-17 6:47 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 23:24 [PATCH][next] ath11k: add missing null check on allocated skb Colin King
2020-12-14 23:24 ` Colin King
2020-12-17 6:36 ` Kalle Valo
2020-12-17 6:39 ` Kalle Valo
2020-12-17 6:39 ` Kalle Valo
2020-12-17 6:39 ` Kalle Valo
2020-12-17 6:36 ` Kalle Valo
2020-12-17 6:36 ` Kalle Valo
2020-12-17 6:45 ` Kalle Valo
2020-12-17 6:45 ` Kalle Valo
2020-12-17 6:45 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.