Re: [PATCH 2/5] net: renesas: rswitch: fix leaked pointer on error path
From: Nikita Yushchenko
Date: Fri Dec 06 2024 - 13:17:15 EST
Why not move the assignment down, then? After we have successfully
mapped all entries?
Just realized that moving assignment below the loop will open a race window. DT field is set inside the
loop, and once it is set, completion interrupt becomes theoretically possible.
Furthermore, realized that existing code already has a race. Interrupt can happen after DT wield was
updated but before cur is updated. Then, with the completion code won't check the entry (up to a new
interrupt, that can theoretically not happen).
Will fix in the updated patches.
Nikita