* [PATCH] ath11k: ensure ts.flags is initialized before bit-wise or'ing in values
@ 2019-12-21 0:40 ` Colin King
0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2019-12-21 0:40 UTC (permalink / raw)
To: Kalle Valo, David S . Miller, Anilkumar Kolli,
Manikanta Pubbisetty, Sven Eckelmann, Pradeep Kumar Chitrapu,
ath11k, linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently the structure ts is not inititalized and ts.flags contains
garbage values from the stack. This is being passed into function
ath11k_dp_tx_status_parse that bit-wise or'ing in settings into the
ts.flags field. To avoid flags (and other fields) from containing
garbage, initialize the structure to zero before use.
Addresses-Coverity: ("Uninitialized scalar variable)"
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath11k/dp_tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 918305dda106..04ad1a20e459 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -461,7 +461,7 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id)
int hal_ring_id = dp->tx_ring[ring_id].tcl_comp_ring.ring_id;
struct hal_srng *status_ring = &ab->hal.srng_list[hal_ring_id];
struct sk_buff *msdu;
- struct hal_tx_status ts;
+ struct hal_tx_status ts = { 0 };
struct dp_tx_ring *tx_ring = &dp->tx_ring[ring_id];
u32 *desc;
u32 msdu_id;
--
2.24.0
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ath11k: ensure ts.flags is initialized before bit-wise or'ing in values
@ 2019-12-21 0:40 ` Colin King
0 siblings, 0 replies; 5+ messages in thread
From: Colin King @ 2019-12-21 0:40 UTC (permalink / raw)
To: Kalle Valo, David S . Miller, Anilkumar Kolli,
Manikanta Pubbisetty, Sven Eckelmann, Pradeep Kumar Chitrapu,
ath11k, linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently the structure ts is not inititalized and ts.flags contains
garbage values from the stack. This is being passed into function
ath11k_dp_tx_status_parse that bit-wise or'ing in settings into the
ts.flags field. To avoid flags (and other fields) from containing
garbage, initialize the structure to zero before use.
Addresses-Coverity: ("Uninitialized scalar variable)"
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath11k/dp_tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 918305dda106..04ad1a20e459 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -461,7 +461,7 @@ void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id)
int hal_ring_id = dp->tx_ring[ring_id].tcl_comp_ring.ring_id;
struct hal_srng *status_ring = &ab->hal.srng_list[hal_ring_id];
struct sk_buff *msdu;
- struct hal_tx_status ts;
+ struct hal_tx_status ts = { 0 };
struct dp_tx_ring *tx_ring = &dp->tx_ring[ring_id];
u32 *desc;
u32 msdu_id;
--
2.24.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ath11k: ensure ts.flags is initialized before bit-wise or'ing in values
2019-12-21 0:40 ` Colin King
(?)
@ 2020-01-26 10:45 ` Kalle Valo
-1 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2020-01-26 10:45 UTC (permalink / raw)
To: Colin King
Cc: kernel-janitors, Pradeep Kumar Chitrapu, netdev, linux-wireless,
linux-kernel, Sven Eckelmann, ath11k, Manikanta Pubbisetty,
David S . Miller
Colin King <colin.king@canonical.com> wrote:
> Currently the structure ts is not inititalized and ts.flags contains
> garbage values from the stack. This is being passed into function
> ath11k_dp_tx_status_parse that bit-wise or'ing in settings into the
> ts.flags field. To avoid flags (and other fields) from containing
> garbage, initialize the structure to zero before use.
>
> Addresses-Coverity: ("Uninitialized scalar variable)"
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
eefca584140b ath11k: ensure ts.flags is initialized before bit-wise or'ing in values
--
https://patchwork.kernel.org/patch/11306545/
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] 5+ messages in thread
* Re: [PATCH] ath11k: ensure ts.flags is initialized before bit-wise or'ing in values
2019-12-21 0:40 ` Colin King
@ 2020-01-26 10:45 ` Kalle Valo
-1 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2020-01-26 10:45 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Anilkumar Kolli, Manikanta Pubbisetty,
Sven Eckelmann, Pradeep Kumar Chitrapu, ath11k, linux-wireless,
netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> Currently the structure ts is not inititalized and ts.flags contains
> garbage values from the stack. This is being passed into function
> ath11k_dp_tx_status_parse that bit-wise or'ing in settings into the
> ts.flags field. To avoid flags (and other fields) from containing
> garbage, initialize the structure to zero before use.
>
> Addresses-Coverity: ("Uninitialized scalar variable)"
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
eefca584140b ath11k: ensure ts.flags is initialized before bit-wise or'ing in values
--
https://patchwork.kernel.org/patch/11306545/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ath11k: ensure ts.flags is initialized before bit-wise or'ing in values
@ 2020-01-26 10:45 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2020-01-26 10:45 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Anilkumar Kolli, Manikanta Pubbisetty,
Sven Eckelmann, Pradeep Kumar Chitrapu, ath11k, linux-wireless,
netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> Currently the structure ts is not inititalized and ts.flags contains
> garbage values from the stack. This is being passed into function
> ath11k_dp_tx_status_parse that bit-wise or'ing in settings into the
> ts.flags field. To avoid flags (and other fields) from containing
> garbage, initialize the structure to zero before use.
>
> Addresses-Coverity: ("Uninitialized scalar variable)"
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
eefca584140b ath11k: ensure ts.flags is initialized before bit-wise or'ing in values
--
https://patchwork.kernel.org/patch/11306545/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-26 10:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-21 0:40 [PATCH] ath11k: ensure ts.flags is initialized before bit-wise or'ing in values Colin King
2019-12-21 0:40 ` Colin King
2020-01-26 10:45 ` Kalle Valo
2020-01-26 10:45 ` Kalle Valo
2020-01-26 10: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.