netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Van Hensbergen <ericvh@gmail.com>
To: Dominique Martinet <dominique.martinet@cea.fr>
Cc: V9FS Developers <v9fs-developer@lists.sourceforge.net>,
	Ron Minnich <rminnich@sandia.gov>,
	Latchesar Ionkov <lucho@ionkov.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] 9p: trans_fd, initialize recv fcall properly if not set
Date: Sat, 5 Sep 2015 22:15:06 -0500	[thread overview]
Message-ID: <CAFkjPT=1TAq5S_TBgKa_UyGs2CfhDKOWEqc9HyhKHw89vO_ZOQ@mail.gmail.com> (raw)
In-Reply-To: <1441273129-20185-1-git-send-email-dominique.martinet@cea.fr>

On Thu, Sep 3, 2015 at 4:38 AM, Dominique Martinet
<dominique.martinet@cea.fr> wrote:
> That code really should never be called (rc is allocated in
> tag_alloc), but if it had been it couldn't have worked...
>
> Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
> ---
>  net/9p/trans_fd.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> To be honest, I think it might be better to just bail out if we get in
> this switch (m->req->rc == NULL after p9_tag_lookup) and not try to
> allocate more, because if we get there it's likely a race condition and
> silently re-allocating will end up in more troubles than trying to
> recover is worth.
> Thoughts ?
>

Hmmm...trying to rattle my brain and remember why I put it in there
back in 2008.
It might have just been over-defensive programming -- or more likely it just
pre-dated all the zero copy infrastructure which pretty much guaranteed we had
an rc allocated and what is there is vestigial.  I'm happy to accept a
patch which
makes this an assert, or perhaps just resets the connection because something
has gone horribly wrong (similar to the ENOMEM path that is there now).

        -eric

  reply	other threads:[~2015-09-06  3:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03  9:38 [PATCH] 9p: trans_fd, initialize recv fcall properly if not set Dominique Martinet
2015-09-06  3:15 ` Eric Van Hensbergen [this message]
2015-09-06  6:55   ` [V9fs-developer] " Dominique Martinet
2015-09-07 14:09     ` Eric Van Hensbergen
2015-09-07 15:06   ` [PATCH v2] 9p: trans_fd, bail out if recv fcall if missing Dominique Martinet

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='CAFkjPT=1TAq5S_TBgKa_UyGs2CfhDKOWEqc9HyhKHw89vO_ZOQ@mail.gmail.com' \
    --to=ericvh@gmail.com \
    --cc=dominique.martinet@cea.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=netdev@vger.kernel.org \
    --cc=rminnich@sandia.gov \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).