* [PATCH 0/2] Fix two possible NULL pointer dereferencing issues
@ 2017-12-14 12:03 Lorenzo Bianconi
2017-12-14 12:03 ` [PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action() Lorenzo Bianconi
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Lorenzo Bianconi @ 2017-12-14 12:03 UTC (permalink / raw)
To: nbd; +Cc: dan.carpenter, linux-wireless
Lorenzo Bianconi (2):
mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
mt76: fix possible NULL pointer dereferencing in
mt76x2_mac_write_txwi()
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.13.6
^ permalink raw reply [flat|nested] 13+ messages in thread* [PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2017-12-14 12:03 [PATCH 0/2] Fix two possible NULL pointer dereferencing issues Lorenzo Bianconi
@ 2017-12-14 12:03 ` Lorenzo Bianconi
2018-01-08 17:35 ` [1/2] " Kalle Valo
` (2 more replies)
2017-12-14 12:03 ` [PATCH 2/2] mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi() Lorenzo Bianconi
2017-12-14 15:30 ` [PATCH 0/2] Fix two possible NULL pointer dereferencing issues Felix Fietkau
2 siblings, 3 replies; 13+ messages in thread
From: Lorenzo Bianconi @ 2017-12-14 12:03 UTC (permalink / raw)
To: nbd; +Cc: dan.carpenter, linux-wireless
Initialize mt76_txq pointer after ieee80211_txq pointer check.
Remove space after the pointer cast
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
index 2cef48edb275..33469e32567b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
@@ -450,13 +450,15 @@ mt76x2_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct mt76x2_dev *dev = hw->priv;
struct mt76x2_sta *msta = (struct mt76x2_sta *) sta->drv_priv;
struct ieee80211_txq *txq = sta->txq[params->tid];
- struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv;
u16 tid = params->tid;
u16 *ssn = ¶ms->ssn;
+ struct mt76_txq *mtxq;
if (!txq)
return -EINVAL;
+ mtxq = (struct mt76_txq *)txq->drv_priv;
+
switch (action) {
case IEEE80211_AMPDU_RX_START:
mt76_set(dev, MT_WCID_ADDR(msta->wcid.idx) + 4, BIT(16 + tid));
--
2.13.6
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2017-12-14 12:03 ` [PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action() Lorenzo Bianconi
@ 2018-01-08 17:35 ` Kalle Valo
[not found] ` <20180108173523.B23C360B22@smtp.codeaurora.org>
2018-01-17 14:50 ` Kalle Valo
2 siblings, 0 replies; 13+ messages in thread
From: Kalle Valo @ 2018-01-08 17:35 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, dan.carpenter, linux-wireless
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
> Initialize mt76_txq pointer after ieee80211_txq pointer check.
> Remove space after the pointer cast
>
> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
What am I supposed to do with this and patch 2? Drop?
--
https://patchwork.kernel.org/patch/10111937/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 13+ messages in thread[parent not found: <20180108173523.B23C360B22@smtp.codeaurora.org>]
* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
[not found] ` <20180108173523.B23C360B22@smtp.codeaurora.org>
@ 2018-01-08 17:44 ` Lorenzo Bianconi
2018-01-08 18:16 ` Kalle Valo
0 siblings, 1 reply; 13+ messages in thread
From: Lorenzo Bianconi @ 2018-01-08 17:44 UTC (permalink / raw)
To: Kalle Valo; +Cc: Felix Fietkau, dan.carpenter, linux-wireless
> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
>
>> Initialize mt76_txq pointer after ieee80211_txq pointer check.
>> Remove space after the pointer cast
>>
>> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
>> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>
> What am I supposed to do with this and patch 2? Drop?
Hi Kalle,
What do you mean? Why drop?
Regards,
Lorenzo
>
> --
> https://patchwork.kernel.org/patch/10111937/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2018-01-08 17:44 ` Lorenzo Bianconi
@ 2018-01-08 18:16 ` Kalle Valo
2018-01-08 18:30 ` Lorenzo Bianconi
2018-01-17 10:26 ` Felix Fietkau
0 siblings, 2 replies; 13+ messages in thread
From: Kalle Valo @ 2018-01-08 18:16 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: Felix Fietkau, dan.carpenter, linux-wireless
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
>>
>>> Initialize mt76_txq pointer after ieee80211_txq pointer check.
>>> Remove space after the pointer cast
>>>
>>> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
>>> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>>
>> What am I supposed to do with this and patch 2? Drop?
>
> What do you mean? Why drop?
I didn't see Felix's ack, at least not on patchwork.
--
Kalle Valo
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2018-01-08 18:16 ` Kalle Valo
@ 2018-01-08 18:30 ` Lorenzo Bianconi
2018-01-17 10:26 ` Felix Fietkau
1 sibling, 0 replies; 13+ messages in thread
From: Lorenzo Bianconi @ 2018-01-08 18:30 UTC (permalink / raw)
To: Kalle Valo; +Cc: Felix Fietkau, dan.carpenter, linux-wireless
> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>
>>> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
>>>
>>>> Initialize mt76_txq pointer after ieee80211_txq pointer check.
>>>> Remove space after the pointer cast
>>>>
>>>> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
>>>> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>>>
>>> What am I supposed to do with this and patch 2? Drop?
>>
>> What do you mean? Why drop?
>
> I didn't see Felix's ack, at least not on patchwork.
>
> --
> Kalle Valo
They should be fine since he merged them in mt76 github repo:
- https://github.com/openwrt/mt76/commit/ca5ca8c779932e7cab3224053377b29f139904b9
- https://github.com/openwrt/mt76/commit/2d4b8f57cc5e3101d45785ae9a9f1eb6fc229de9
Anyway we can wait for him, up to you.
Regards,
Lorenzo
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2018-01-08 18:16 ` Kalle Valo
2018-01-08 18:30 ` Lorenzo Bianconi
@ 2018-01-17 10:26 ` Felix Fietkau
2018-01-17 14:50 ` Kalle Valo
1 sibling, 1 reply; 13+ messages in thread
From: Felix Fietkau @ 2018-01-17 10:26 UTC (permalink / raw)
To: Kalle Valo, Lorenzo Bianconi; +Cc: dan.carpenter, linux-wireless
On 2018-01-08 19:16, Kalle Valo wrote:
> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>
>>> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
>>>
>>>> Initialize mt76_txq pointer after ieee80211_txq pointer check.
>>>> Remove space after the pointer cast
>>>>
>>>> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
>>>> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>>>
>>> What am I supposed to do with this and patch 2? Drop?
>>
>> What do you mean? Why drop?
>
> I didn't see Felix's ack, at least not on patchwork.
I sent my ack (for both patches) as a reply to 0/2
These patches should go in.
- Felix
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2018-01-17 10:26 ` Felix Fietkau
@ 2018-01-17 14:50 ` Kalle Valo
2018-01-17 15:56 ` Sven Eckelmann
0 siblings, 1 reply; 13+ messages in thread
From: Kalle Valo @ 2018-01-17 14:50 UTC (permalink / raw)
To: Felix Fietkau; +Cc: Lorenzo Bianconi, dan.carpenter, linux-wireless
Felix Fietkau <nbd@nbd.name> writes:
> On 2018-01-08 19:16, Kalle Valo wrote:
>> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> writes:
>>
>>>> Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
>>>>
>>>>> Initialize mt76_txq pointer after ieee80211_txq pointer check.
>>>>> Remove space after the pointer cast
>>>>>
>>>>> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
>>>>> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>>>>
>>>> What am I supposed to do with this and patch 2? Drop?
>>>
>>> What do you mean? Why drop?
>>
>> I didn't see Felix's ack, at least not on patchwork.
>
> I sent my ack (for both patches) as a reply to 0/2
Ah. patchwork is annoying as it doesn't show the cover letter at all so
I missed that.
> These patches should go in.
These two are applied now.
--
Kalle Valo
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2018-01-17 14:50 ` Kalle Valo
@ 2018-01-17 15:56 ` Sven Eckelmann
2018-01-23 5:14 ` Kalle Valo
0 siblings, 1 reply; 13+ messages in thread
From: Sven Eckelmann @ 2018-01-17 15:56 UTC (permalink / raw)
To: Kalle Valo, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]
On Mittwoch, 17. Januar 2018 16:50:23 CET Kalle Valo wrote:
[...]
> >> I didn't see Felix's ack, at least not on patchwork.
> >
> > I sent my ack (for both patches) as a reply to 0/2
>
> Ah. patchwork is annoying as it doesn't show the cover letter at all so
> I missed that.
Newer version at least can track the series and their cover letters. This is
not completely what you want but at least there is hope. Here is an example:
https://patchwork.open-mesh.org/cover/17240/ (you can use "Related" to see all
the patches in the series).
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2018-01-17 15:56 ` Sven Eckelmann
@ 2018-01-23 5:14 ` Kalle Valo
0 siblings, 0 replies; 13+ messages in thread
From: Kalle Valo @ 2018-01-23 5:14 UTC (permalink / raw)
To: Sven Eckelmann; +Cc: linux-wireless
Sven Eckelmann <sven@narfation.org> writes:
> On Mittwoch, 17. Januar 2018 16:50:23 CET Kalle Valo wrote:
> [...]
>> >> I didn't see Felix's ack, at least not on patchwork.
>> >
>> > I sent my ack (for both patches) as a reply to 0/2
>>
>> Ah. patchwork is annoying as it doesn't show the cover letter at all so
>> I missed that.
>
> Newer version at least can track the series and their cover letters. This is
> not completely what you want but at least there is hope. Here is an example:
> https://patchwork.open-mesh.org/cover/17240/ (you can use "Related" to see all
> the patches in the series).
Nice, looking forward to see that version in patchwork.kernel.org. My
ultimate goal is that I could doo all my maintenance work via my
patchwork script and not touch my email client at all. That's getting
closer.
--
Kalle Valo
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
2017-12-14 12:03 ` [PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action() Lorenzo Bianconi
2018-01-08 17:35 ` [1/2] " Kalle Valo
[not found] ` <20180108173523.B23C360B22@smtp.codeaurora.org>
@ 2018-01-17 14:50 ` Kalle Valo
2 siblings, 0 replies; 13+ messages in thread
From: Kalle Valo @ 2018-01-17 14:50 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: nbd, dan.carpenter, linux-wireless
Lorenzo Bianconi <lorenzo.bianconi@redhat.com> wrote:
> Initialize mt76_txq pointer after ieee80211_txq pointer check.
> Remove space after the pointer cast
>
> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
> Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
2 patches applied to wireless-drivers-next.git, thanks.
99ac5327e902 mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
98051872fd25 mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()
--
https://patchwork.kernel.org/patch/10111937/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/2] mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()
2017-12-14 12:03 [PATCH 0/2] Fix two possible NULL pointer dereferencing issues Lorenzo Bianconi
2017-12-14 12:03 ` [PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action() Lorenzo Bianconi
@ 2017-12-14 12:03 ` Lorenzo Bianconi
2017-12-14 15:30 ` [PATCH 0/2] Fix two possible NULL pointer dereferencing issues Felix Fietkau
2 siblings, 0 replies; 13+ messages in thread
From: Lorenzo Bianconi @ 2017-12-14 12:03 UTC (permalink / raw)
To: nbd; +Cc: dan.carpenter, linux-wireless
Verify wcid is not NULL before dereferencing the pointer to initialize
txwi rate/power info
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
index 39fc1d7b65ce..a1f695e9b51c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
@@ -185,7 +185,7 @@ void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi,
txwi->pktid = 1;
spin_lock_bh(&dev->mt76.lock);
- if (rate->idx < 0 || !rate->count) {
+ if (wcid && (rate->idx < 0 || !rate->count)) {
txwi->rate = wcid->tx_rate;
max_txpwr_adj = wcid->max_txpwr_adj;
nss = wcid->tx_rate_nss;
--
2.13.6
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH 0/2] Fix two possible NULL pointer dereferencing issues
2017-12-14 12:03 [PATCH 0/2] Fix two possible NULL pointer dereferencing issues Lorenzo Bianconi
2017-12-14 12:03 ` [PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action() Lorenzo Bianconi
2017-12-14 12:03 ` [PATCH 2/2] mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi() Lorenzo Bianconi
@ 2017-12-14 15:30 ` Felix Fietkau
2 siblings, 0 replies; 13+ messages in thread
From: Felix Fietkau @ 2017-12-14 15:30 UTC (permalink / raw)
To: Lorenzo Bianconi; +Cc: dan.carpenter, linux-wireless
On 2017-12-14 13:03, Lorenzo Bianconi wrote:
> Lorenzo Bianconi (2):
> mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
> mt76: fix possible NULL pointer dereferencing in
> mt76x2_mac_write_txwi()
For both patches:
Acked-by: Felix Fietkau <nbd@nbd.name>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2018-01-23 5:14 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-14 12:03 [PATCH 0/2] Fix two possible NULL pointer dereferencing issues Lorenzo Bianconi
2017-12-14 12:03 ` [PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action() Lorenzo Bianconi
2018-01-08 17:35 ` [1/2] " Kalle Valo
[not found] ` <20180108173523.B23C360B22@smtp.codeaurora.org>
2018-01-08 17:44 ` Lorenzo Bianconi
2018-01-08 18:16 ` Kalle Valo
2018-01-08 18:30 ` Lorenzo Bianconi
2018-01-17 10:26 ` Felix Fietkau
2018-01-17 14:50 ` Kalle Valo
2018-01-17 15:56 ` Sven Eckelmann
2018-01-23 5:14 ` Kalle Valo
2018-01-17 14:50 ` Kalle Valo
2017-12-14 12:03 ` [PATCH 2/2] mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi() Lorenzo Bianconi
2017-12-14 15:30 ` [PATCH 0/2] Fix two possible NULL pointer dereferencing issues Felix Fietkau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).