Re: [PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-27 Thread Marek Vasut
On 1/26/25 10:49 PM, Rasmus Villemoes wrote: [...] Also, I think I'd prefer if double cyclic_register() is allowed and always succeeds; this could be used to change the period of an already registered instance, for example. This would be terribly overloaded interface, no, let's not do that.

Re: [PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-26 Thread Rasmus Villemoes
On Sat, Jan 25 2025, Marek Vasut wrote: > On 1/20/25 10:17 AM, Rasmus Villemoes wrote: >> On Sat, Jan 18 2025, Marek Vasut wrote: >> >>> Make cyclic_register() return error code, 0 in case of success, >>> -EALREADY in case the called attempts to re-register already >>> registered struct cyclic_

Re: [PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-25 Thread Marek Vasut
On 1/22/25 10:25 AM, Stefan Roese wrote: Hi Marek, Hi Rasmus, On 20.01.25 10:17, Rasmus Villemoes wrote: On Sat, Jan 18 2025, Marek Vasut wrote: Make cyclic_register() return error code, 0 in case of success, -EALREADY in case the called attempts to re-register already registered struct cycl

Re: [PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-25 Thread Marek Vasut
On 1/20/25 10:17 AM, Rasmus Villemoes wrote: On Sat, Jan 18 2025, Marek Vasut wrote: Make cyclic_register() return error code, 0 in case of success, -EALREADY in case the called attempts to re-register already registered struct cyclic_info. The re-registration would lead to corruption of gd->c

Re: [PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-22 Thread Stefan Roese
Hi Marek, Hi Rasmus, On 20.01.25 10:17, Rasmus Villemoes wrote: On Sat, Jan 18 2025, Marek Vasut wrote: Make cyclic_register() return error code, 0 in case of success, -EALREADY in case the called attempts to re-register already registered struct cyclic_info. The re-registration would lead to

Re: [PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-20 Thread Rasmus Villemoes
On Sat, Jan 18 2025, Marek Vasut wrote: > Make cyclic_register() return error code, 0 in case of success, > -EALREADY in case the called attempts to re-register already > registered struct cyclic_info. The re-registration would lead > to corruption of gd->cyclic_list because the re-registration >

[PATCH 1/8] cyclic: Prevent corruption of cyclic list on reassignment

2025-01-17 Thread Marek Vasut
Make cyclic_register() return error code, 0 in case of success, -EALREADY in case the called attempts to re-register already registered struct cyclic_info. The re-registration would lead to corruption of gd->cyclic_list because the re-registration would memset() one of its nodes, prevent that. Unre