question about fs/ubifs/orphan.c

Adrian Hunter adrian.hunter at intel.com
Mon Jul 9 02:46:56 EDT 2012


On 08/07/12 12:22, Julia Lawall wrote:
> There is another occurrence of the same pattern in the function consolidate
> in the same file.

Yes. It needs the same fix.  Will you send a patch?

> 
> julia
> 
> On Sun, 8 Jul 2012, Julia Lawall wrote:
> 
>> The function ubifs_orphan_start_commit contains the code:
>>
>>        list_for_each_entry(orphan, &c->orph_new, new_list) {
>>                ubifs_assert(orphan->new);
>>                orphan->new = 0;
>>                *last = orphan;
>>                last = &orphan->cnext;
>>        }
>>        *last = orphan->cnext;
>>
>> After list_for_each_entry, orphan is just an address at an offset from the
>> list head, not a pointer to a real structure.  So it does not seem correct
>> to access its cnext field.
>>
>> julia
>>
> 
> 





More information about the linux-mtd mailing list