From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751817AbdJOO0k (ORCPT ); Sun, 15 Oct 2017 10:26:40 -0400 Received: from smtp12.smtpout.orange.fr ([80.12.242.134]:49752 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750854AbdJOO0j (ORCPT ); Sun, 15 Oct 2017 10:26:39 -0400 X-ME-Helo: [192.168.1.10] X-ME-Date: Sun, 15 Oct 2017 16:26:37 +0200 X-ME-IP: 86.196.182.67 Subject: Re: [PATCH] video: fbdev: Fix an errro handling path in 'au1200fb_drv_probe()' To: Bartlomiej Zolnierkiewicz Cc: tj@kernel.org, viro@zeniv.linux.org.uk, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org Newsgroups: gmane.linux.kernel.janitors,gmane.linux.kernel,gmane.comp.video.dri.devel References: <20170912053930.18931-1-christophe.jaillet@wanadoo.fr> <12781513.OMEBNrce0f@amdc3058> From: Christophe JAILLET Message-ID: <197e2a4e-bfc9-c0d5-11fc-c071be0c18b3@wanadoo.fr> Date: Sun, 15 Oct 2017 16:26:25 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <12781513.OMEBNrce0f@amdc3058> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 12/10/2017 à 18:25, Bartlomiej Zolnierkiewicz a écrit : > [ added dri-devel ML to cc: ] > > On Tuesday, September 12, 2017 07:39:30 AM Christophe JAILLET wrote: >> If 'dmam_alloc_attrs()' fails, we must go through the error handling code, >> as done elsewhere in this function. Otherwise, there is a resource leak. >> >> Signed-off-by: Christophe JAILLET >> --- >> I'm also puzzled by the 'framebuffer_alloc()' call a few lines above. >> 'ret' is known to be 0 at this point. I guess that -ENOMEM should also be >> returned. > Yes, moreover the "failed:" error path is incomplete (please take > a look at au1200fb_drv_remove() for comparison) and needs to be fixed. > > Could you please take care of it? I will try, but be indulgent :) My understanding of the code is that they are several issues all related to this error handling path (double free, missing memory release, invalid irq release...) I will try to sort it out, but my first tries will likely be incomplete and/or broken. CJ