Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4622493imm; Mon, 18 Jun 2018 19:18:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJElFVri9TPo1R6Kr1xVZKkBltUljRdm73CsZQWRDAEE8SPzhUxbSSIHRw2Fv6DXvDeOzM+ X-Received: by 2002:a17:902:42c3:: with SMTP id h61-v6mr16610508pld.319.1529374711121; Mon, 18 Jun 2018 19:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529374711; cv=none; d=google.com; s=arc-20160816; b=Mm529KgG4SXDBjrH5RaVRMqnYgI0zfAMzU7G49miSQ560G/ZJ7K1J6y1pCwTAPEpha N0B6m6V+LcpvU7QCUR74/e2+AWa959h8EGE4xbck13vVwrIV3YF08O5b7wNMEAUGxZu0 OurwA6UktnfHPdRTfmwZDUYNZEtibg32BzqoXv598n4c4PDYnplG+uIziuaUf63V96Ws HdcRhirEJFmImvJcA1PVszFYMFpYr1KhVlmlvraUeUmgsLAOduorUs/x03lGf0Zuy4c0 aArESgLkc5cqCLJU7rsZiWxVPFrx4BpExjCTgWFhZAWcwSo7CA0VNxvZWYZUitqrC6R5 +DSQ== 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:arc-authentication-results; bh=BBpLfvjRyuZFPGmfanq4TGIEVAfAJgcJujm/ggv6SaA=; b=d7Y0d3oqpbGdjKkLmgw7z+KYrur/t+dLUcdKc31U8mZuQaHNO7gbqAfI1Mj0YAEQWA XY5C2a6Rt1qGPBkAO+jTAUg41H8IO5glV8Lhe/qApnYLeURJ2bJb2IRapAHi1V+Otwg4 4VP/sidyrNzij7WwNeZoYJ1STM/uFt8kla/TvMEGoKJiT4CCf852WY806aKPOuxbdKKx 6kNiA45fpZFjXKY3BfmOlOGLBZUE2LsDVvtYZg9c016VS6NvBNL2m4Yj/FCLjvdWCwcm MHX+3LLld/xP/XL4GgXrtbO132eIV/xxtg0YviK3NdDFFPx1pzq/CxzrPORovY8k6BsV 7a8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=uNeozLZT; 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 h77-v6si17568549pfa.238.2018.06.18.19.18.17; Mon, 18 Jun 2018 19:18:31 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=uNeozLZT; 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 S937177AbeFSCRl (ORCPT + 99 others); Mon, 18 Jun 2018 22:17:41 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:55854 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937044AbeFSCRj (ORCPT ); Mon, 18 Jun 2018 22:17:39 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w5J2EC64021136; Tue, 19 Jun 2018 02:17:33 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-2017-10-26; bh=BBpLfvjRyuZFPGmfanq4TGIEVAfAJgcJujm/ggv6SaA=; b=uNeozLZTsrVCLQ+Vq2QlO2g8oCS7BMI5Ll2XDlVHhhnvBFVcm83T5YyBflLWAYBFZqZy UcZ/gMKVJ4RfIn3wNDVfX8iRv43IuUP7sRImGhxXSIQqsQc48CX0SNtKX6/i9018pUtg aY7QOuziZ8SiQrnN1qSye+huJVua4eiOSNEisWGM4ybCQMBMELJClK5m3TDA0qOSceiy tckIUXex/QW0mVFDLHnUfQspQ+bHSjtRDiWGKPDStudHf1RvVAfLiOlUGDz2iv4SyL35 JAe0g/MY1h+FeYY+fOKC4hl6MhteadukCNzoQu5LH5N1K5ZZHcQ96QyWgIix05tvR7mE +A== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2jmt01e9y6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Jun 2018 02:17:33 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5J2HXVP031229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Jun 2018 02:17:33 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w5J2HW9Q003475; Tue, 19 Jun 2018 02:17:32 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Jun 2018 19:17:32 -0700 To: Luis Henriques Cc: "James E . J . Bottomley" , "Martin K . Petersen" , Douglas Gilbert , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] scsi: scsi_debug: Fix memory leak on module unload From: "Martin K. Petersen" Organization: Oracle Corporation References: <20180618160803.11674-1-lhenriques@suse.com> Date: Mon, 18 Jun 2018 22:17:29 -0400 In-Reply-To: <20180618160803.11674-1-lhenriques@suse.com> (Luis Henriques's message of "Mon, 18 Jun 2018 17:08:03 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8928 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=677 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806190024 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Luis, > Since commit 80c49563e250 ("scsi: scsi_debug: implement IMMED bit") > there are long delays in F_SYNC_DELAY and F_SSU_DELAY. This can cause > a memory leak in schedule_resp(), which can be invoked while unloading > the scsi_debug module: free_all_queued() had already freed all sd_dp > and schedule_resp will alloc a new one, which will never get freed. > Here's the kmemleak report while running xfstests generic/350: Applied to 4.18/scsi-fixes. Thank you! -- Martin K. Petersen Oracle Linux Engineering