Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbbBSJpA (ORCPT ); Thu, 19 Feb 2015 04:45:00 -0500 Received: from mail-ob0-f173.google.com ([209.85.214.173]:49988 "EHLO mail-ob0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752136AbbBSJo6 (ORCPT ); Thu, 19 Feb 2015 04:44:58 -0500 MIME-Version: 1.0 In-Reply-To: References: <1424277163-24869-1-git-send-email-geert+renesas@glider.be> <54E4D2DB.4050909@cogentembedded.com> Date: Thu, 19 Feb 2015 10:44:57 +0100 X-Google-Sender-Auth: 5MseJL9GWapsE41PYfw_r_GwrOQ Message-ID: Subject: Re: [PATCH] [media] soc-camera: Remove bogus devm_kfree() in soc_of_bind() From: Geert Uytterhoeven To: Guennadi Liakhovetski Cc: Sergei Shtylyov , Geert Uytterhoeven , Ben Dooks , Mauro Carvalho Chehab , Linux Media Mailing List , Linux-sh list , "linux-kernel@vger.kernel.org" , stable Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2131 Lines: 58 Hi Guennadi, On Wed, Feb 18, 2015 at 10:16 PM, Guennadi Liakhovetski wrote: > On Wed, 18 Feb 2015, Sergei Shtylyov wrote: >> On 02/18/2015 07:32 PM, Geert Uytterhoeven wrote: >> > Unlike scan_async_group(), soc_of_bind() doesn't allocate its >> > soc_camera_async_client structure using devm_kzalloc(), but has it >> > embedded inside the soc_of_info structure. Hence on failure, it must >> > not free it using devm_kfree(), as this will cause a warning, and may >> > cause slab corruption: >> >> [...] >> >> > Fixes: 1ddc6a6caa94e1e1 ("[media] soc_camera: add support for dt binding >> > soc_camera drivers") >> > Cc: stable@vger.kernel.org >> > Signed-off-by: Geert Uytterhoeven >> > --- >> > Triggered with shmobile-defconfig on r8a7791/koelsch. >> > --- >> > drivers/media/platform/soc_camera/soc_camera.c | 1 - >> > 1 file changed, 1 deletion(-) >> >> > diff --git a/drivers/media/platform/soc_camera/soc_camera.c >> > b/drivers/media/platform/soc_camera/soc_camera.c >> > index cee7b56f84049944..d8a072fe46035821 100644 >> > --- a/drivers/media/platform/soc_camera/soc_camera.c >> > +++ b/drivers/media/platform/soc_camera/soc_camera.c >> > @@ -1665,7 +1665,6 @@ eclkreg: >> > eaddpdev: >> > platform_device_put(sasc->pdev); >> > eallocpdev: >> > - devm_kfree(ici->v4l2_dev.dev, sasc); >> >> Perhaps Ben meant 'info' ISO 'sasc'? This way it would make more sense. > > Agree. Geert, could you double-check and respin? Sergei is right. Will update and resend. Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/