summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-05-06 14:28:32 +0300
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-07-10 18:35:23 +0200
commitbf0d6e4a1138e71cafdbbb99cde430eee50c4ff1 (patch)
tree42be197cc003ef248360e85581d974463d4a45cb /drivers/block/drbd
parent1e39152fea2dccd1af6479aa1a036201886f0743 (diff)
downloadlinux-bf0d6e4a1138e71cafdbbb99cde430eee50c4ff1.tar.bz2
drbd: silence underflow warning in read_in_block()
My static checker warns that "data_size" could be negative and underflow the limit check. The code looks suspicious but I don't know if it is a real bug. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_receiver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index f972988291c5..9342b8da73ab 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1592,7 +1592,7 @@ read_in_block(struct drbd_peer_device *peer_device, u64 id, sector_t sector,
struct drbd_peer_request *peer_req;
struct page *page;
int dgs, ds, err;
- int data_size = pi->size;
+ unsigned int data_size = pi->size;
void *dig_in = peer_device->connection->int_dig_in;
void *dig_vv = peer_device->connection->int_dig_vv;
unsigned long *data;