diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 13:37:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-14 13:37:28 -0400 |
commit | d7e9660ad9d5e0845f52848bce31bcf5cdcdea6b (patch) | |
tree | c6c67d145771187b194d79d603742b31090a59d6 /net/sctp/socket.c | |
parent | b8cb48aae1b8c50b37dcb7710363aa69a7a0d9ca (diff) | |
parent | 13af7a6ea502fcdd4c0e3d7de6e332b102309491 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits)
netxen: update copyright
netxen: fix tx timeout recovery
netxen: fix file firmware leak
netxen: improve pci memory access
netxen: change firmware write size
tg3: Fix return ring size breakage
netxen: build fix for INET=n
cdc-phonet: autoconfigure Phonet address
Phonet: back-end for autoconfigured addresses
Phonet: fix netlink address dump error handling
ipv6: Add IFA_F_DADFAILED flag
net: Add DEVTYPE support for Ethernet based devices
mv643xx_eth.c: remove unused txq_set_wrr()
ucc_geth: Fix hangs after switching from full to half duplex
ucc_geth: Rearrange some code to avoid forward declarations
phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs
drivers/net/phy: introduce missing kfree
drivers/net/wan: introduce missing kfree
net: force bridge module(s) to be GPL
Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded
...
Fixed up trivial conflicts:
- arch/x86/include/asm/socket.h
converted to <asm-generic/socket.h> in the x86 tree. The generic
header has the same new #define's, so that works out fine.
- drivers/net/tun.c
fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that
switched over to using 'tun->socket.sk' instead of the redundantly
available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks
to the TUN driver") which added a new 'tun->sk' use.
Noted in 'next' by Stephen Rothwell.
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 971890dbfea0..89af37a6c871 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1361,6 +1361,7 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout) | |||
1361 | 1361 | ||
1362 | sctp_lock_sock(sk); | 1362 | sctp_lock_sock(sk); |
1363 | sk->sk_shutdown = SHUTDOWN_MASK; | 1363 | sk->sk_shutdown = SHUTDOWN_MASK; |
1364 | sk->sk_state = SCTP_SS_CLOSING; | ||
1364 | 1365 | ||
1365 | ep = sctp_sk(sk)->ep; | 1366 | ep = sctp_sk(sk)->ep; |
1366 | 1367 | ||
@@ -1813,20 +1814,22 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1813 | sctp_set_owner_w(chunk); | 1814 | sctp_set_owner_w(chunk); |
1814 | 1815 | ||
1815 | chunk->transport = chunk_tp; | 1816 | chunk->transport = chunk_tp; |
1816 | |||
1817 | /* Send it to the lower layers. Note: all chunks | ||
1818 | * must either fail or succeed. The lower layer | ||
1819 | * works that way today. Keep it that way or this | ||
1820 | * breaks. | ||
1821 | */ | ||
1822 | err = sctp_primitive_SEND(asoc, chunk); | ||
1823 | /* Did the lower layer accept the chunk? */ | ||
1824 | if (err) | ||
1825 | sctp_chunk_free(chunk); | ||
1826 | SCTP_DEBUG_PRINTK("We sent primitively.\n"); | ||
1827 | } | 1817 | } |
1828 | 1818 | ||
1829 | sctp_datamsg_put(datamsg); | 1819 | /* Send it to the lower layers. Note: all chunks |
1820 | * must either fail or succeed. The lower layer | ||
1821 | * works that way today. Keep it that way or this | ||
1822 | * breaks. | ||
1823 | */ | ||
1824 | err = sctp_primitive_SEND(asoc, datamsg); | ||
1825 | /* Did the lower layer accept the chunk? */ | ||
1826 | if (err) | ||
1827 | sctp_datamsg_free(datamsg); | ||
1828 | else | ||
1829 | sctp_datamsg_put(datamsg); | ||
1830 | |||
1831 | SCTP_DEBUG_PRINTK("We sent primitively.\n"); | ||
1832 | |||
1830 | if (err) | 1833 | if (err) |
1831 | goto out_free; | 1834 | goto out_free; |
1832 | else | 1835 | else |
@@ -2240,7 +2243,7 @@ static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params, | |||
2240 | sctp_assoc_sync_pmtu(asoc); | 2243 | sctp_assoc_sync_pmtu(asoc); |
2241 | } else if (asoc) { | 2244 | } else if (asoc) { |
2242 | asoc->pathmtu = params->spp_pathmtu; | 2245 | asoc->pathmtu = params->spp_pathmtu; |
2243 | sctp_frag_point(sp, params->spp_pathmtu); | 2246 | sctp_frag_point(asoc, params->spp_pathmtu); |
2244 | } else { | 2247 | } else { |
2245 | sp->pathmtu = params->spp_pathmtu; | 2248 | sp->pathmtu = params->spp_pathmtu; |
2246 | } | 2249 | } |
@@ -2877,15 +2880,10 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, int optl | |||
2877 | val -= sizeof(struct sctphdr) + | 2880 | val -= sizeof(struct sctphdr) + |
2878 | sizeof(struct sctp_data_chunk); | 2881 | sizeof(struct sctp_data_chunk); |
2879 | } | 2882 | } |
2880 | 2883 | asoc->user_frag = val; | |
2881 | asoc->frag_point = val; | 2884 | asoc->frag_point = sctp_frag_point(asoc, asoc->pathmtu); |
2882 | } else { | 2885 | } else { |
2883 | sp->user_frag = val; | 2886 | sp->user_frag = val; |
2884 | |||
2885 | /* Update the frag_point of the existing associations. */ | ||
2886 | list_for_each_entry(asoc, &(sp->ep->asocs), asocs) { | ||
2887 | asoc->frag_point = sctp_frag_point(sp, asoc->pathmtu); | ||
2888 | } | ||
2889 | } | 2887 | } |
2890 | 2888 | ||
2891 | return 0; | 2889 | return 0; |