• Matthijs Kooijman's avatar
    [media] rc: Set rdev before irq setup · d62b6818
    Matthijs Kooijman authored
    This fixes a problem in fintek-cir and nuvoton-cir where the
    irq handler would trigger during module load before the rdev member was
    set, causing a NULL pointer crash.
    It seems this crash is very reproducible (just bombard the receiver with
    IR signals during module load), probably because when request_irq is
    called, any pending intterupt is handled immediately, before
    request_irq returns and rdev can be set.
    This same crash was supposed to be fixed by commit
    9ef449c6 ("[media] rc: Postpone ISR
    registration"), but the crash was still observed on the nuvoton-cir
    driver.
    This commit was tested on nuvoton-cir only.
    
    Cc: Jarod Wilson <jarod@redhat.com>
    Signed-off-by: default avatarMatthijs Kooijman <matthijs@stdin.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    d62b6818
nuvoton-cir.c 33.8 KB