From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [for-4.9 PATCH] xen: credit: change an ASSERT on nr_runnable so that it makes sense. Date: Thu, 13 Apr 2017 12:00:15 +0200 Message-ID: <1492077615.3287.37.camel@citrix.com> References: <149206979424.1420.4973403493863924866.stgit@Solace.fritz.box> <87daa520-a69d-3b74-2b7d-eb11f17bd46d@arm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2896634129355966227==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cybYC-0007Kn-4y for xen-devel@lists.xenproject.org; Thu, 13 Apr 2017 10:00:28 +0000 In-Reply-To: <87daa520-a69d-3b74-2b7d-eb11f17bd46d@arm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Julien Grall , xen-devel@lists.xenproject.org Cc: Andrew Cooper , George Dunlap List-Id: xen-devel@lists.xenproject.org --===============2896634129355966227== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-8beuLY+mspCrds1GMosN" --=-8beuLY+mspCrds1GMosN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2017-04-13 at 10:42 +0100, Julien Grall wrote: > Hi Dario, >=20 > On 13/04/17 08:49, Dario Faggioli wrote: > > Since the counter is unsigned, it's pointless/bogous to check > > for if to be above zero. > >=20 > > Check that it is at least one before it's decremented, instead. > >=20 > > Spotted by Coverity. >=20 > Do you have the Coverity-ID? :) >=20 This comes from the Citrix internal instance, so the ID wouldn't make any sense. I don't know if the XenProject instance has also caught it. I guess it's likely, but I don't have access, so I can't check. Adding the above line is what Andrew suggested doing (saying he does it himself) when things like this happens, to better reflect the reality. Let me know if I should do anything different (of feel free to add or change anything related to this upon commit). Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-8beuLY+mspCrds1GMosN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJY70wxAAoJEBZCeImluHPuBOwQALyh7nuOTmTomNrTeA17S9JG 99pbNZNTbn8KCUchJvM75KA1BD1UzuXKJ3HQrrOF0cA9K51QSQJYIL6RGE5PVoQ9 ftUWjw+e88hfg7ipv2sNcx/S3aS/UwJn1nQaJmTsNKLZt+rg3xZzFyODX0TT1ECJ ucfRdMhvC+NMJQCKDk5sJ95kaYy73+d2gQL6EDsPK/Tau6pXKW2l1o/t6KKZSal/ A56QmpaJ4wrc9mCkvSTuTpYGUs4mLEQiOxhMdtnieIYkh8iCST+LYHRELe0tAIvK yZQpaA1a3s5yvYYSLKtkAQHyxbVDS0drURVxefNgUb0NGN6LXwAa9Yzk98IOb+GF ykq9IiBkmtiQ3ORmmZJOz7FV7hKQ8rosWKOugXy5oxwZEt7o27YyILKIjnjNbFCI s7jB3UkoGKPEZUrKhT4/RSz+pK5AGaCeF9rhcLlUb1BPHZZduNO6GVH/ZbPGbU2y KDqIJfmcnzJtvvU/FP1hH2IqwpyihxeEL+Vcpq8aIfE5Vt9a19v0UBwq3NBgItiH o6ZiFKiX2mv747kLebj/0idVATHTemsTYrfYAnqUEQP+zyt6vWZrAs3sPvbehWg/ aY8SErcQui76FW6lKhKgVHZxcemm5w45Ny8O6GHJzxtqNqQJmgPy8kIpgVSjgjEz CigbtqC44ELUktrqtt3I =Nkll -----END PGP SIGNATURE----- --=-8beuLY+mspCrds1GMosN-- --===============2896634129355966227== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============2896634129355966227==--