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

[Xen-devel] [PATCH linux-2.6.18] 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.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

diff -r 3feb5ddb5434 drivers/xen/scsifront/common.h
--- a/drivers/xen/scsifront/common.h    Wed Jan 14 12:05:46 2015 +0100
+++ b/drivers/xen/scsifront/common.h    Fri Jan 16 15:18:35 2015 +0100
@@ -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...)                             \

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.