Skip to contentSkip to conversation

sparc64: pass correct addr in

PATCH In review Chris Wright 2 participants 2 messages Oct 23, 2007 – Oct 24, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc64: pass correct addr in

Looks like the MAP_FIXED case is using the wrong address hint. I'd expect the comment "don't mess with it" means pass the request straight on through, not change the address requested to -ENOMEM.

---
BTW, just noticed by random code inspection, perhaps I've missed something.

 arch/sparc64/kernel/sys_sparc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/sparc64/kernel/sys_sparc.c +1 -1
index 560cb1e..c56573a 100644
@@ -318,7 +318,7 @@ unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr, u
 
 	if (flags & MAP_FIXED) {
 		/* Ok, don't mess with it. */
-		return get_unmapped_area(NULL, addr, len, pgoff, flags);
+		return get_unmapped_area(NULL, orig_addr, len, pgoff, flags);
 	}
 	flags &= ~MAP_SHARED;
 
#1 lore raw

From: Chris Wright <[email protected]>
Date: Tue, 23 Oct 2007 15:50:38 -0700

Quoted 7 lines

Looks like the MAP_FIXED case is using the wrong address hint. I'd expect the comment "don't mess with it" means pass the request straight on through, not change the address requested to -ENOMEM.

---
BTW, just noticed by random code inspection, perhaps I've missed something.

Looks entirely like a correct fix to me, applied.

Thanks!