[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <570433F0.6040506@iogearbox.net>
Date: Tue, 05 Apr 2016 23:53:52 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Bastien Philbert <bastienphilbert@...il.com>, vyasevich@...il.com
CC: nhorman@...driver.com, davem@...emloft.net,
linux-sctp@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sctp: Fix error handling for switch statement case in
the function sctp_cmd_interprete
On 04/05/2016 11:36 PM, Bastien Philbert wrote:
> This fixes error handling for the switch statement case
> SCTP_CMD_SEND_PKT by making the error value of the call
> to sctp_packet_transmit equal the variable error due to
> this function being able to fail with a error code. In
What actual issue have you observed that you fix?
> addition allow the call to sctp_ootb_pkt_free afterwards
> to free up the no longer in use sctp packet even if the
> call to the function sctp_packet_transmit fails in order
> to avoid a memory leak here for not freeing the sctp
Not sure how this relates to your code?
> Signed-off-by: Bastien Philbert <bastienphilbert@...il.com>
> ---
> net/sctp/sm_sideeffect.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c
> index 7fe56d0..f3a8b58 100644
> --- a/net/sctp/sm_sideeffect.c
> +++ b/net/sctp/sm_sideeffect.c
> @@ -1434,7 +1434,7 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
> case SCTP_CMD_SEND_PKT:
> /* Send a full packet to our peer. */
> packet = cmd->obj.packet;
> - sctp_packet_transmit(packet, gfp);
> + error = sctp_packet_transmit(packet, gfp);
> sctp_ootb_pkt_free(packet);
> break;
>
>
Powered by blists - more mailing lists