Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp892159iog; Thu, 30 Jun 2022 12:14:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sA5LKBej88qU1goeADc0j+PTVhWAU+lSlXMk9z2ClyFPoA5sTMLsKWk1bM+xPiIip+Iyn1 X-Received: by 2002:a17:906:6015:b0:726:95c1:924f with SMTP id o21-20020a170906601500b0072695c1924fmr10111470ejj.576.1656616497586; Thu, 30 Jun 2022 12:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656616497; cv=none; d=google.com; s=arc-20160816; b=xJgmpUORWSrkYJGQAsK+f1tDfwpiyD7/A6xzAXqb+jADrLNeT44Bv3hC3X5tpM6ceQ /5mSC3T+9G9BftyPzihFmmPyYxLRHldf88+Sjm7lBB5sOYAda0CKnL3Dp69iv2JH0NIl HmXhR2IwR0/Cd2TkdKfhEvhAVqiQWPL9Hmsgtp+8B1Zva9TB5NsGebLh4lF2a46s3A8k JAiQJvKVw2k/aem4lRJqoElsOC+DGTWfjJeLMgCt8q6MPpyOrGpY4IooUbKb9SaGfucH xLsynRpbO/9vJP3FB8RXPozkDNnxnO6cReAuBdbuRo11VMRWVtBePvkFlTnRKmgpoZxw Rniw== 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=GJcM7Vwr3H/bLC7hAn6JczygD8HdfVoG28VG/DeZhMI=; b=ddqGUYl4d71di5nIoAnUOZTf/ghJGoB2LxlhLsDne0RdBsOv8MtEW1iLadGuJNOPAd Ju9G5J8KYkiMAxPZtkKQN8jPo07wOK0Zlo2JkG6jm3JYhb8QlBWJKwLNKXyloUa6kEFG MjfD21UM+psGcc7LVFNRJ/Lp/I/AjTfr6nlaD5c5bU5OmxgsdUAIaw9AW2Mh7wZnlR7D 4SfBnSvKGuJcHLZR+PbexLzeg87ehvY/+B6ue+fw4VpENOCqyqOU5I36UKNdfdGdcBYQ INXi0PT0qDa300dMBd6vQH+glZxE1ZxWqZeZZIMibCcRhHgvbzmGUixz4n3wWLKTF+sG FXUQ== 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 sa3-20020a1709076d0300b00726cf00b7ddsi6050005ejc.803.2022.06.30.12.14.31; Thu, 30 Jun 2022 12:14:57 -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 S236732AbiF3Sm6 (ORCPT + 99 others); Thu, 30 Jun 2022 14:42:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236727AbiF3Sm4 (ORCPT ); Thu, 30 Jun 2022 14:42:56 -0400 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACF524162D; Thu, 30 Jun 2022 11:42:55 -0700 (PDT) Received: by mail-pj1-f53.google.com with SMTP id dw10-20020a17090b094a00b001ed00a16eb4so318110pjb.2; Thu, 30 Jun 2022 11:42:55 -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=GJcM7Vwr3H/bLC7hAn6JczygD8HdfVoG28VG/DeZhMI=; b=meIno/FSJ8pDhMIZPSW0auwqyGwTyZTxoUw9m5Gen3VxCbdjrRi83yiKhhpB/a9YIO pm9utu91C9Rcc85aLVkSAN6OBjg83/lKx5cNXQbVMBcTOMsqIdEPloxZ5IhTUKBQXEhm hgUg95aZtE3jHkmxdDj1+3IxvKST1evZnA/K6ws05QKpjYRJDZn1uPnKShesSbPmKly0 YfBCaeRsfC+95yX82Fy+G1dHtRd4oHxCHh9xfkcXex9Ffx4GjAVqbg3KZV7hZHm1dvPH BcEyUlSH+OFtL7YU9yaCRIkBBvM5x2kaH8tywt9roEm8C0wI9Iv7hVDwAs+pfcFmYkZ1 XyJw== X-Gm-Message-State: AJIora8cxC7zkDeeF5sS0x9tk5W5zRq1y3mKqk28RZA2CeQxnWMjrMZu m5/hqWyW5c+ptCoDkGJr7qJvnmxIm/33kQ== X-Received: by 2002:a17:903:32c4:b0:16a:4227:cd68 with SMTP id i4-20020a17090332c400b0016a4227cd68mr17064005plr.173.1656614575093; Thu, 30 Jun 2022 11:42:55 -0700 (PDT) Received: from ?IPV6:2601:647:4000:d7:feaa:14ff:fe9d:6dbd? ([2601:647:4000:d7:feaa:14ff:fe9d:6dbd]) by smtp.gmail.com with ESMTPSA id l22-20020a17090a3f1600b001ecfa85c8f0sm2308090pjc.26.2022.06.30.11.42.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 Jun 2022 11:42:54 -0700 (PDT) Message-ID: <0c8a4d70-3ef9-bc1c-51ad-9063fdfb43bc@acm.org> Date: Thu, 30 Jun 2022 11:42:53 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: use-after-free in srpt_enable_tpg() Content-Language: en-US To: Mike Christie Cc: "lizhijian@fujitsu.com" , Jason Gunthorpe , Leon Romanovsky , "linux-rdma@vger.kernel.org" , "target-devel@vger.kernel.org" , open list References: <17649b9c-7e42-1625-8bc9-8ad333ab771c@fujitsu.com> From: Bart Van Assche In-Reply-To: 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,T_SCC_BODY_TEXT_LINE 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 6/30/22 09:40, Mike Christie wrote: > On 6/27/22 11:37 AM, Bart Van Assche wrote: >> On 6/27/22 00:09, lizhijian@fujitsu.com wrote: >>> So far, I doubt if the previous defect of configfs mentioned in >>> 9b64f7d0b: "(RDMA/srpt: Postpone HCA removal until after configfs >>> directory removal)" has got a better solution. if not, i have no a >>> clear mechanism to avoid it yet. >>> >>> feedbacks are very welcome. >> Mike, are you perhaps aware of any plans to add functions to the LIO core for removing tpg and wwn objects? >> > > I don't know any work being done in this area. I was only working > on the refcounting/configfs parts for sessions in those configfs/sysfs > patchsets. However, I think I hit similar issues with the session. > I went around the world with solutions but didn't really like them > so I never pushed the patches for inclusion. > > What was the hang caused by 9b64f7d0bb0a? Hi Mike, I have not been able to find Honggang's bug report that led to the revert of that commit. I guess that the hang happened in the while-loop in srpt_release_sport() that was modified by commit 9b64f7d0bb0a. Thanks, Bart.