[lvc-project] [PATCH v3 3/3] net: sched: use RCU read-side critical section in taprio_dump()

Paolo Abeni pabeni at redhat.com
Tue Sep 3 14:34:47 MSK 2024


On 8/30/24 15:53, Alexander Lobakin wrote:
> From: Dmitry Antipov <dmantipov at yandex.ru>
> Date: Fri, 30 Aug 2024 16:48:39 +0300
> 
>> On 8/30/24 4:02 PM, Alexander Lobakin wrote:
>>
>>> Why did you invert this condition and introduced +1 indent level?
>>
>> Just to reduce amount of labels and related gotos. After adding 'unlock'
>> at the end of RCU critical section, it was too much of them IMHO.
>>
>>> The original code doesn't have nla_nest_cancel(), why was it added?
>>
>> IIUC both original and new code has 'nla_nest_start_noflag()' and
>> 'nla_nest_{end,chancel}()' calls balanced correctly.
> 
> Ah sorry, I haven't noticed you removed the related label below.
> That's why it's not a good idea to refactor the code in the patch
> targeted as a fix.
> You just need to fix the actual issue, not refactor anything / change
> the code flow.

+2, the fix will be small and simple without the mixed-in refactor, 
which is a big plus.

Additionally goto and labels are still the preferred way to handle error 
paths in networking.

Please add the target tree (net) in the prefix subj when you repost.

Thanks,

Paolo




More information about the lvc-project mailing list