lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Mar 2013 15:14:01 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	ecashin@...aid.com
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [Suggestion] drivers/block/aoe: using uninitialized variable.

Hello Ed L. Cashin

  when compiling with EXTRA_CFLAGS=-W

  get the warning:
    drivers/block/aoe/aoecmd.c:931:20: warning: ‘bv’ is used uninitialized in this function [-Wuninitialized]

  bv is really not initialized.
    (and it seems only set "buf->bv_resid = 0" is not enough).

  thanks.

gchen.

 919 static void
 920 bufinit(struct buf *buf, struct request *rq, struct bio *bio)
 921 {
 922         struct bio_vec *bv;
 923 
 924         memset(buf, 0, sizeof(*buf));
 925         buf->rq = rq;
 926         buf->bio = bio;
 927         buf->resid = bio->bi_size;
 928         buf->sector = bio->bi_sector;
 929         bio_pageinc(bio);
 930         buf->bv = bio_iovec(bio);
 931         buf->bv_resid = bv->bv_len;
 932         WARN_ON(buf->bv_resid == 0);
 933 }


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ