]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
extcon: Fix missing locking when [un]registering notifiers
authorHans de Goede <hdegoede@redhat.com>
Sat, 21 Mar 2015 16:26:24 +0000 (17:26 +0100)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 23 Mar 2015 02:06:04 +0000 (11:06 +0900)
commit66bee35f29683fc4a9a530a1c56a0ec45e3f7d72
tree79f47f38f1a4802eb8ae789e1b4516b10a424135
parentb9b518f53996b67833b42ca7751b2085b0dc565a
extcon: Fix missing locking when [un]registering notifiers

Since extcon.c is using raw_notifiers it must protect the notifier
list itself when [un]registering notifiers to avoid the list changing while
extcon_update_state is walking the list (through raw_notifier_call_chain).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[cw00.choi: Apply this patch to extcon.c driver instead of old extcon-class.c]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon.c