Re: [PATCH] net: wireless: ath: ath9k: Fix a possible data race in ath_chanctx_set_next

2 messages, 2 authors, 2018-05-08 · open the first message on its own page

Re: [PATCH] net: wireless: ath: ath9k: Fix a possible data race in ath_chanctx_set_next

From: Kalle Valo <hidden>
Date: 2018-05-08 14:51:17

Jia-Ju Bai [off-list ref] writes:
The write operation to "sc->next_chan" is protected by
the lock on line 1287, but the read operation to
this data on line 1262 is not protected by the lock.
Thus, there may exist a data race for "sc->next_chan".

To fix this data race, the read operation to "sc->next_chan" 
should be also protected by the lock.

Signed-off-by: Jia-Ju Bai <redacted>
I need this reviewed by someone else before I'm willing to take it.

-- 
Kalle Valo

Re: [PATCH] net: wireless: ath: ath9k: Fix a possible data race in ath_chanctx_set_next

From: Toke Høiland-Jørgensen <toke@toke.dk>
Date: 2018-05-08 15:08:12

Kalle Valo [off-list ref] writes:
Jia-Ju Bai [off-list ref] writes:
quoted
The write operation to "sc->next_chan" is protected by
the lock on line 1287, but the read operation to
this data on line 1262 is not protected by the lock.
Thus, there may exist a data race for "sc->next_chan".

To fix this data race, the read operation to "sc->next_chan" 
should be also protected by the lock.

Signed-off-by: Jia-Ju Bai <redacted>
I need this reviewed by someone else before I'm willing to take it.
Only possible issue I can see is that it puts a call to
getrawmonotonic() under the spinlock. Not sure if that has any bad
implications...

-Toke
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help