Skip to contentSkip to conversation

xen: dont use bitfields for indicators modified under different locks

PATCH New Juergen Gross 1 participant 1 message Jan 16, 2015 Xen hypervisor interface

lore
Share & tools
lore

Juergen Gross

author maintainer
#0 lore raw

PATCH 1/1 xen: dont use bitfields for indicators modified under different locks

It is no good idea to have bitfields in the same byte which are modified with different locks held (or, in this case, one with lock and one without). Use at least bytes for this purpose.

drivers/xen/scsifront/common.h +2 -2
diff -r 3feb5ddb5434 drivers/xen/scsifront/common.h
@@ -113,8 +113,8 @@ struct vscsifrnt_info {
 	struct task_struct *kthread;
 	wait_queue_head_t wq;
 	wait_queue_head_t wq_sync;
-	unsigned int waiting_resp:1;
-	unsigned int waiting_sync:1;
+	unsigned char waiting_resp;
+	unsigned char waiting_sync;
 };
 
 #define DPRINTK(_f, _a...)				\