[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <044e2d411333d3b81a6853d92a1c77a1aee0e4d9.camel@sipsolutions.net>
Date: Wed, 12 Jun 2024 12:10:58 +0200
From: Johannes Berg <johannes@...solutions.net>
To: quic_zijuhu <quic_zijuhu@...cinc.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
emmanuel.grumbach@...el.com
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH v1 2/2] net: rfkill: Fix a logic error within
rfkill_set_hw_state_reason()
On Wed, 2024-06-12 at 17:43 +0800, quic_zijuhu wrote:
> On 6/12/2024 4:18 PM, Johannes Berg wrote:
> > On Fri, 2024-06-07 at 22:40 +0800, Zijun Hu wrote:
> > > Kernel API rfkill_set_hw_state_reason() wrongly gets previous block state
> > > by using its parameter @reason as reason mask.
> >
> > Using reason as a mask is perfectly valid.
> >
> > And checking that the bit changed also seems valid.
> >
> i don't think so as explained below.
> let us assume @rfkill->hard_block_reasons has value
> RFKILL_HARD_BLOCK_SIGNAL which means block state before
> __rfkill_set_sw_state(..., true, RFKILL_HARD_BLOCK_NOT_OWNER) is invoked.
>
> @prev should mean previous block state,
>
no.
johannes
Powered by blists - more mailing lists