[PATCH 1/2] cpukit/jffs2: Set extracted nodes off-chain
Sebastian Huber
sebastian.huber at embedded-brains.de
Thu Sep 21 14:47:49 UTC 2023
On 20.09.23 20:35, Kinsey Moore wrote:
[...]
> @@ -1306,8 +1307,22 @@ static void process_delayed_work(void)
> while (!rtems_chain_is_tail(&process_work_chain, node)) {
> work = (struct delayed_work*) node;
> rtems_chain_node* next_node = rtems_chain_next(node);
> +
> + /*
> + * Don't leave extracted node exposed to other operations
> + * under RTEMS_DEBUG
> + */
> +#ifdef RTEMS_DEBUG
> + mutex_lock(&delayed_work_mutex);
> +#endif
> rtems_chain_extract(node);
> +#ifdef RTEMS_DEBUG
> + node->next = node;
> + mutex_unlock(&delayed_work_mutex);
> +#endif
> +
> work->callback(&work->work);
> + rtems_chain_set_off_chain(node);
> node = next_node;
> }
> }
This change makes no sense to me. The code should work regardless if
RTEMS_DEBUG is defined or not.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
More information about the devel
mailing list