From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934497AbdBWATW (ORCPT ); Wed, 22 Feb 2017 19:19:22 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:37706 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932426AbdBWATN (ORCPT ); Wed, 22 Feb 2017 19:19:13 -0500 To: Colin King Cc: "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] scsi, block: fix memory leak of sdpk on when gd fails to allocate From: "Martin K. Petersen" Organization: Oracle Corporation References: <20170203193854.6782-1-colin.king@canonical.com> Date: Wed, 22 Feb 2017 19:19:02 -0500 In-Reply-To: <20170203193854.6782-1-colin.king@canonical.com> (Colin King's message of "Fri, 3 Feb 2017 19:38:54 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Colin" == Colin King writes: Colin> On an allocation failure of gd, the current exit path is via Colin> out_free_devt which leaves sdpk still allocated and hence it gets Colin> leaked. Fix this by correcting the order of resource free'ing Colin> with a change in the error exit path labels. Applied to 4.11/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering