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

[Xen-changelog] [linux-2.6.18-xen] scsifront: don't use bitfields for indicators modified under different locks


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-linux-2.6.18-xen <patchbot@xxxxxxx>
  • Date: Mon, 19 Jan 2015 10:55:02 +0000
  • Delivery-date: Mon, 19 Jan 2015 10:55:15 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Juergen Gross <jgross@xxxxxxxx>
# Date 1421664706 -3600
# Node ID 578e5aea3cbb6a82fa445eb7b4ff0356ff3f4d5b
# Parent  3feb5ddb543433f1d1d36f8e27ce3d9c113b1704
scsifront: don't 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>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r 3feb5ddb5434 -r 578e5aea3cbb 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    Mon Jan 19 11:51:46 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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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