Re: [PATCH, RFC, v2] shmat: introduce flag SHM_MAP_HINT



On Tue, Oct 07, 2008 at 03:38:44PM +0100, Hugh Dickins wrote:
On Tue, 7 Oct 2008, Andi Kleen wrote:
I want say that we shouldn't do this check if shmaddr is a search hint.
I'm not sure that check is unneeded if shmadd is the exact address.

mmap should fail in this case because it does the same check for
MAP_FIXED. Obviously it cannot succeed when there is already something
else there.

I'm not really following this, so forgive me if I'm reading you
out of context, but I think you're wrong on that...

You're right, Hugh, I was confused here. The earlier check
is indeed needed and cannot be dropped. Thanks for the reality check.

-Andi
--
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/



Relevant Pages

  • Re: [PATCH, RFC, v2] shmat: introduce flag SHM_MAP_HINT
    ... I'm not sure that check is unneeded if shmadd is the exact address. ... mmap should fail in this case because it does the same check for ...
    (Linux-Kernel)
  • Re: [PATCH, RFC, v2] shmat: introduce flag SHM_MAP_HINT
    ... I'm not sure that check is unneeded if shmadd is the exact address. ... mmap should fail in this case because it does the same check for ...
    (Linux-Kernel)
  • Re: [PATCH, RFC, v2] shmat: introduce flag SHM_MAP_HINT
    ... I'm not sure that check is unneeded if shmadd is the exact address. ... mmap should fail in this case because it does the same check for ... The dangerous feature of mmap MAP_FIXED (why we don't usually use ...
    (Linux-Kernel)
  • Re: [PATCH next] sysfs: fix some bin_vm_ops errors
    ... I deliberately added an error check instead so that the code would fail fast ... non-NUMA configurations, and work fine on non-NUMA configurations, ... (substitution done because some versions of X crash if that mmap fails). ... goto out_put; ...
    (Linux-Kernel)
  • Re: [PATCH next] sysfs: fix some bin_vm_ops errors
    ... I agree about it being easy enough to add stubs later if required. ... I deliberately added an error check instead so that the code would fail fast ... non-NUMA configurations, and work fine on non-NUMA configurations, ... (substitution done because some versions of X crash if that mmap fails). ...
    (Linux-Kernel)