From: Tom Rini Date: Wed, 7 Apr 2021 19:05:53 -0400 Subject: [PATCH] JFFS2: fix jffs2 summary datacrc status uninitialized In-Reply-To: <77fd41b0ee01fa49e03c7bd456dd7d5bc1d75462.camel@gmail.com> References: <77fd41b0ee01fa49e03c7bd456dd7d5bc1d75462.camel@gmail.com> Message-ID: <20210407230553.GZ1310@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Feb 23, 2021 at 12:49:00AM -0300, Wagner Popov dos Santos wrote: > The function jffs2_1pass_read_inode() was discarding the summary > inodes and dirent because the value in datacrc flag wasn't > initialized in function jffs2_sum_process_sum_data(). > > This fix initializes the status of all summary records to indicate > that the CRC needs to be verified when they are loaded. > > Before this fix, the behaviors produced by the undefined value of > datacrc was: > - Summary's registries were discarded when 'b->datacrc' is equal > as 'CRC_BAD'. > - Summary's registries were not checked when b->datacrc differs of > 'CRC_BAD' and 'CRC_UNKNOWN' > > So, almost all of the time the crc just isn't checked, and in some > cases the registries are discarded. > > Signed-off-by: Wagner Popov dos Santos Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: