All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Dugger <n0ano@valinux.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] do_mmap_fake question
Date: Mon, 10 Jul 2000 17:53:10 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590678205193@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590678205192@msgid-missing>

Manfred-

Thanks for looking over the code but I don't think there is a
problem.  `do_mmap_fake' is only called from `sys32_mmap' which
grabs the semaphore `current->mm->mmap_sem' (it also grabs the
kernel lock but we won't go into that).  Any other thread trying
to unmap memmory will block until `do_mmap_fake' completes.

The call to `llseek' is a hold over from my application programming
days, I'll change that in the next release.

Tnx.

On Sun, Jul 09, 2000 at 10:51:44AM +0200, Manfred Spraul wrote:
> do_mmap_fake seems to be buggy:
> 
> You use simple memset/memcpy to initialize user memory.
> AFAICS this can oops on SMP: one thread calls do_mmap_fake, and a second
> thread calls sys_munmap() for that memory range.
> memset/memcpy will fail, and you don't have an exception handler
> installed.
> 
> Btw, why do you use llseek?
> Is there a hidden problem with read(,,,&off)?
> 
> - llseek(,,off);
> - r = file->f_op->read(file,(char*)addr, len, &file->f_pos);
> + r = file->f_op->read(file,(char*)addr, len, &off);
> 
> --
> 	Manfred
> 
> 
> _______________________________________________
> Linux-IA64 mailing list
> Linux-IA64@linuxia64.org
> http://lists.linuxia64.org/lists/listinfo/linux-ia64

-- 
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
n0ano@valinux.com
Ph: 303/938-9838



      reply	other threads:[~2000-07-10 17:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-09  8:51 [Linux-ia64] do_mmap_fake question Manfred Spraul
2000-07-10 17:53 ` Don Dugger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590678205193@msgid-missing \
    --to=n0ano@valinux.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.