Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2729490rdb; Fri, 22 Sep 2023 07:02:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeFJ3FtXirJMxv2tb+iUNkPpIo8Loqp3RSatDKtkISPQJUm5gCsCvRUbUzKBl4YMOqXqnD X-Received: by 2002:a05:6a20:7352:b0:15a:f4e:620d with SMTP id v18-20020a056a20735200b0015a0f4e620dmr9520698pzc.4.1695391353055; Fri, 22 Sep 2023 07:02:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695391353; cv=none; d=google.com; s=arc-20160816; b=wqVkp5NmXe49fOUdDYbviRVUCT0milOsmUygmUMJBRRR1PsPgY+mTcZgZFoqHNjbTe zXNQyXEPkcignOj3iYwAWpfoyvUDltLkAl7A+rfnq1wliZerg+dBxLloNSVFZJBBXe3N Upn7SdgDP47kUQU0yUua6b/eyR+licRaPZiFj/FC1AZo0EIRgUnFmcPh+iy8nilHgFsh XYZTEttPtQXz5INRp40ClfiKtFLJhFz57JnX5sPsQwcg4SMAQ8vsdRfaHr+wV3UUrSHa YqXeSfHP9lsLAlSIFD3LZgd8GC+Z2lqNRV09G6Zy6cr/YjxU5gPAeqf75qDSPPhUALus OaXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=041NcSK2xg9vELUbnnz/VC6KKr0Lk8fdF4ubzdiGFFM=; fh=oH3YAoWim95K3Sp7bAfKOQZ/Xh+cC054woXldPuY7hE=; b=S/uG2kpqW4MVaxSuChkpFs5U2wAcWYvyjMp1RewGDJ2xcKjT+jtHUmAiajZS0p4MAo gvWkDJttIL3a6oE/gWOnn1b55spQ9zSTHYhEgPTdP/zcV+RbIPkpYOtyYYqVl2sDRBUi eb1DDzS1CIw0a/owBZR7MBRjA7nCfMUGs4w4zyBk+/x0R4O5kYoYqmY+XXbjcbNHPoS4 LvKxrUZnfFsoaum/vp0qhSkQhk7fLmz/RRv1855tGFTfoTONcTExAI8U1HgIcXFsTmSg tuUJYvqC2vzNprAICnlHHw9cWsUFfEQKjxQJv2yOhI1z7hsU1bv9YcF1ybH9rxOLcSk9 lQww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=digRi2aG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id 65-20020a630244000000b00573ffd25b44si3776738pgc.182.2023.09.22.07.02.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 07:02:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=digRi2aG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id ECC7A83ED7FA; Fri, 22 Sep 2023 06:21:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233422AbjIVNVc (ORCPT + 99 others); Fri, 22 Sep 2023 09:21:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbjIVNVb (ORCPT ); Fri, 22 Sep 2023 09:21:31 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66A72CE; Fri, 22 Sep 2023 06:21:25 -0700 (PDT) Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38MD8ErB019058; Fri, 22 Sep 2023 13:21:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=041NcSK2xg9vELUbnnz/VC6KKr0Lk8fdF4ubzdiGFFM=; b=digRi2aGOht/6sTZvhvY6fQ4TSvd+tu7V7AemBoP3DQJyIwuzWxcTF9RK5fQaJ+JxyPh imem18SfVJKZqtq/LVAQi7B+BvSWKkWjX5EchiqSfyOiP4/9Vpm6Jix8xjPJcfQ1GEc+ tP6QxzKVOMK4xRszxRVi0NAygQSc7PeB/6e37Y8ITZljpiN/Pd3kPt7YkMwm+cWth8FW c/uNaY7vLVKnVbzIQ4DhFdmgl9KjhzYhNstd4oF26eBLQu6jTRmAgUfiEVIOLvvxF/58 VB8Wsk2KnFFZLh9t64HVnI+KN7JTXP2uLY4YQI/sA6bt8mOp+9jz88GMztbN9X1lEHAf +w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t9bap0v1e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Sep 2023 13:21:24 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 38MDAmK8028390; Fri, 22 Sep 2023 13:21:23 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t9bap0v0f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Sep 2023 13:21:23 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38MDIx10026005; Fri, 22 Sep 2023 13:21:21 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3t8tsq2ghx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Sep 2023 13:21:21 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38MDKcFk9044266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 22 Sep 2023 13:20:39 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5484D20071; Fri, 22 Sep 2023 13:20:38 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8CF662006A; Fri, 22 Sep 2023 13:20:37 +0000 (GMT) Received: from li-ce58cfcc-320b-11b2-a85c-85e19b5285e0 (unknown [9.171.56.45]) by smtpav03.fra02v.mail.ibm.com (Postfix) with SMTP; Fri, 22 Sep 2023 13:20:37 +0000 (GMT) Date: Fri, 22 Sep 2023 15:20:35 +0200 From: Halil Pasic To: Cornelia Huck Cc: Dinghao Liu , Vineeth Vijayan , Peter Oberparleiter , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Julian Wiedmann , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Halil Pasic Subject: Re: [PATCH] s390/cio: Fix a memleak in css_alloc_subchannel Message-ID: <20230922152035.3ef1cb7e.pasic@linux.ibm.com> In-Reply-To: <87sf76z961.fsf@redhat.com> References: <20230921071412.13806-1-dinghao.liu@zju.edu.cn> <20230922141700.10895474.pasic@linux.ibm.com> <87sf76z961.fsf@redhat.com> Organization: IBM X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: zApFOfvF3wOAuMO5TvD1YZs04XXQLaB5 X-Proofpoint-ORIG-GUID: 2aKb4tSnqQWCEUmT5N7wkdDRawNhfUI2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-22_11,2023-09-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 mlxlogscore=727 malwarescore=0 phishscore=0 adultscore=0 mlxscore=0 impostorscore=0 suspectscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309220111 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 22 Sep 2023 06:21:55 -0700 (PDT) On Fri, 22 Sep 2023 14:25:58 +0200 Cornelia Huck wrote: > > - spin_lock_init(&sch->lock); > > + sch->schid = schid; > > + if (cio_is_console(schid)) { > > + sch->lock = cio_get_console_lock(); > > + } else { > > + err = cio_create_sch_lock(sch); > > + if (err) > > + goto out; > > + } > > > > I did not spend a huge amount of time looking at this but this > > is the only reason I found for sch->lock being made a pointer. There may > > be others, I'm just saying that is all I've found. > > Author of 2ec2298412e1 here. If I don't completely misremember things, > this was for the orphanage stuff (i.e. ccw devices that were still kept > as disconnected, like dasd still in use, that had to be moved from their > old subchannel object because a different device appeared on that > subchannel.) That orphanage used a single dummy subchannel for all ccw > devices moved there. > > I have no idea how the current common I/O layer works, but that might > give you a hint about what to look for :) Yes, that is what the commit states and what the series is about. I hope Vineeth can give us some answers :) maybe even out of the top of his head... If not, I would trust his judgment on whether figuring things out is worthwhile or not. Regards, Halil