From: David Miller <davem@davemloft.net>
To: rweikusat@mobileactivedefense.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
hannes@stressinduktion.org, joseph.salisbury@canonical.com,
edumazet@google.com
Subject: Re: [PATCH net] af_unix: Don't use continue to re-execute unix_stream_read_generic loop
Date: Fri, 19 Feb 2016 23:51:07 -0500 (EST) [thread overview]
Message-ID: <20160219.235107.1810934052787203460.davem@davemloft.net> (raw)
In-Reply-To: <877fi2gpkd.fsf@doppelsaurus.mobileactivedefense.com>
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Date: Thu, 18 Feb 2016 12:39:46 +0000
> The unix_stream_read_generic function tries to use a continue statement
> to restart the receive loop after waiting for a message. This may not
> work as intended as the caller might use a recvmsg call to peek at
> control messages without specifying a message buffer. If this was the
> case, the continue will cause the function to return without an error
> and without the credential information if the function had to wait for a
> message while it had returned with the credentials otherwise. Change to
> using goto to restart the loop without checking the condition first in
> this case so that credentials are returned either way.
>
> Signed-off-by: Rainer Weikusat <rweikusat@mobileactivedefense.com>
> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Applied, thanks.
prev parent reply other threads:[~2016-02-20 4:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 12:39 [PATCH net] af_unix: Don't use continue to re-execute unix_stream_read_generic loop Rainer Weikusat
2016-02-20 4:51 ` David Miller [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=20160219.235107.1810934052787203460.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hannes@stressinduktion.org \
--cc=joseph.salisbury@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rweikusat@mobileactivedefense.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;
as well as URLs for NNTP newsgroup(s).