Skip to content
Snippets Groups Projects
Commit a94da897 authored by Milan Svoboda's avatar Milan Svoboda Committed by Greg Kroah-Hartman
Browse files

USB gadget: gadgetfs dont try to lock before free


I spotted this during my tests with -rt on arm. The -rt patch contains
some better tools
to diagnose problems with locks and some other things...

Original code tries to take semaphore in BUG_ON and then free the memory
with this semaphore.


Signed-off-by: default avatarMilan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e22fc27c
No related branches found
No related tags found
No related merge requests found
...@@ -223,7 +223,6 @@ static void put_ep (struct ep_data *data) ...@@ -223,7 +223,6 @@ static void put_ep (struct ep_data *data)
/* needs no more cleanup */ /* needs no more cleanup */
BUG_ON (!list_empty (&data->epfiles)); BUG_ON (!list_empty (&data->epfiles));
BUG_ON (waitqueue_active (&data->wait)); BUG_ON (waitqueue_active (&data->wait));
BUG_ON (down_trylock (&data->lock) != 0);
kfree (data); kfree (data);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment