summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2014-06-11 14:09:23 +0900
committerChanho Park <chanho61.park@samsung.com>2014-11-18 12:00:17 +0900
commit1b2eaaf22e5170effff06fc0384df21488ac2a8f (patch)
treee670bfee90d09e90dbeb8ff32bf1c55c052eb255 /arch/arm
parent4648d43cada6321f5383e7a807b3578847990da4 (diff)
downloadlinux-3.10-1b2eaaf22e5170effff06fc0384df21488ac2a8f.tar.gz
linux-3.10-1b2eaaf22e5170effff06fc0384df21488ac2a8f.tar.bz2
linux-3.10-1b2eaaf22e5170effff06fc0384df21488ac2a8f.zip
usb: gadget: Use usb_put_function instead of usb_remove_function
When the gadget is disabled with writing "0" to the "enable" attribute, usb_remove_config() is called, and it calls remove_config(), which in turn removes a function (list_del(&f->list)) from a list of functions in the configuration, then calls e.g. acm function's unbind (acm_unbind()), then calls slp_multi_unbind_config(), which calls slp_multi_unbind_enabled_functions(), which, for the acm function, calls acm_function_unbind_config() which then does usb_remove_config() and the latter attempts to once again remove a function (list_del(&f->list)) from a list of functions in the configuration. Since the list_head of an already deleted entry has LIST_POISON1 and LIST_POISON2 in its prev and next pointers, dereferencing them in list_del() causes a page fault. The fix is to use usb_put_function instead, because when it is called the function is already removed. This patch also cleans up the places usb_get/put_function_instance() and usb_get/put_function() are called. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Diffstat (limited to 'arch/arm')
0 files changed, 0 insertions, 0 deletions