Thread (13 messages) flat view 13 messages, 4 authors, 2021-02-10

Re: [PATCH 2/2] iwlwifi: dbg: Mark ucode tlv data as const

From: Kalle Valo <hidden>
Date: 2021-01-13 06:51:17
Also in: netdev

"Coelho, Luciano" [off-list ref] writes:
On Tue, 2021-01-12 at 17:05 +0100, Takashi Iwai wrote:
quoted
On Tue, 12 Jan 2021 16:50:54 +0100,
Kalle Valo wrote:
quoted
Takashi Iwai [off-list ref] writes:
quoted
The ucode TLV data may be read-only and should be treated as const
pointers, but currently a few code forcibly cast to the writable
pointer unnecessarily.  This gave developers a wrong impression as if
it can be modified, resulting in crashing regressions already a couple
of times.

This patch adds the const prefix to those cast pointers, so that such
attempt can be caught more easily in future.

Signed-off-by: Takashi Iwai <redacted>
So this need to go to -next, right?
Yes, this isn't urgently needed for 5.11.
Acked-by: Luca Coelho <redacted>

quoted
quoted
Does this depend on patch 1 or can
this be applied independently?
It depends on the first patch, otherwise you'll get the warning in the
code changing the const data (it must warn -- that's the purpose of
this change :)

So, if applying to a separate branch is difficult, applying together
for 5.11 would be an option.
It doesn't matter to me how you apply it.  Applying together is
obviously going to be easier, but applying separately wouldn't be that
hard either.  You'd just have to track when 1/2 went into net-next
before applying this one.  Kalle's call.
Ok, I'll apply this to wireless-drivers-next after wireless-drivers is
merged to -next. It might take a while.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help