Message ID | 20230112115850.9208-1-n.zhandarovich@fintech.ru (mailing list archive) |
---|---|
Headers | show |
Series | mt76: move mt76_init_tx_queue in common code | expand |
On Thu, Jan 12, 2023 at 03:58:49AM -0800, Nikita Zhandarovich wrote: > Svace has identified unchecked return value of mt7615_init_tx_queue > function in 5.10 branch, even though it makes sense to track it > instead. This issue is fixed in upstream version by Lorenzo's patch. > > The same patch can be cleanly applied to the 5.10 branch. I do not understand, what issue/bug does this fix? And how can you trigger it? And why only worry about the 5.10.y kernel branch? thanks, greg k-h
My apologies, I should've have explained my reasoning better. 1. My issue with 5.10 version of mt7615_init_tx_queues() in drivers/net/wireless/mediatek/mt76/mt7615/dma.c is that return value of final call to mt7615_init_tx_queue() is not taken into account when returning result of mt7615_init_tx_queues(). So, if last mt7615_init_tx_queue() fails (due to memory issues, for instance), parent function will still erroneously return 0. 2. To correct the issue, I turned to Lorenzo's patch in b671da33d1c5973f90f098ff66a91953691df582 which solves my petit problem as well as rewrites a single mt76_init_tx_queue() function to be used across all mt76 drivers. 3. I was torn between writing my own little patch to fix a single mistake or use an existing one that increases code readability and uniformity. I settled on latter. 4. As for this patch exclusivity to 5.10.y branch, I have an incentive to prioritise prioritize 5.10. Wasn't sure I should be the one to suggest the patch for other branches. Thanks, Nikita
On Fri, Jan 13, 2023 at 07:04:45AM -0800, Nikita Zhandarovich wrote:
> My apologies, I should've have explained my reasoning better.
Reasoning for what?
Sorry, I have no context here, please properly quote emails so that we
have a hint as to what is going on. Remember, some of us get 1000+ a
day that we need to process somehow...
thanks,
greg k-h