Re: [PATCH] f_mass_storage: fix crash on bind() error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 04 Feb 2010 17:15:25 +0100, Peter Korsgaard <jacmet@xxxxxxxxxx> wrote:
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>

Well spotted, thanks!

If anyone cares:

Acked-by: Michal Nazarewicz <m.nazarewicz@xxxxxxxxxxx>

---
 drivers/usb/gadget/f_mass_storage.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c
index a37640e..73f9bbd 100644
--- 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);
 }

--
Best regards,                                           _     _
 .o. | Liege of Serenely Enlightened Majesty of       o' \,=./ `o
 ..o | Computer Science,  Michał "mina86" Nazarewicz     (o o)
 ooo +---[mina86@xxxxxxxxxx]---[mina86@jabber.org]---ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux