netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: Vlad Yasevich <vyasevich@gmail.com>
Cc: davem@davemloft.net, linux-sctp@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2] sctp: sctp_close: fix release of bindings for deferred call_rcu's
Date: Fri, 01 Feb 2013 15:33:48 +0100	[thread overview]
Message-ID: <510BD24C.3050507@redhat.com> (raw)
In-Reply-To: <510BCFB7.3050603@gmail.com>

On 02/01/2013 03:22 PM, Vlad Yasevich wrote:
>> +
>> +    if (transport->asoc)
>> +        sctp_association_put(transport->asoc);
>> +
>> +    sctp_packet_free(&transport->packet);
>
> I think it might be better to do sctp_packet_free() before releasing transports ref on the association.  The reason is that if for some reason that ref is the last one, you'd trigger association_destroy()
> call and then come back to try to free the packet.  It just doesn't sound right.  It would be better to free the packet (which should be
> empty at this point anyway), and then drop the ref on the association.

Agreed, that's more sound.

      reply	other threads:[~2013-02-01 14:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1359726681.git.dborkman@redhat.com>
2013-02-01 14:07 ` [PATCH net-next v2] sctp: sctp_close: fix release of bindings for deferred call_rcu's Daniel Borkmann
2013-02-01 14:22   ` Vlad Yasevich
2013-02-01 14:33     ` Daniel Borkmann [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=510BD24C.3050507@redhat.com \
    --to=dborkman@redhat.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vyasevich@gmail.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).