• Heiner Kallweit's avatar
    hid: thingm: reorder calls in thingm_probe · 1d1b564f
    Heiner Kallweit authored
    When reviewing another thingm patch Benjamin Tissoires pointed out
    the following: "The problem here is that hid_hw_start() is called
    before thingm_version() which allows user space to briefly introduce
    races between thingm_version() and any hidraw requests.
    The mutex will not help here as it is initialized after hid_hw_start()
    and only used for protecting the concurrent access of the rgb."
    
    Avoid this possible issue by calling hid_hw_start() later in the
    probe function.
    Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    1d1b564f
hid-thingm.c 6.34 KB