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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140814.143953.179653300813812591.davem@redhat.com>
Date:	Thu, 14 Aug 2014 14:39:53 -0700 (PDT)
From:	David Miller <davem@...hat.com>
To:	tklauser@...tanz.ch
Cc:	isubramanian@....com, kchudgar@....com, rapatel@....com,
	netdev@...r.kernel.org
Subject: Re: [PATCH net] net: xgene: Check negative return value of
 xgene_enet_get_ring_size()

From: Tobias Klauser <tklauser@...tanz.ch>
Date: Thu, 14 Aug 2014 13:59:42 +0200

> xgene_enet_get_ring_size() returns a negative value in case of an error,
> but its only caller in xgene_enet_create_desc_ring() currently uses the
> return value directly as u32. Instead, check for a negative value first and
> error out in case. Also move the call to xgene_enet_get_ring_size() before
> devm_kzalloc() so we don't need to free anything in the error path.
> 
> This fixes the following issue reported by the Coverity Scanner:
> 
> ** CID 1231336:  Improper use of negative value  (NEGATIVE_RETURNS)
> /drivers/net/ethernet/apm/xgene/xgene_enet_main.c: 596 in xgene_enet_create_desc_ring()
> 
> Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ