[PATCH 1/2] staging: unisys: Lock visorchannels associated with devices

Benjamin Romer benjamin.romer at unisys.com
Tue Jul 14 18:43:29 UTC 2015


From: David Kershner <david.kershner at unisys.com>

A visorchannel associated with a device should have its writing to
the channel protected by a lock.

Fixes: b32c4997c ('staging: unisys: Move channel creation up the stack')
Signed-off-by: Tim Sell <Timothy.Sell at unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer at unisys.com>
Signed-off-by: David Kershner <david.kershner at unisys.com>
---
 drivers/staging/unisys/visorbus/visorchipset.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
index 4be9318..fb08f95 100644
--- a/drivers/staging/unisys/visorbus/visorchipset.c
+++ b/drivers/staging/unisys/visorbus/visorchipset.c
@@ -1247,10 +1247,11 @@ my_device_create(struct controlvm_message *inmsg)
 	POSTCODE_LINUX_4(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
 			 POSTCODE_SEVERITY_INFO);
 
-	visorchannel = visorchannel_create(cmd->create_device.channel_addr,
-					   cmd->create_device.channel_bytes,
-					   GFP_KERNEL,
-					   cmd->create_device.data_type_uuid);
+	visorchannel =
+	       visorchannel_create_with_lock(cmd->create_device.channel_addr,
+					     cmd->create_device.channel_bytes,
+					     GFP_KERNEL,
+					     cmd->create_device.data_type_uuid);
 
 	if (!visorchannel) {
 		POSTCODE_LINUX_4(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
-- 
2.1.4



More information about the devel mailing list