From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 21 Apr 2010 09:15:01 +0200 Subject: [U-Boot] Failure in ubifsmount In-Reply-To: <4BCDBF9D.4050103@denx.de> References: <4BCDBF9D.4050103@denx.de> Message-ID: <201004210915.01538.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefano, On Tuesday 20 April 2010 16:52:13 Stefano Babic wrote: > it seems I have found an unitialized variable when I run ubifsmount on > an ARM board. > > The problem arises during the sget() function when the "type" of > filesystem is added to the superblock list, at the following line: > > list_add(&s->s_instances, &type->fs_supers); > > I have checked that fs_supers has both pointers prev and next set to > zero. The pointer type is only a reference to the static structure > ubifs_fs_type, inside the same file, and the fs_supers is not > initialized at all. > Initializing the list with INIT_LIST_HEAD seems solving the problem, > after that ubifsmount works and I can load files with ubifsload. > However, I am not sure if this is enough (else I had sent a patch...). Yes, initialising this list is missing right now. Thanks for catching this. Please send a patch with the fix mentioned above. Thanks. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de