/* sys_brk() for the most part doesn't need the global kernel lock, except when an application is doing something nasty like trying to un-brk an area that has already been mapped to a regular file. in this case, the unmapping will need to invoke file system routines that need the global lock.  */
SYSCALL_DEFINE1(brk, unsigned long, brk)
/* sys_brk() for the most part doesn't need the global kernel lock, except when an application is doing something nasty like trying to un-brk an area that has already been mapped to a regular file. in this case, the unmapping will need to invoke file system routines that need the global lock.  */
SYSCALL_DEFINE1(brk, unsigned long, brk)
{
	struct mm_struct *mm = current->mm;
	if (brk < mm->start_brk || brk > mm->context.end_brk)
		return mm->brk;
	if (mm->brk == brk)
		return mm->brk;
	if (brk <= mm->brk) {
		mm->brk = brk;
		return brk;
	}
	flush_icache_range(mm->brk, brk);
	return mm->brk = brk;
}