Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp805087ybx; Wed, 30 Oct 2019 05:24:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyeQm1S8Wd0RDsTfM1M+fLwPP7u8RWxec6t5AVoAc1jFcfqRprB24aGNvnoDmfC9KrCYcM X-Received: by 2002:a17:906:742:: with SMTP id z2mr8758317ejb.32.1572438290649; Wed, 30 Oct 2019 05:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572438290; cv=none; d=google.com; s=arc-20160816; b=wGqH1e2j4yQ0VI4JwLaSQJvT650cpEQDi8SSO+Gr/hO/5867zhS3WmCE8xOtSp+ZkJ PEJR6hGJuBgIchZLHcoqMsDErt3axQY1YLhRFqWckwAjYjDR+4JALi5kzOuBgQjiiTrE nhqCLeq+SDcyc0tNbASkB3PBRnQgHUY9NG3ho3KaTENdrSF7J47QvfkBHAQSWxGVeLDB x6LZr5oebjgaywd/dIdy00VVAB5DQfPnMPdSimlBcCsjRGhGfrDI/slXmq1bPHVvOhJp hm20VdQYyansIhffFqLGkhu2GH2QBJRY0sjARo/a3P6gHxORhD8cqDG9132HPVaCwD1a iY8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=GI86JFX9ANN9eomgOWGTIc4PN05bVKg9IQhr3P6D8c0=; b=e6e+v5e/U07wrkTXzh0xqG0Sdgz5ndtfknbtsa4RSkrlEfxL3pm+gQxKSWZiFCthr8 4LLmvu9+jQLPuNBznC7nZt0RMED+30Btd/cL9A6gsUywVLiYfMK15K+U++mJEhej8FS3 AUZkpdQklMdNhGhEV2Jr9Mifp3acoLXe98W8PV7upGLhacbKkwy9RmzLNi7bcig1cH7A X4gguJztpQ5rnEE/KBjarBNKRcU7ZHYXEotctL7bfIZl8HTz+NFpimH8DJlIyinHiSdb nnvpgYqZSbbR+qVVBWyYqZzW67c4arRIcP+ykHQUBXxgM1r/Axosv2mUyNuV69Vm2GTA XgUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si1202068ejc.98.2019.10.30.05.24.26; Wed, 30 Oct 2019 05:24:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726712AbfJ3MW5 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 30 Oct 2019 08:22:57 -0400 Received: from szxga08-in.huawei.com ([45.249.212.255]:42268 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726353AbfJ3MW5 (ORCPT ); Wed, 30 Oct 2019 08:22:57 -0400 Received: from DGGEML402-HUB.china.huawei.com (unknown [172.30.72.55]) by Forcepoint Email with ESMTP id EC1363EBEB1E57610E20; Wed, 30 Oct 2019 20:22:46 +0800 (CST) Received: from DGGEML505-MBS.china.huawei.com ([169.254.11.138]) by DGGEML402-HUB.china.huawei.com ([fe80::fca6:7568:4ee3:c776%31]) with mapi id 14.03.0439.000; Wed, 30 Oct 2019 20:22:37 +0800 From: "wubo (T)" To: Ulrich Windl , open-iscsi , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , Chris Leech , Lee Duncan , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" CC: "liuzhiqiang (I)" , Mingfangsen Subject: Antw: [PATCH v2] scsi: avoid potential deadloop in iscsi_if_rx func Thread-Topic: Antw: [PATCH v2] scsi: avoid potential deadloop in iscsi_if_rx func Thread-Index: AdWO9lESg1/320hTRWyI93hubYXiRQAAM+TA//+AUID//1OToA== Date: Wed, 30 Oct 2019 12:22:37 +0000 Message-ID: References: <5DB946E1020000A100034B9C@gwsmtp.uni-regensburg.de> In-Reply-To: <5DB946E1020000A100034B9C@gwsmtp.uni-regensburg.de> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.221.252] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > >>> "wubo (T)" schrieb am 30.10.2019 um 08:56 in > Nachricht > huawei.com>: > > From: Bo Wu > > ... > > + if (--retries < 0) { > > + printk(KERN_ERR "Send reply failed too many times. " > > + "Max supported retries %u\n", > ISCSI_SEND_MAX_ALLOWED); > > Just for "personal taste": Why not simplify the message to:? > + printk(KERN_ERR "Send reply failed too many times > (%u)\n", > ISCSI_SEND_MAX_ALLOWED); > > > + break; > > + } > > + > > Maybe place the number after "many" as an alternative. I think as the > message is expected to be rare, a short variant is justified. Thanks for your suggestion. This problem occured when iscsi_if_send_reply returns -EAGAIN. Consider possible other anomalies scenes. In order to get diagnostic information, it is better to replace "many" with error code. Modify as follow: if (--retries < 0) { printk(KERN_WARNING "Send reply failed, error %d\n", err); break; } > Also one could discuss wether the problem that originates "from external" > should be KERN_ERR, or maybe just a warning, because the kernel itself can do > little against that problem, and it's not a "kernel error" after all ;-) You are right, This problem scene rarely appears .it is friendly to replace the error with warning. > > Regards, > Ulrich > > > Thanks, Bo Wu