View | Details | Raw Unified | Return to bug 48728
Collapse All | Expand All

(-)linux-2.4.21/mm/mremap.c (+7 lines)
Lines 274-279 unsigned long do_mremap(unsigned long ad Link Here
274
274
275
		if (new_len > TASK_SIZE || new_addr > TASK_SIZE - new_len)
275
		if (new_len > TASK_SIZE || new_addr > TASK_SIZE - new_len)
276
			goto out;
276
			goto out;
277
		/*
278
		 * Allow new_len == 0 only if new_addr == addr
279
		 * to preserve truncation in place (that was working
280
		 * safe and some app may depend on it).
281
		 */
282
		if (unlikely(!new_len && new_addr != addr))
283
			goto out;
277
284
278
		/* Check if the location we're moving into overlaps the
285
		/* Check if the location we're moving into overlaps the
279
		 * old location at all, and fail if it does.
286
		 * old location at all, and fail if it does.

Return to bug 48728