Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1265937ybc; Tue, 12 Nov 2019 17:41:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzYxZnLfWvmjU+zC68+hsovtrYLxsXcCQsMiKv4fpmqrZE1tu2o4fhNdsb9vibQ0sIil9Cz X-Received: by 2002:a50:91c4:: with SMTP id h4mr968233eda.36.1573609289562; Tue, 12 Nov 2019 17:41:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573609289; cv=none; d=google.com; s=arc-20160816; b=yyzmWtB0puoUJPrx7EtuFK+87Nbtdhy+UPY+LxCgSQMhysVg2Ju1ox51DgQ8oiBl3C Xg1wrYDgNvrPyQJrSrcdbXwLBu06Bl7SdL8GHpaQHV6on6PfU0LV/cQ8pnrMUQdgFW49 afJEa+KnTFUbh3buR+o6YV9f6Z7iYDp4mmdVM0j3VLosjM9CPbY4sAXVi1mUNDpAcQvb l63dDxzRqe88ydCTB1cbBP3weBXqxJkeqLtnocu6gQMujkg4YkyaR8JkiS7Ru5USBXC4 mABVCRAeb3TLo9OHHOOdEuTVz/8DCpYWddyAjbTXlw6/triyt8GRQgKom2BhY/cNmj4i U00A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:organization:from:subject:cc:to :dkim-signature; bh=nBEVt/y9CIbMxIiZwK0x8Vgf1UghyXUE7rZHgMKFOkI=; b=NbaLY4qdohANEmyVj3OV6SBSMWLQz3MQNf0JFjSEnHIAwIbcOEFC7EehLGmOsmyYeg Oyo1mfHKwcR+NDmHAsR0rFIOkGnuJFbSyQioQg/2r7ygMe1kBX+2mhyRETOoO341rGk7 lwitjSVAAnY3rTy4guDwG6Donv6emhuG1FPDVoD0E7+ZXxYTlXxf0iJeO0ReWlq6r3Zq z2bcrDTyIVeYhyk7HaZQ1rumgMz5ckYxs2aNmMEldcUnAK4C7eM5sKXs7aLaIRjXKq4R f1+tf4/T4wCjvhqDtvkoexSIJQlfF5c5BuketlgLg+I527Xc3yTufpM9qy2kxeZyzcLc R2ug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=gHFWHkKm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14si271961edf.199.2019.11.12.17.41.05; Tue, 12 Nov 2019 17:41:29 -0800 (PST) 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; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=gHFWHkKm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727355AbfKMBiy (ORCPT + 99 others); Tue, 12 Nov 2019 20:38:54 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:38452 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727041AbfKMBix (ORCPT ); Tue, 12 Nov 2019 20:38:53 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xAD1YNRM001889; Wed, 13 Nov 2019 01:37:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : references : date : in-reply-to : message-id : mime-version : content-type; s=corp-2019-08-05; bh=nBEVt/y9CIbMxIiZwK0x8Vgf1UghyXUE7rZHgMKFOkI=; b=gHFWHkKmteGiPHt8Q2AnfXoA/gc79ee+q2VElCvQBq2gz2vqpEv72tZyhzpwOsLKx+Pz 8Xq4hNrXWTQiYDzHVm5TEd/mcNETQyvup3T2v7BFiLbjVDpdJFdGGnD6njWQ+9Z1uFto 9v8UFv8vhSNzJI/ByC5+l5Tp9u4Y68yFdppMngOFTDqbnZpEPzBA3A21zJmmBWoRCt0f mgc+2SaU58k4Yoa0QzkE7BC+yx7hQi9jiC7r5t4Ywnf09gp+UBcuaacd1GvPpLqfeq6W PpabvpZeaiNuQRfsArkzxa0bSonp7QeF6AvbhaJpXEtEEu0YPBwuLfiBK9Wh2ZwhiCUo mg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2w5p3qrpjg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Nov 2019 01:37:16 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xAD1YJqY091498; Wed, 13 Nov 2019 01:37:16 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 2w7khmdhh3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Nov 2019 01:37:16 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id xAD1b9IQ007575; Wed, 13 Nov 2019 01:37:09 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 13 Nov 2019 01:37:08 +0000 To: "wubo \(T\)" Cc: "lduncan\@suse.com" , "cleech\@redhat.com" , "jejb\@linux.ibm.com" , "martin.petersen\@oracle.com" , "open-iscsi\@googlegroups.com" , "linux-scsi\@vger.kernel.org" , "linux-kernel\@vger.kernel.org" , Ulrich Windl , Mingfangsen , "liuzhiqiang \(I\)" Subject: Re: [PATCH v3] scsi: avoid potential deadloop in iscsi_if_rx func From: "Martin K. Petersen" Organization: Oracle Corporation References: Date: Tue, 12 Nov 2019 20:37:05 -0500 In-Reply-To: (wubo's message of "Thu, 31 Oct 2019 06:17:01 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9439 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=957 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911130008 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9439 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911130008 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > In iscsi_if_rx func, after receiving one request through > iscsi_if_recv_msg func, iscsi_if_send_reply will be called to try to > reply the request in do-loop. If the return of iscsi_if_send_reply > func return -EAGAIN all the time, one deadloop will occur. > > For example, a client only send msg without calling recvmsg func, > then it will result in the watchdog soft lockup. > The details are given as follows, Lee/Chris/Ulrich: Please review! -- Martin K. Petersen Oracle Linux Engineering