2012-11-23 22:46:03

by Johannes Berg

[permalink] [raw]
Subject: [PATCH] iwlwifi: initialize rx_status

From: Johannes Berg <[email protected]>

The vendor radiotap patch added a few fields to
struct ieee80211_rx_status that need to be zero,
initialize the struct instead of using whatever
was left on the stack.

Reviewed-by: Emmanuel Grumbach <[email protected]>
Signed-off-by: Johannes Berg <[email protected]>
---
drivers/net/wireless/iwlwifi/dvm/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlwifi/dvm/rx.c b/drivers/net/wireless/iwlwifi/dvm/rx.c
index 9a8d502..85b4763 100644
--- a/drivers/net/wireless/iwlwifi/dvm/rx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/rx.c
@@ -899,7 +899,7 @@ static int iwlagn_rx_reply_rx(struct iwl_priv *priv,
struct iwl_device_cmd *cmd)
{
struct ieee80211_hdr *header;
- struct ieee80211_rx_status rx_status;
+ struct ieee80211_rx_status rx_status = {};
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_rx_phy_res *phy_res;
__le32 rx_pkt_status;
--
1.8.0



2012-11-24 07:46:30

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: initialize rx_status

Johannes Berg <[email protected]> writes:

> From: Johannes Berg <[email protected]>
>
> The vendor radiotap patch added a few fields to
> struct ieee80211_rx_status that need to be zero,
> initialize the struct instead of using whatever
> was left on the stack.
>
> Reviewed-by: Emmanuel Grumbach <[email protected]>
> Signed-off-by: Johannes Berg <[email protected]>

Just to confirm: latest wireless-testing was crashing for me during
boot. It was something iwlwifi related, but I didn't manage to see the
whole stack trace. Applying this patch on top of a1055e1 fixed the issue
for me.

Tested-by: Kalle Valo <[email protected]>

--
Kalle Valo

2012-11-23 22:48:18

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: initialize rx_status

On Fri, 2012-11-23 at 23:46 +0100, Johannes Berg wrote:
> From: Johannes Berg <[email protected]>
>
> The vendor radiotap patch added a few fields to
> struct ieee80211_rx_status that need to be zero,
> initialize the struct instead of using whatever
> was left on the stack.

John, this fixes the crash you ran into, sorry about that. I also sent
the same iwlegacy fix separately yesterday.

Can you please apply the patch directly to wireless-next? I didn't think
sending a pull request for a single patch was really helpful, but if you
do want one I can do that too.

johannes


2012-11-24 13:18:18

by Mohammed Shafi

[permalink] [raw]
Subject: Re: [PATCH] iwlwifi: initialize rx_status

On Sat, Nov 24, 2012 at 1:16 PM, Kalle Valo <[email protected]> wrote:
> Johannes Berg <[email protected]> writes:
>
>> From: Johannes Berg <[email protected]>
>>
>> The vendor radiotap patch added a few fields to
>> struct ieee80211_rx_status that need to be zero,
>> initialize the struct instead of using whatever
>> was left on the stack.
>>
>> Reviewed-by: Emmanuel Grumbach <[email protected]>
>> Signed-off-by: Johannes Berg <[email protected]>
>
> Just to confirm: latest wireless-testing was crashing for me during
> boot. It was something iwlwifi related, but I didn't manage to see the
> whole stack trace. Applying this patch on top of a1055e1 fixed the issue
> for me.

works for me too, addresses the crash seen for iwlwifi when my machine
boots up with latest wireless-testing.

>
> Tested-by: Kalle Valo <[email protected]>
>
> --
> Kalle Valo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html



--
thanks,
shafi