07 Jul, 2009
1 commit
-
Commit 'net: Move rx skb_orphan call to where needed' broken sctp protocol
with warning at inet_sock_destruct(). Actually, sctp can do this right with
sctp_sock_rfree_frag() and sctp_skb_set_owner_r_frag() pair.sctp_sock_rfree_frag(skb);
sctp_skb_set_owner_r_frag(skb, newsk);This patch not revert the commit d55d87fdff8252d0e2f7c28c2d443aee17e9d70f,
instead remove the sctp_sock_rfree_frag() function.------------[ cut here ]------------
WARNING: at net/ipv4/af_inet.c:151 inet_sock_destruct+0xe0/0x142()
Modules linked in: sctp ipv6 dm_mirror dm_region_hash dm_log dm_multipath
scsi_mod ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan]
Pid: 1808, comm: sctp_test Not tainted 2.6.31-rc2 #40
Call Trace:
[] warn_slowpath_common+0x6a/0x81
[] ? inet_sock_destruct+0xe0/0x142
[] warn_slowpath_null+0x12/0x15
[] inet_sock_destruct+0xe0/0x142
[] __sk_free+0x19/0xcc
[] sk_free+0x18/0x1a
[] sctp_close+0x192/0x1a1 [sctp]
[] inet_release+0x47/0x4d
[] sock_release+0x19/0x5e
[] sock_close+0x21/0x25
[] __fput+0xde/0x189
[] fput+0x18/0x1a
[] filp_close+0x56/0x60
[] put_files_struct+0x5d/0xa1
[] exit_files+0x39/0x3d
[] do_exit+0x1a5/0x5dd
[] ? d_kill+0x35/0x3b
[] ? dequeue_signal+0xa6/0x115
[] do_group_exit+0x63/0x8a
[] get_signal_to_deliver+0x2e1/0x2f9
[] do_notify_resume+0x7c/0x6b5
[] ? autoremove_wake_function+0x0/0x34
[] ? __d_free+0x3d/0x40
[] ? d_free+0x2a/0x3c
[] ? vfs_write+0x103/0x117
[] ? sys_socketcall+0x178/0x182
[] work_notifysig+0x13/0x19
---[ end trace 9db92c463e789fba ]---Signed-off-by: Wei Yongjun
Acked-by: Herbert Xu
Acked-by: Vlad Yasevich
Signed-off-by: David S. Miller
30 Jun, 2009
1 commit
-
Commit 'net: skb->dst accessors'(adf30907d63893e4208dfe3f5c88ae12bc2f25d5)
broken the sctp protocol stack, the sctp packet can never be sent out after
Eric Dumazet's patch, which have typo in the sctp code.Signed-off-by: Wei Yongjun
Acked-by: Eric Dumazet
Acked-by: Vlad Yasevich
Signed-off-by: David S. Miller
23 Jun, 2009
1 commit
-
Change all the code that deals directly with ICMPv6 type and code
values to use u8 instead of a signed int as that's the actual data
type.Signed-off-by: Brian Haley
Signed-off-by: David S. Miller
18 Jun, 2009
1 commit
-
commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
(net: No more expensive sock_hold()/sock_put() on each tx)
changed initial sk_wmem_alloc value.We need to take into account this offset when reporting
sk_wmem_alloc to user, in PROC_FS files or various
ioctls (SIOCOUTQ/TIOCOUTQ)Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
10 Jun, 2009
1 commit
-
On module unload call rcu_barrier(), this is needed as synchronize_rcu()
is not strong enough. The kmem_cache_destroy() does invoke
synchronize_rcu() but it does not provide same protection.Signed-off-by: Jesper Dangaard Brouer
Acked-by: Vlad Yasevich
Signed-off-by: David S. Miller
09 Jun, 2009
1 commit
-
Signed-off-by: David S. Miller
03 Jun, 2009
11 commits
-
Prior implementation of the new sctp_connectx() call that returns
an association ID did not work correctly on non-blocking socket.
This is because we could not return both a EINPROGRESS error and
an association id. This is a new implementation that supports this.Originally from Ivan Skytte Jørgensen
-
RFC 5061 Section 5.1 ASCONF Chunk Procedures said:
B4) Re-transmit the ASCONF Chunk last sent and if possible choose an
alternate destination address (please refer to [RFC4960],
Section 6.4.1). An endpoint MUST NOT add new parameters to this
chunk; it MUST be the same (including its Sequence Number) as
the last ASCONF sent. An endpoint MAY, however, bundle an
additional ASCONF with new ASCONF parameters with the next
Sequence Number. For details, see Section 5.5.This patch fix to choose an alternate destination address when
re-transmit the ASCONF chunk, with some dup codes cleanup.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich -
sctp_sack_timeout is defined as int, but the sysctl's maxsize is set
to sizeof(long) and the min/max are defined as long.Signed-off-by: jean-mickael.guerin@6wind.com
Signed-off-by: Vlad Yasevich -
If T4-rto timer is expired on a removed transport, kernel panic
will occur when we do failure management on that transport.
You can reproduce this use the following sequence:Endpoint A Endpoint B
(ESTABLISHED) (ESTABLISHED)
(Delete IP Address = X)
Signed-off-by: Vlad Yasevich -
If T2-shutdown timer is expired on a removed transport, kernel
panic will occur when we do failure management on that transport.
You can reproduce this use the following sequence:Endpoint A Endpoint B
(ESTABLISHED) (ESTABLISHED)
(Delete IP Address = X)
Signed-off-by: Vlad Yasevich -
If socket is create by PF_INET type, it can not used IPv6 address
to send/recv DATA. So only enable IPv6 address support on PF_INET6
socket.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich -
Just fix a typo in net/sctp/sm_statetable.c.
Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich -
Use Unresolvable Address error cause instead of Invalid Mandatory
Parameter error cause when process ASCONF chunk with invalid address
since address parameters are not mandatory in the ASCONF chunk.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich -
RFC5061 Section 5.2. Upon Reception of an ASCONF Chunk
V2) In processing the chunk, the receiver should build a
response message with the appropriate error TLVs, as
specified in the Parameter type bits, for any ASCONF
Parameter it does not understand. To indicate an
unrecognized parameter, Cause Type 8 should be used as
defined in the ERROR in Section 3.3.10.8, [RFC4960]. The
endpoint may also use the response to carry rejections for
other reasons, such as resource shortages, etc., using the
Error Cause TLV and an appropriate error condition.So we should indicate an unrecognized parameter with error
SCTP_ERROR_UNKNOWN_PARAM in ACSONF-ACK chunk, not
SCTP_ERROR_INV_PARAM.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich -
Define three accessors to get/set dst attached to a skb
struct dst_entry *skb_dst(const struct sk_buff *skb)
void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
void skb_dst_drop(struct sk_buff *skb)
This one should replace occurrences of :
dst_release(skb->dst)
skb->dst = NULL;Delete skb->dst field
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Define skb_rtable(const struct sk_buff *skb) accessor to get rtable from skb
Delete skb->rtable field
Setting rtable is not allowed, just set dst instead as rtable is an alias.
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
28 Apr, 2009
1 commit
-
this is the sctp code to enable hardware crc32c offload for
adapters that support it.Originally by: Vlad Yasevich
modified by Jesse Brandeburg
Signed-off-by: Jesse Brandeburg
Signed-off-by: Vlad Yasevich
Signed-off-by: Jeff Kirsher
Signed-off-by: David S. Miller
31 Mar, 2009
1 commit
-
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
as correctly noted at bug #12454. Someone can lookup entry with NULL
->owner, thus not pinning enything, and release it later resulting
in module refcount underflow.We can keep ->owner and supply it at registration time like ->proc_fops
and ->data.But this leaves ->owner as easy-manipulative field (just one C assignment)
and somebody will forget to unpin previous/pin current module when
switching ->owner. ->proc_fops is declared as "const" which should give
some thoughts.->read_proc/->write_proc were just fixed to not require ->owner for
protection.rmmod'ed directories will be empty and return "." and ".." -- no harm.
And directories with tricky enough readdir and lookup shouldn't be modular.
We definitely don't want such modular code.Removing ->owner will also make PDE smaller.
So, let's nuke it.
Kudos to Jeff Layton for reminding about this, let's say, oversight.
http://bugzilla.kernel.org/show_bug.cgi?id=12454
Signed-off-by: Alexey Dobriyan
22 Mar, 2009
1 commit
-
Remove 2 TEST_FRAME hacks that are no longer needed. These allowed
sctp regression tests to compile before, but are no longer needed.Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller
20 Mar, 2009
1 commit
-
Conflicts:
drivers/net/virtio_net.c
19 Mar, 2009
1 commit
-
broken by commit 5e739d1752aca4e8f3e794d431503bfca3162df4; AFAICS should
be -stable fodder as well...Signed-off-by: Al Viro
Aced-by: Vlad Yasevich
Signed-off-by: David S. Miller
14 Mar, 2009
4 commits
-
RFC5061 states:
Each adaptation layer that is defined that wishes
to use this parameter MUST specify an adaptation code point in an
appropriate RFC defining its use and meaning.If the user has not set one - assume they don't want to sent the param
with a zero Adaptation Code Point.Rationale - Currently the IANA defines zero as reserved - and
1 as the only valid value - so we consider zero to be unset - to save
adding a boolean to the socket structure.Including this parameter unconditionally causes endpoints that do not
understand it to report errors unnecessarily.Signed-off-by: Malcolm Lashley
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
RFC3758 Section 3.3.1. Sending Forward-TSN-Supported param in INIT
Note that if the endpoint chooses NOT to include the parameter, then
at no time during the life of the association can it send or process
a FORWARD TSN.If peer does not support PR-SCTP capable, don't send FORWARD-TSN chunk
to peer.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
This patch fix to indicate ASCONF support in INIT-ACK only if peer has
such capable.This patch also fix to calc the chunk size if peer has no FWD-TSN
capable.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
sctp_inet_listen() call is split between UDP and TCP style. Looking
at the code, the two functions are almost the same and can be
merged into a single helper. This also fixes a bug that was
fixed in the UDP function, but missed in the TCP function.Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller
05 Mar, 2009
1 commit
-
Conflicts:
drivers/net/tokenring/tmspci.c
drivers/net/ucc_geth_mii.c
04 Mar, 2009
1 commit
-
Change sctp_ctl_sock_init() to try IPv4 if IPv6 socket registration
fails. Required if the IPv6 module is loaded with "disable=1", else
SCTP will fail to load.Signed-off-by: Brian Haley
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller
03 Mar, 2009
7 commits
-
Commit faee47cdbfe8d74a1573c2f81ea6dbb08d735be6
(sctp: Fix the RTO-doubling on idle-link heartbeats)
broke the RTO doubling for data retransmits. If the
heartbeat was sent before the data T3-rtx time, the
the RTO will not double upon the T3-rtx expiration.
Distingish between the operations by passing an argument
to the function.Additionally, Wei Youngjun pointed out that our treatment
of requested HEARTBEATS and timer HEARTBEATS is the same
wrt resetting congestion window. That needs to be separated,
since user requested HEARTBEATS should not treat the link
as idle.Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
The functions time_before or time_after are more robust
for comparing jiffies against other values.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
The code in sctp_getsockopt_maxburst() doesn't allow len to be larger
then struct sctp_assoc_value, which is a common case where app writers
just pass down the sizeof(buf) or something similar.This patch fix the problem.
Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
Remove dup check of "if (optlen < sizeof(int))".
Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
This patch add the type name "AUTH" and primitive type name
"PRIMITIVE_ASCONF" for debug message.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
If ERROR chunk is received with too many error causes in ESTABLISHED
state, the kernel get panic.This is because sctp limit the max length of cmds to 14, but while
ERROR chunk is received, one error cause will add around 2 cmds by
sctp_add_cmd_sf(). So many error causes will fill the limit of cmds
and panic.This patch fixed the problem.
This bug can be test by SCTP Conformance Test Suite
.Signed-off-by: Wei Yongjun
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
An extra list_del() during the module load failure and unload
resulted in a crash with a list corruption. Now sctp can
be unloaded again.Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller
16 Feb, 2009
4 commits
-
During peeloff/accept() sctp needs to save the parent socket state
into the new socket so that any options set on the parent are
inherited by the child socket. This was found when the
parent/listener socket issues SO_BINDTODEVICE, but the
data was misrouted after a route cache flush.Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
SCTP incorrectly doubles rto ever time a Hearbeat chunk
is generated. However RFC 4960 states:On an idle destination address that is allowed to heartbeat, it is
recommended that a HEARTBEAT chunk is sent once per RTO of that
destination address plus the protocol parameter 'HB.interval', with
jittering of +/- 50% of the RTO value, and exponential backoff of the
RTO if the previous HEARTBEAT is unanswered.Essentially, of if the heartbean is unacknowledged, do we double the RTO.
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
The sctp crc32c checksum is always generated in little endian.
So, we clean up the code to treat it as little endian and remove
all the __force casts.Suggested by Herbert Xu.
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
This is a new version of my patch, now using a module parameter instead
of a sysctl, so that the option is harder to find. Please note that,
once the module is loaded, it is still possible to change the value of
the parameter in /sys/module/sctp/parameters/, which is useful if you
want to do performance comparisons without rebooting.Computation of SCTP checksums significantly affects the performance of
SCTP. For example, using two dual-Opteron 246 connected using a Gbe
network, it was not possible to achieve more than ~730 Mbps, compared to
941 Mbps after disabling SCTP checksums.
Unfortunately, SCTP checksum offloading in NICs is not commonly
available (yet).By default, checksums are still enabled, of course.
Signed-off-by: Lucas Nussbaum
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller
01 Feb, 2009
1 commit
-
Base versions handle constant folding now.
Signed-off-by: Harvey Harrison
Signed-off-by: David S. Miller