Re: [-mm][PATCH 0/2] Memory rlimit fix crash on fork

From: Balbir Singh
Date: Tue Aug 12 2008 - 21:24:25 EST


Andrew Morton wrote:
> On Mon, 11 Aug 2008 15:37:19 +0530
> Balbir Singh <balbir@xxxxxxxxxxxxxxxxxx> wrote:
>
>> --- linux-2.6.27-rc1/mm/memory.c~memrlimit-fix-crash-on-fork 2008-08-11 14:57:48.000000000 +0530
>> +++ linux-2.6.27-rc1-balbir/mm/memory.c 2008-08-11 14:58:33.000000000 +0530
>> @@ -901,8 +901,12 @@ unsigned long unmap_vmas(struct mmu_gath
>
> ^^ returns a long.
>
>> unsigned long start = start_addr;
>> spinlock_t *i_mmap_lock = details? details->i_mmap_lock: NULL;
>> int fullmm = (*tlbp)->fullmm;
>> - struct mm_struct *mm = vma->vm_mm;
>> + struct mm_struct *mm;
>> +
>> + if (!vma)
>> + return;
>
> ^^ mm/memory.c:907: warning: 'return' with no value, in function returning non-void
>
> How does this happen?
>
> I'll drop the patch. The above mystery change needs a comment, IMO.

Oops.. I'll send the updated version. I'll comment it as well.

--
Balbir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/