• Matthijs Kooijman's avatar
    [media] rc: Call rc_register_device before irq setup · 9fa35204
    Matthijs Kooijman authored
    This should fix a potential race condition, when the irq handler
    triggers while rc_register_device is still setting up the rdev->raw
    device.
    This crash has not been observed in practice, but there should be a very
    small window where it could occur. Since ir_raw_event_store_with_filter
    checks if rdev->raw is not NULL before using it, this bug is not
    triggered if the request_irq triggers a pending irq directly (since
    rdev->raw will still be NULL then).
    This commit was tested on nuvoton-cir only.
    
    Cc: Jarod Wilson <jarod@redhat.com>
    Cc: Maxim Levitsky <maximlevitsky@gmail.com>
    Cc: David Härdeman <david@hardeman.nu>
    Signed-off-by: default avatarMatthijs Kooijman <matthijs@stdin.nl>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    9fa35204
ene_ir.c 31.2 KB