All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linux Geek <linux-geek@hornyaksys.com>
To: linux-kernel@vger.kernel.org
Subject: Question about copy_from/copy_to
Date: Wed, 27 Nov 2002 15:26:59 -0500	[thread overview]
Message-ID: <3DE52A93.3060404@hornyaksys.com> (raw)

I'm trying to write a device driver (module) for one of my customers and 
have the following problem.

kernel veraion 2.4.18...

Memory is allocated (kmalloc) in the "open" call.

The above memory is used in copy_from/to in the "ioctl" (and possibly 
the read/write) call.

I understand that the copy_from/to may wait for pages to be swapped in, 
If the waiting process is killed at this point, is it safe to free the 
memory in the "close/release" call? If not, when is it safe to call  kfree?


             reply	other threads:[~2002-11-27 20:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-27 20:26 Linux Geek [this message]
2002-11-27 20:52 ` Question about copy_from/copy_to Richard B. Johnson
2002-11-27 21:13   ` Linux Geek

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=3DE52A93.3060404@hornyaksys.com \
    --to=linux-geek@hornyaksys.com \
    --cc=linux-kernel@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.