Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7403293rwi; Mon, 24 Oct 2022 14:13:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM73kkslXOyPx21WYaMoFzaDpDGNtg6xuTBHCihSkpQ96jSsqr25VfN+5Eug1cus7/Dc8Xfl X-Received: by 2002:a17:906:cc58:b0:7a9:6b4e:79e4 with SMTP id mm24-20020a170906cc5800b007a96b4e79e4mr4687232ejb.57.1666646017893; Mon, 24 Oct 2022 14:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666646017; cv=none; d=google.com; s=arc-20160816; b=VmF5rx4QkPalHO7dg/GuFyfk+zrCQFOTf229YYSlvpBASNQOaUyqBhorhdoJOO/hjQ KNdjylpM2lQj5Pu2Lcq++SO8jMl4Y9lmcp+NTICil3LSjnc1ihFuKY80en5VRTllvu83 Wd8yBXrM+r20EDxp/8n2Nviqu2sroO4nviBY+lGVIP75SemuFBZdNWTBguffKZF/zl8o 0yj+uPKSQQ57PZi2xxRWketuZjZfUy8QSGU/i8oaIcATR1hz3tiJke/3HH8OR8W3+TnL 80NYAi63/uy4ZzPa4Kl+eFncrGZTNhLWjkmmNfuAMPh61C32xzOWA0xtS90Va1uHwGo3 YjcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=92rC7vra5jhLWtogZY2kc9h+cj7t9VuLWZS8/0qi9VI=; b=hmATf7i0gfVndQ49tYjeAoz9N3qaUiCp058AzzS8ZamMEUOWNsvxBQ8sCH3hAyYSzj Oww3eiiu5oMDJrwDFI5N412GJShfvXZeuRP8ZTQJzD1zdH0RmcgoCLag1or7L5qDZMHK bbVxMaPqFm+szMrj7tvcypIGZorNS5VudLhXpTCbCgF+EhoBoTlT+gEDhpt5+WFWdAKG 2AYqr7AUw5MYU7q0MRUzofXr+E2XV1LnSk+0Fer2pHXLAbQmPL2jBbjsu4UnUV+5Ls09 L4QoQse5aCZAMEByWsZteniSN3oXFiVhTrEuyCbiy4oa7h6HHahCa+ax/qx8l5XZCfc/ 0ZIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YHso0iYc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a1709064fcf00b007a11c253eaasi747573ejw.809.2022.10.24.14.12.56; Mon, 24 Oct 2022 14:13:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YHso0iYc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233033AbiJXVHE (ORCPT + 99 others); Mon, 24 Oct 2022 17:07:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232746AbiJXVGo (ORCPT ); Mon, 24 Oct 2022 17:06:44 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 947D92CA7E5 for ; Mon, 24 Oct 2022 12:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666638729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=92rC7vra5jhLWtogZY2kc9h+cj7t9VuLWZS8/0qi9VI=; b=YHso0iYclsdKJGcM0z18udr30n6DSj9Kx6PmViq/74d7TI4aTMd9Q1RXyYwJso3jDmWOeu 350QXlykfarfeNTmdLOylCXUf9R0v4oy4c4qukKRIKitxv0LAqDoJQyoTbIzKT7lXl5Z5G pYoX+U/Yw7ZeDh43isL4AmOIOYpt1Sk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-106-7b7FQSphNy-BQfdUC9UndQ-1; Mon, 24 Oct 2022 11:44:19 -0400 X-MC-Unique: 7b7FQSphNy-BQfdUC9UndQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E40BA858F17; Mon, 24 Oct 2022 15:44:18 +0000 (UTC) Received: from localhost (unknown [10.39.194.177]) by smtp.corp.redhat.com (Postfix) with ESMTP id 627801415114; Mon, 24 Oct 2022 15:44:18 +0000 (UTC) Date: Mon, 24 Oct 2022 11:44:16 -0400 From: Stefan Hajnoczi To: Rafael Mendonca Cc: "Michael S. Tsirkin" , Jason Wang , Paolo Bonzini , Jens Axboe , Chaitanya Kulkarni , Suwan Kim , virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] virtio_blk: Fix signedness bug in virtblk_prep_rq() Message-ID: References: <20221021204126.927603-1-rafaelmendsr@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="H+myidrQ2SNzoh0X" Content-Disposition: inline In-Reply-To: <20221021204126.927603-1-rafaelmendsr@gmail.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --H+myidrQ2SNzoh0X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 21, 2022 at 05:41:26PM -0300, Rafael Mendonca wrote: > The virtblk_map_data() function returns negative error codes, however, the > 'nents' field of vbr->sg_table is an unsigned int, which causes the error > handling not to work correctly. >=20 > Fixes: 0e9911fa768f ("virtio-blk: support mq_ops->queue_rqs()") > Signed-off-by: Rafael Mendonca > --- > drivers/block/virtio_blk.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi --H+myidrQ2SNzoh0X Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmNWstAACgkQnKSrs4Gr c8jYegf9FWI4IHxGcvMocCCgVz2xC4vCDXutBT1DcO/mwG8nFliPMNR10l8zwwTO VgkOzVoed8mckPmnWXNyePLJB68ZeOmRvWRuExPwqZNMNHx8Nq/xtTG2NmYWR1qm gfMJeRmaXxEdSy4Ah7NFx4y7LMRk2SodlFzQMzb4vcQOww0p+GCTyl5gDWYeGPCV wbKCqdaKCnu85W9Z8cgjVPX6ACqdnIsy2X6Kik3mKUjQr389my9HODEI+7hOrWuR 8Yode18jCQX8uR0gi1IriIso3vh7lNYyfGrCK2fpkwX1tlG1fFfDjhdftGwD5frR VkZXHYhphTdDZp+CcFRo7j2dO1mGLA== =nNPq -----END PGP SIGNATURE----- --H+myidrQ2SNzoh0X--