Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1219691
| From | Eric Van Hensbergen <ericvh@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] 9p: trans_fd, initialize recv fcall properly if not set |
| Date | 2015-09-06 05:20 +0200 |
| Message-ID | <q5yEN-3je-1@gated-at.bofh.it> (permalink) |
| References | <q4z9U-84h-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] 9p: trans_fd, initialize recv fcall properly if not set Dominique Martinet <dominique.martinet@cea.fr> - 2015-09-03 11:40 +0200
Re: [PATCH] 9p: trans_fd, initialize recv fcall properly if not set Eric Van Hensbergen <ericvh@gmail.com> - 2015-09-06 05:20 +0200
Re: [V9fs-developer] [PATCH] 9p: trans_fd, initialize recv fcall properly if not set Dominique Martinet <dominique.martinet@cea.fr> - 2015-09-06 09:00 +0200
Re: [V9fs-developer] [PATCH] 9p: trans_fd, initialize recv fcall properly if not set Eric Van Hensbergen <ericvh@gmail.com> - 2015-09-07 16:20 +0200
[PATCH v2] 9p: trans_fd, bail out if recv fcall if missing Dominique Martinet <dominique.martinet@cea.fr> - 2015-09-07 17:10 +0200
csiph-web