Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1054287ybt; Wed, 1 Jul 2020 17:30:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPiz8UbbGSOVSLyY2Sx+LPo71vYLASAwj7qyS7Wke4PBcbYc3NjbIX8ybh4JfzJiwspBGC X-Received: by 2002:a17:906:160f:: with SMTP id m15mr17489676ejd.423.1593649853503; Wed, 01 Jul 2020 17:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593649853; cv=none; d=google.com; s=arc-20160816; b=gDoi/VxiA7OnXJ92xqNCsiV9z2DMFoMzxvKljHzP98A1pg33C+2qmkTnoHXMTmP8Ly FKVWAWE4qLGjPodXrStfH/2O78NXrlAnFovwVPXqu9p3bzfrMDPWf+K+4545+zaeuwHn TYxr275/TVM0WeylODEMy3F2td23s4y+XcjSRExSqwW/s/90ndDveYfoe0LWUppqQUVr ZTqaPxDHZJ3dSE3StOyVUE3BQoryVJFnShW7r+26ep4dgSy2g8zPhsJbC3CDdxocWkte XqrewxZCdmVAFl78crobntN8hOAIx+N84yoT8ZNwfThrFAxSkxGQlowozWQmS2kENBvR sZAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1hGb1RxRhBMGgjCYb9g+byDx9YMhV5xl7DB9Z5xqZRQ=; b=WA7xNKiT+9bZJHqrIymyPZ9xBIIEJy1Mb5zDoPtmdtu51LvloLxIOX6YP9bjQJ7kI4 rDMOolGxc1SHQY4f6e68CcWrlJS0j1GJuBh/kBSx/84pA/Ml+RtL/DgZQQxsqadn3FJG HI8CfuUPzoqzMmyjbwZa0yZMQLjQYV8d9DNwZDtGzKtmdCQ3tLdKwTKjWtrlsmRNjadc 4oigkssVAxJJnIU24xZ4XnUe7DzAxdkBNC8SSngv5p/6ok4QfUOEYTCTEBmPK/PIWKy1 JVYRbfsT9ncOpnxsJJCHaDh91cKhz2KEKDpY1uBo5wt9jJJyCfoEqc/lUQKeOBcfAfx9 UhgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=Bqm1wtf9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qo11si5065603ejb.566.2020.07.01.17.30.30; Wed, 01 Jul 2020 17:30:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alliedtelesis.co.nz header.s=mail181024 header.b=Bqm1wtf9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alliedtelesis.co.nz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728147AbgGBA2J (ORCPT + 99 others); Wed, 1 Jul 2020 20:28:09 -0400 Received: from gate2.alliedtelesis.co.nz ([202.36.163.20]:47392 "EHLO gate2.alliedtelesis.co.nz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728059AbgGBA1x (ORCPT ); Wed, 1 Jul 2020 20:27:53 -0400 Received: from mmarshal3.atlnz.lc (mmarshal3.atlnz.lc [10.32.18.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by gate2.alliedtelesis.co.nz (Postfix) with ESMTPS id 87EAD891B0; Thu, 2 Jul 2020 12:27:47 +1200 (NZST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alliedtelesis.co.nz; s=mail181024; t=1593649667; bh=1hGb1RxRhBMGgjCYb9g+byDx9YMhV5xl7DB9Z5xqZRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Bqm1wtf9YrY11HE8ovfd5zFjCs7cnm1RqRS5SDwk9Hfao2foBe+itXXzCvOkYkcT2 m93iMrPyh3GSM9qXFWwU6eoSbBoCWivbgl3M3tIiVITptyXTqkcpvHZV1dXBqxLch2 dVm625Q+1tAcFq0lRsP2z90g7352jiTlnnGny+wsAvwnitVCqTM5tqYYOtAPF2Bplb gjpSfgaxUJqe4ah5WkFmdhJQqTdDbRogLXxcRhLwgdxjG5jul/D59daN6xtXkCMM6r NjSFgsx7XkzxGO+T9yFn2/dvGr6O1f4POZrcZZCPc9vb9pYZZJgkkyn4FrsF5T0q63 dRWw0NI01xuOw== Received: from smtp (Not Verified[10.32.16.33]) by mmarshal3.atlnz.lc with Trustwave SEG (v7,5,8,10121) id ; Thu, 02 Jul 2020 12:27:47 +1200 Received: from mattb-dl.ws.atlnz.lc (mattb-dl.ws.atlnz.lc [10.33.25.34]) by smtp (Postfix) with ESMTP id BB5A013EDDC; Thu, 2 Jul 2020 12:27:45 +1200 (NZST) Received: by mattb-dl.ws.atlnz.lc (Postfix, from userid 1672) id 452094A02A3; Thu, 2 Jul 2020 12:27:47 +1200 (NZST) From: Matt Bennett To: netdev@vger.kernel.org Cc: zbr@ioremap.net, ebiederm@xmission.com, linux-kernel@vger.kernel.org, Matt Bennett Subject: [PATCH 3/5] connector: Ensure callback entry is released Date: Thu, 2 Jul 2020 12:26:33 +1200 Message-Id: <20200702002635.8169-4-matt.bennett@alliedtelesis.co.nz> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200702002635.8169-1-matt.bennett@alliedtelesis.co.nz> References: <20200702002635.8169-1-matt.bennett@alliedtelesis.co.nz> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable x-atlnz-ls: pat Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the entry itself appears to be being leaked. Signed-off-by: Matt Bennett --- drivers/connector/cn_queue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/connector/cn_queue.c b/drivers/connector/cn_queue.c index 49295052ba8b..a82ceeb37f26 100644 --- a/drivers/connector/cn_queue.c +++ b/drivers/connector/cn_queue.c @@ -132,8 +132,10 @@ void cn_queue_free_dev(struct cn_queue_dev *dev) struct cn_callback_entry *cbq, *n; =20 spin_lock_bh(&dev->queue_lock); - list_for_each_entry_safe(cbq, n, &dev->queue_list, callback_entry) + list_for_each_entry_safe(cbq, n, &dev->queue_list, callback_entry) { list_del(&cbq->callback_entry); + cn_queue_release_callback(cbq); + } spin_unlock_bh(&dev->queue_lock); =20 while (atomic_read(&dev->refcnt)) { --=20 2.27.0