提交 a94da897 编写于 作者: M Milan Svoboda 提交者: Greg Kroah-Hartman

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: NMilan Svoboda <msvoboda@ra.rockwell.com>
Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 e22fc27c
......@@ -223,7 +223,6 @@ static void put_ep (struct ep_data *data)
/* needs no more cleanup */
BUG_ON (!list_empty (&data->epfiles));
BUG_ON (waitqueue_active (&data->wait));
BUG_ON (down_trylock (&data->lock) != 0);
kfree (data);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册