lkml.org 
[lkml]   [2023]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 5.10 1/1] mt76: fix mt7615_init_tx_queues() return value
Date
> > > What is the "fault"?
> >
> > In 5.10.y "mt7615_init_tx_queues() returns 0 regardless of how final
> > mt7615_init_tx_queue() performs. If mt7615_init_tx_queue() fails (due
> > to memory issues, for instance), parent function will still
> > erroneously return 0."
>
> And how can memory issues actually be triggered in a real system? Is this a
> fake problem or something you can validate and verify works properly?
>
> Don't worry about fake issues for stable backports please.
>
> thanks,
>
> greg k-h

mt7615_init_tx_queue() calls devm_kzalloc() (which can throw -ENOMEM) and mt76_queue_alloc() (which can also fail). It's hard for me to gauge how probable these failures can be. But I feel like at the very least it's a logical sanity check.

@@ -82,7 +82,7 @@ mt7615_init_tx_queues(struct mt7615_dev *dev)

ret = mt7615_init_tx_queue(dev, MT_TXQ_MCU, MT7615_TXQ_MCU,
MT7615_TX_MCU_RING_SIZE);
return 0;

There is no special reason for mt7615_init_tx_queues() to ignore last 'ret'. If last mt7615_init_tx_queue(), so should mt7615_init_tx_queues(). And upstream patch (b671da33d1c5973f90f098ff66a91953691df582) addresses this as well.
If you feel differently, I will of course back down.

regards,

Nikita
\
 
 \ /
  Last update: 2023-03-27 00:02    [W:0.076 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site