Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756390AbcKCMrm (ORCPT ); Thu, 3 Nov 2016 08:47:42 -0400 Received: from lb2-smtp-cloud6.xs4all.net ([194.109.24.28]:48008 "EHLO lb2-smtp-cloud6.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755728AbcKCMrk (ORCPT ); Thu, 3 Nov 2016 08:47:40 -0400 Subject: Re: [PATCH next 1/2] media: mtk-mdp: fix video_device_release argument To: =?UTF-8?Q?Vincent_Stehl=c3=a9?= References: <1473340146-6598-4-git-send-email-minghsiu.tsai@mediatek.com> <20161027202325.20680-1-vincent.stehle@laposte.net> <20161028075253.gdy2bbugih6oqncw@romuald.bergerie> Cc: linux-media@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Minghsiu Tsai , Hans Verkuil , Mauro Carvalho Chehab From: Hans Verkuil Message-ID: Date: Thu, 3 Nov 2016 13:47:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161028075253.gdy2bbugih6oqncw@romuald.bergerie> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1090 Lines: 35 Hi Vincent, On 28/10/16 09:52, Vincent Stehl? wrote: > On Thu, Oct 27, 2016 at 10:23:24PM +0200, Vincent Stehl? wrote: >> video_device_release() takes a pointer to struct video_device as argument. >> Fix two call sites where the address of the pointer is passed instead. > > Sorry, I messed up: please ignore that "fix". The 0day robot made me > realize this is indeed not a proper fix. > > The issue remains, though: we cannot call video_device_release() on the > vdev structure member, as this will in turn call kfree(). Most probably, > vdev needs to be dynamically allocated, or the call to > video_device_release() dropped completely. I prefer that vdev is dynamically allocated. There are known problems with embedded video_device structs, so allocating it is preferred. Minghsiu, can you do that? Regards, Hans > > Sorry for the bad patch. > > Best regards, > > Vincent. > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >