[patch 098/123] USB: f_mass_storage: fix crash on bind() error

From: Greg KH
Date: Fri Mar 12 2010 - 19:21:55 EST


2.6.33-stable review patch. If anyone has any objections, please let me know.

-----------------

From: Peter Korsgaard <jacmet@xxxxxxxxxx>

commit 8e7e61dfbf1ec6418bf89505980b158a8d00d877 upstream.

init_completion() hasn't been called yet and the thread isn't created
if we end up here, so don't call complete() on thread_notifier.

Signed-off-by: Peter Korsgaard <jacmet@xxxxxxxxxx>
Acked-by: Michal Nazarewicz <m.nazarewicz@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/usb/gadget/f_mass_storage.c | 1 -
1 file changed, 1 deletion(-)

--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -2852,7 +2852,6 @@ error_release:
/* Call fsg_common_release() directly, ref might be not
* initialised */
fsg_common_release(&common->ref);
- complete(&common->thread_notifier);
return ERR_PTR(rc);
}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/