Skip to contentSkip to conversation

drivers/staging/epl: do not use CLONE_SIGHAND with allow_signal()

PATCH New Oleg Nesterov 1 participant 1 message May 3, 2009 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/staging/epl: do not use CLONE_SIGHAND with allow_signal()

Not sure this patch is really needed since kernel_thread() is deprecated (and checkpatch.pl complains).

But we should not use kernel_thread(CLONE_SIGHAND) if we are going to play with signals.

---

 drivers/staging/epl/EplSdoUdpu.c         |    3 ++-
 drivers/staging/epl/ShbIpc-LinuxKernel.c |    8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/staging/epl/EplSdoUdpu.c renamed from drivers/staging/epl/EplSdoUdpu.c~AS_2 +2 -1
@@ -334,7 +334,8 @@ tEplKernel EplSdoUdpuConfig(unsigned lon
 	}
 	// create Listen-Thread
 	SdoUdpInstance_g.m_ThreadHandle =
-	    kernel_thread(EplSdoUdpThread, &SdoUdpInstance_g, CLONE_KERNEL);
+		kernel_thread(EplSdoUdpThread, &SdoUdpInstance_g,
+				CLONE_FS | CLONE_FILES);
 	if (SdoUdpInstance_g.m_ThreadHandle == 0) {
 		Ret = kEplSdoUdpThreadError;
 		goto Exit;
drivers/staging/epl/ShbIpc-LinuxKernel.c renamed from drivers/staging/epl/ShbIpc-LinuxKernel.c~AS_2 +4 -4
@@ -532,8 +532,8 @@ tShbError ShbIpcStartSignalingNewData(tS
 
 	//create thread for signalling new data
 	pShbMemInst->m_tThreadNewDataId =
-	    kernel_thread(ShbIpcThreadSignalNewData, pShbInstance_p,
-			  CLONE_KERNEL);
+		kernel_thread(ShbIpcThreadSignalNewData, pShbInstance_p,
+				CLONE_FS | CLONE_FILES);
 
       Exit:
 	return ShbError;
@@ -636,8 +636,8 @@ tShbError ShbIpcStartSignalingJobReady(t
 	pShbMemHeader->m_fJobReady = FALSE;
 	//create thread for signalling new data
 	pShbMemInst->m_tThreadJobReadyId =
-	    kernel_thread(ShbIpcThreadSignalJobReady, pShbInstance_p,
-			  CLONE_KERNEL);
+		kernel_thread(ShbIpcThreadSignalJobReady, pShbInstance_p,
+				CLONE_FS | CLONE_FILES);
       Exit:
 	return ShbError;
 }