Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp985782imi; Fri, 22 Jul 2022 14:16:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uKgZIB87nIXqtzP+4tkuirQEKX0TdE6uqKl9j5Dtf4MPGLMplPSjETH7eKyWd8jOOv9QVp X-Received: by 2002:a17:907:a049:b0:72b:1432:5c4 with SMTP id gz9-20020a170907a04900b0072b143205c4mr1395921ejc.263.1658524570426; Fri, 22 Jul 2022 14:16:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658524570; cv=none; d=google.com; s=arc-20160816; b=tu4sVGIRT2htyMwOgw9Fnuj5kZnnimcIh9JtfR7beMcdof0GuDBaQOOgPoemcEF8OU h471DVx2jsdprktEgHe+tcfJhOFa4Idue/CtEdwKb0YVjskr4IM1cxEUJHCfKdkzaynX X2cw2dMbOl6py6KssYAKj1c2y5kqXH3yD1YHWty3dSzvzHeEJMIy8rvVwOnZHnE93Agt AqyENSGZe6o9I6xkDSuGyI4bThQM3jMDygeouDLe+xpUIDkeu/5l/LC44Q6T6Mz3Trwp Smll4+spPu1sjEfOQvQuUH97kuX2sO1Su7oas9yj2nyqIfwjMo2PzAntH9xvvV5VATbV pyQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=C4VMOw5ZurYpzdTyZc4RfmhO3hKlQCRXTQ2X4qGf7UU=; b=PVOc1h7q0AWN7y6pTHDPQ0OyMYw5f472sfWneHc9Bugv7jzNhpuQ1TiTMrfppJA632 gHkhT1XUN5GCNVQFfKmlYvZQdAlul+q8rkkAcvzRrrAR+O/P4DGdf7NomnzPF6zrfZNR V/V57S7Evu1RzLq9GOKzs9HIGUkShA7416QyIxYFYufafnVMAj9qfsQgRJJiS5ZViVys aqNEbeOq4H6Uy8NbUS/Hdn7cpJqFD2lm+W26BZC3xugGskC1wWgrqE672Y2EBVkxoy0s Xy27LInD99p+4N9BdZ64joF0whwH5iT/jdUj0Njph5Sl52Pb8A4uwZII8cmMDZcRau70 aKnQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a056402350b00b0042e1708c0ebsi7221529edd.579.2022.07.22.14.15.44; Fri, 22 Jul 2022 14:16:10 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235642AbiGVVJK (ORCPT + 99 others); Fri, 22 Jul 2022 17:09:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbiGVVJJ (ORCPT ); Fri, 22 Jul 2022 17:09:09 -0400 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AB859B56C; Fri, 22 Jul 2022 14:09:07 -0700 (PDT) Received: by mail-pj1-f49.google.com with SMTP id go3so5375946pjb.0; Fri, 22 Jul 2022 14:09:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=C4VMOw5ZurYpzdTyZc4RfmhO3hKlQCRXTQ2X4qGf7UU=; b=i55kXEvOUhO98/sJJyg4Zl6V+vVyjQVHdE5eMDyJ4I9RcsqLeV2JRYaHzkuxQLO0Yj yOojq7w2LtKE/7Fh69fl3LnRrKPoLpcOKXnnnOYRqr3N4yQ89KHv8C7AtOtYa011QI/X 06OrFvrDZCTS9fILanCqcT96BshNOa1FLhizY0q1bSpWvRaF1WilnLBr2USYuodhhwmX e9ABPWcfj0VPzkzc0TxLpPZQHlM4Xp5hSCKVD3kpIcDqm9BgChFhNIzqJvx1haQaqspS S/hHEjo0O4W0gPKqYYVG70xlK3RSvNHsJUz0AL5eU8Zk5YTaslGNXxke7Hf98dgv6SWr JvIQ== X-Gm-Message-State: AJIora8FoArq3eGOR/cnNW9CzjqBhYOTocTWsfFz8mqheW27GQrp76rD BXIfomoqwZ1NJFF0GUtOe6Q= X-Received: by 2002:a17:90b:3890:b0:1f0:2abb:e7d1 with SMTP id mu16-20020a17090b389000b001f02abbe7d1mr19493333pjb.158.1658524146701; Fri, 22 Jul 2022 14:09:06 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:805b:3c64:6a1f:424c? ([2620:15c:211:201:805b:3c64:6a1f:424c]) by smtp.gmail.com with ESMTPSA id y65-20020a62ce44000000b00525b61fc3f8sm4415198pfg.40.2022.07.22.14.09.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jul 2022 14:09:06 -0700 (PDT) Message-ID: Date: Fri, 22 Jul 2022 14:09:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2] scsi: fix WARNING in scsi_alloc_sgtables Content-Language: en-US To: Jason Yan , martin.petersen@oracle.com, jejb@linux.vnet.ibm.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, hare@suse.com, hch@lst.de, syzbot+d44b35ecfb807e5af0b5@syzkaller.appspotmail.com References: <20220720025120.3226770-1-yanaijie@huawei.com> From: Bart Van Assche In-Reply-To: <20220720025120.3226770-1-yanaijie@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS autolearn=no 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 On 7/19/22 19:51, Jason Yan wrote: > When iovec_count is non-zero and dxfer_len is zero, the sg_io() just > genarated a null bio, and finally caused a warning below. To fix it, > skip generating a bio for this request if dxfer_len is zero. Reviewed-by: Bart Van Assche