public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Felix Fietkau <nbd@nbd.name>, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/3] mt76: mt7615: 0-terminate firmware log messages
Date: Fri, 26 Mar 2021 22:09:35 +0100	[thread overview]
Message-ID: <249e2022c17f2555445061e533353ccd6f9e9b60.camel@sipsolutions.net> (raw)
In-Reply-To: <20210326205505.74383-1-nbd@nbd.name> (sfid-20210326_215548_974123_3E7CAD0D)

> 
> +	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?

johannes



  parent reply	other threads:[~2021-03-26 21:10 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 ` Johannes Berg [this message]
2021-03-26 21:53   ` [PATCH 1/3] mt76: mt7615: 0-terminate firmware log messages Felix Fietkau

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=249e2022c17f2555445061e533353ccd6f9e9b60.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /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