Re: [PATCH net-next v2] sctp: sctp_close: fix release of bindings for deferred call_rcu's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux