From: Felix Fietkau <nbd@nbd.name>
To: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/3] mt76: mt7615: 0-terminate firmware log messages
Date: Fri, 26 Mar 2021 22:53:23 +0100 [thread overview]
Message-ID: <a1aeb214-cb3a-0c7b-1a6a-7b538d86d985@nbd.name> (raw)
In-Reply-To: <249e2022c17f2555445061e533353ccd6f9e9b60.camel@sipsolutions.net>
On 2021-03-26 22:09, Johannes Berg wrote:
>>
>> + skb->data[skb->len] = 0;
>> wiphy_info(mt76_hw(dev)->wiphy, "%s: %s", type, data);
>> }
>>
>
> Are you sure there's always enough space to write to the skb? Following
> the code up I'm not even sure it's always a linear skb :-)
>
> Might be safer/better to do
>
> wiphy_info(..., "%s: %*s", type, skb->len - sizeof(*rxd),
> data);
>
> instead?
Maybe it does trust the firmware too much. I'll send a v2 based on your
suggestion.
Thanks,
- Felix
prev parent reply other threads:[~2021-03-26 21:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 20:55 [PATCH 1/3] mt76: mt7615: 0-terminate firmware log messages Felix Fietkau
2021-03-26 20:55 ` [PATCH 2/3] mt76: mt7915: " Felix Fietkau
2021-03-26 20:55 ` [PATCH 3/3] mt76: mt7615: fix chip reset on MT7622 and MT7663e Felix Fietkau
2021-03-26 21:09 ` [PATCH 1/3] mt76: mt7615: 0-terminate firmware log messages Johannes Berg
2021-03-26 21:53 ` Felix Fietkau [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a1aeb214-cb3a-0c7b-1a6a-7b538d86d985@nbd.name \
--to=nbd@nbd.name \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox