]> git.baikalelectronics.ru Git - kernel.git/commit
[SCTP]: Handle address add/delete events in a more efficient way.
authorSridhar Samudrala <sri@us.ibm.com>
Thu, 14 Dec 2006 00:26:26 +0000 (16:26 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 14 Dec 2006 00:48:27 +0000 (16:48 -0800)
commitf36d21a33abd28c1b48908dbf50daf3bc021f3ff
treeccc95adc0e1185469e77a1adcae1d300d0b534d1
parent459259eab61ef7cf36a22c2f70bf6166093b8bb4
[SCTP]: Handle address add/delete events in a more efficient way.

Currently in SCTP, we maintain a local address list by rebuilding the whole
list from the device list whenever we get a address add/delete event.

This patch fixes it by only adding/deleting the address for which we
receive the event.

Also removed the sctp_local_addr_lock() which is no longer needed as we
now use list_for_each_safe() to traverse this list. This fixes the bugs
in sctp_copy_laddrs_xxx() routines where we do copy_to_user() while
holding this lock.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h
net/sctp/ipv6.c
net/sctp/protocol.c
net/sctp/socket.c