From: Sudeep Dutt <sudeep.dutt@intel.com>
To: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: Sudeep Dutt <sudeep.dutt@intel.com>,
ashutosh.dixit@intel.com, linux-kernel@vger.kernel.org
Subject: Re: scif_insert_vma()
Date: Sun, 17 Mar 2019 22:47:40 -0700 [thread overview]
Message-ID: <1552888060.22480.197.camel@intel.com> (raw)
In-Reply-To: <20190311064514.GA10833@linux.intel.com>
On Mon, 2019-03-11 at 08:45 +0200, Jarkko Sakkinen wrote:
> Hi
>
> Just wondering what will happen if kzalloc() fails in scif_mmap.c. How
> it is recovered? I don't see anything in the VMA callbacks taking care
> of this.
Hi Jarkko,
scif_insert_vma(..) is called from scif_mmap(..) and scif_vma_open(..).
scif_mmap(..) checks for allocation failures but scif_vma_open(..) does
not on purpose.
The vm_operations_struct open(..)/close(..) callbacks do not allow
returning errors. The driver will take a reference to the VMA private
data structure irrespective of whether the allocation during the
open(..) callback succeeds or fails. The close(..) callback cleans up
the data structures from the mmap(..) or open(..) callbacks if any.
Thanks,
Sudeep Dutt
next prev parent reply other threads:[~2019-03-18 5:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 6:45 scif_insert_vma() Jarkko Sakkinen
2019-03-18 5:47 ` Sudeep Dutt [this message]
2019-03-20 10:26 ` scif_insert_vma() Jarkko Sakkinen
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=1552888060.22480.197.camel@intel.com \
--to=sudeep.dutt@intel.com \
--cc=ashutosh.dixit@intel.com \
--cc=jarkko.sakkinen@linux.intel.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.