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-prev] [day] [month] [year] [list]
Date:   Fri, 15 Feb 2019 11:52:31 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Stephen Hemminger <stephen@...workplumber.org>, mst@...hat.com
Cc:     netdev@...r.kernel.org
Subject: Re: dead code in vhost.c


On 2019/2/15 上午12:03, Stephen Hemminger wrote:
> Coverity found this obvious bug
>
> ________________________________________________________________________________________________________
> *** CID 1442593:  Control flow issues  (DEADCODE)
> /drivers/vhost/vhost.c: 1795 in log_used()
> 1789     	ret = translate_desc(vq, (uintptr_t)vq->used + used_offset,
> 1790     			     len, iov, 64, VHOST_ACCESS_WO);
> 1791     	if (ret)
> 1792     		return ret;
> 1793
> 1794     	for (i = 0; i < ret; i++) {
>>>>      CID 1442593:  Control flow issues  (DEADCODE)
>>>>      Execution cannot reach this statement: "ret = log_write_hva(vq, (ui...".
> 1795     		ret = log_write_hva(vq,	(uintptr_t)iov[i].iov_base,
> 1796     				    iov[i].iov_len);
> 1797     		if (ret)
> 1798     			return ret;
> 1799     	}
> 1800


My bad, need check ret < 0 instead.

Will post a fix.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ