[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3796604a-0636-41ac-b7e2-13ccd0694d4d@cogentembedded.com>
Date: Fri, 6 Dec 2024 23:17:01 +0500
From: Nikita Yushchenko <nikita.yoush@...entembedded.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
Andrew Lunn <andrew@...n.ch>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Geert Uytterhoeven <geert+renesas@...der.be>, netdev@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
Michael Dege <michael.dege@...esas.com>,
Christian Mardmoeller <christian.mardmoeller@...esas.com>,
Dennis Ostermann <dennis.ostermann@...esas.com>
Subject: Re: [PATCH 2/5] net: renesas: rswitch: fix leaked pointer on error
path
> 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
Powered by blists - more mailing lists