public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Maneesh Soni <maneesh@in.ibm.com>
Cc: Chip Salzenberg <chip@pobox.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.4.13pre3aa1: expand_fdset() may use invalid pointer
Date: Thu, 18 Oct 2001 12:06:14 +0200	[thread overview]
Message-ID: <20011018120614.K12055@athlon.random> (raw)
In-Reply-To: <20011017113245.A3849@perlsupport.com> <20011017204204.C2380@athlon.random> <20011018121124.L11266@in.ibm.com> <20011018102226.I12055@athlon.random> <20011018151828.M11266@in.ibm.com>
In-Reply-To: <20011018151828.M11266@in.ibm.com>; from maneesh@in.ibm.com on Thu, Oct 18, 2001 at 03:18:28PM +0530

On Thu, Oct 18, 2001 at 03:18:28PM +0530, Maneesh Soni wrote:
> We also thought of embedding rcu head in the files_struct, but that was ruled

Ah, that's what I had in mind while writing my last email, I thought the
rcu_head and the parameters to the call_rcu were living in the
files_struct. I should have better checked the code. In short
rcu_fd_array and friend are just artificial structs dynamically
allocated just for the purpose of the rcu freeing of the memory. This
has the advantage of also saving some byte during production, and of
course my suggestion to take rcu_head at the end of the struct was in
turn flawed as well, it's not going to make a real difference since the
rcu_head will be used during call_rcu anyways and the rcu freeing path
has to be a very uncommon path in first place.

> out as we are not freeing the entire files_struct but a couple of fields in
> it. So it may happen that before the callback for one files_struct is processed 
> we queue another one for the same files_struct.

I see, the dynamic allocation of the rcu_fd_array and friend solve the
multiple call_rcu on the same files_struct problem very cleanly.

Ok, so please forget my last email, your last patch looks fine. Thanks!

Andrea

      reply	other threads:[~2001-10-18 10:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-17 18:32 [PATCH] 2.4.13pre3aa1: expand_fdset() may use invalid pointer Chip Salzenberg
2001-10-17 18:42 ` Andrea Arcangeli
2001-10-18  6:41   ` Maneesh Soni
2001-10-18  8:22     ` Andrea Arcangeli
2001-10-18  9:48       ` Maneesh Soni
2001-10-18 10:06         ` Andrea Arcangeli [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=20011018120614.K12055@athlon.random \
    --to=andrea@suse.de \
    --cc=chip@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maneesh@in.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox