From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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" 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: MIME-Version: 1.0 Content-Type: text/plain Sender: stable-owner@vger.kernel.org List-ID: 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