Opened 4 years ago

#16279 new defect

Bug in dir_emit failure checking in 503-yaffs-3.12-convert-readdir-to-iterate.patch

Reported by: arthur.walton2@… Owned by: developers
Priority: normal Milestone: Bugs Paradise
Component: kernel Version: Trunk
Keywords: yaffs Cc: juhosg@…


There is a small bug in patch

It is checking for (!dir_emit() < 0). the ( < 0) shouldn't be there, I think it was accidentally left when switching from readdir to iterate. It will always evaluate to false, you can see here that the new return type is a boolean

1786 if (!dir_emit(ctx, name, strlen(name),
1787 this_inode, this_type) < 0) {
1788 yaffs_gross_lock(dev);
1789 goto out;
1790 }

I have included a fixed version of the file. I'm not actually using OpenWRT I just came across it while looking for examples of file system drivers.

Attachments (1)

503-yaffs-3.12-convert-readdir-to-iterate_fix.txt (2.9 KB) - added by arthur.walton2@… 4 years ago.
Fixed version of 503-yaffs-3.12-convert-readdir-to-iterate.patch

Download all attachments as: .zip

Change History (1)

Changed 4 years ago by arthur.walton2@…

Fixed version of 503-yaffs-3.12-convert-readdir-to-iterate.patch

Add Comment

Modify Ticket

as new .

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.