• Alessandro Rubini's avatar
    core and triggers: a trigger should start disabled · 740978cf
    Alessandro Rubini authored
    If the trigger is enabled on creation, it may fire before the cset is
    ready.  This happened to me with "modprobe zio-zero trigger=irq".
    For this reason it must start disabled. Also, the create
    method MUST set ti->cset before activating the trigger, because the
    cset lock is needed to access the enable/disable flag.
    
    The commit adds a WARN() if the field is not set after creation, then
    it leaves it zeroed to ensure the system will crash, instead of having
    a subtle race.
    
    Also, add a pair of FIXME notes about the need to allow changing
    a trigger type while leaving the new one disabled.
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    Acked-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
    740978cf
Name
Last commit
Last update
..
img Loading commit data...
.gitignore Loading commit data...
Makefile Loading commit data...
fixinfo Loading commit data...
infofilter Loading commit data...
zio-manual.in Loading commit data...