[RTEMS Project] #4385: grlib/genirq: Bad returned value when enabling/disabling interrupt
RTEMS trac
trac at rtems.org
Tue Apr 13 05:46:42 UTC 2021
#4385: grlib/genirq: Bad returned value when enabling/disabling interrupt
----------------------------+--------------------
Reporter: GabrielMoyano | Owner: (none)
Type: defect | Status: new
Priority: normal | Milestone: 5.1
Component: admin | Version:
Severity: normal | Keywords:
Blocked By: | Blocking:
----------------------------+--------------------
The function genirq_set_active() can return a value greater than 1 under
some conditions
This function is used by genirq_enable() and genirq_disable() and both of
them returns the value returned by genirq_set_active(). According to the
documentation in genirq.h, they should return -1, 0 or 1.
When this issue can happen? If there are 3 entries in the list of IRQ and
2 of them are already enabled, the variable `enabled` would be 2, because
of `enabled += isrentry->enabled`.
As a possible solution, the value of `enabled` can changed to 1 if it's
greater than 1.
--
Ticket URL: <http://devel.rtems.org/ticket/4385>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list