* [PATCH] usb: gadget: f_mass_storage: restore address range on exit
@ 2014-12-05 11:21 Sanjay Singh Rawat
2014-12-05 19:34 ` Alan Stern
0 siblings, 1 reply; 2+ messages in thread
From: Sanjay Singh Rawat @ 2014-12-05 11:21 UTC (permalink / raw)
To: linux-usb, linux-kernel; +Cc: balbi, andrzej.p, mina86, Sanjay Singh Rawat
At the start of the thread we are changing the address limit, restoring it
to the default while exiting.
Signed-off-by: Sanjay Singh Rawat <snjsrwt@gmail.com>
---
drivers/usb/gadget/function/f_mass_storage.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
index 811929c..c4a2ded 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -2489,6 +2489,7 @@ static void handle_exception(struct fsg_common *common)
static int fsg_main_thread(void *common_)
{
struct fsg_common *common = common_;
+ mm_segment_t fs = get_fs();
/*
* Allow the thread to be killed by a signal, but set the signal mask
@@ -2567,6 +2568,7 @@ static int fsg_main_thread(void *common_)
up_write(&common->filesem);
}
+ set_fs(fs);
/* Let fsg_unbind() know the thread has exited */
complete_and_exit(&common->thread_notifier, 0);
}
--
1.8.3.2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-05 20:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-05 11:21 [PATCH] usb: gadget: f_mass_storage: restore address range on exit Sanjay Singh Rawat
2014-12-05 19:34 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®