On Tue, Jan 17, 2017 at 2:50 AM, David Miller <da...@davemloft.net> wrote:
> From: Xin Long <lucien@gmail.com>
> Date: Sat, 14 Jan 2017 03:15:35 +0800
>
>> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
>> index a15d824..fd58097 100644
s not necessary.
> IOW, no action is needed here and we can remove this call.
>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>
Reviewed-by: Xin Long <lucien@gmail.com>
> ---
> net/sctp/socket.c | 1 -
> 1 file changed, 1 deletion(-)
On Sat, Jan 14, 2017 at 4:27 AM, Marcelo Ricardo Leitner
<marcelo.leit...@gmail.com> wrote:
> Assigned but not used.
>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>
Reviewed-by: Xin Long <lucien@gmail.com>
> ---
> net/sctp/sm_make_ch
On Sun, Jan 15, 2017 at 11:51 PM, Marcelo Ricardo Leitner
<marcelo.leit...@gmail.com> wrote:
> On Sat, Jan 14, 2017 at 03:15:36AM +0800, Xin Long wrote:
>> This patch is to add asoc strreset_outseq and strreset_inseq for
>> saving the reconf request sequence, initialize them
sure
only one reconf request chunk on the fly as rfc6525 section 5.1.1
demands.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sctp.h| 6
include/net/sctp/structs.h | 1 +
include/uapi/linux/sctp.h | 11 +++
net/sctp/outqueue.c
This patch is to add sockopt SCTP_ENABLE_STREAM_RESET to get/set
strreset_enable to indicate which reconf request type it supports,
which is described in rfc6525 section 6.3.1.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/structs.h | 4 +++
include/uapi/linux/sctp.h
This patch is to add a primitive based on sctp primitive frame for
sending stream reconf request. It works as the other primitives,
and create a SCTP_CMD_REPLY command to send the request chunk out.
sctp_primitive_RECONF would be the api to send a reconf request
chunk.
Signed-off-by: Xin Long
to know if peer
supports reconf_enable, the value is set if ext params have reconf
chunk support when processing init chunk, just as rfc6525 section
5.1.1 demands.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/netns/sctp.h | 3 +++
include/net/sctp/structs.h | 7 +-
as section rfc6525 3.1-3
describes, it makes them in one function.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 26 ++
include/net/sctp/sm.h | 5 ++-
include/net/sctp/structs.h | 3 ++
net/sctp/associola.c | 1 +
net/sctp/sm_make_c
the
reconf request chunk, so that it can be retransmitted, and to check if
the response is really for this request by comparing the information
inside with the response chunk as well.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/constants.h | 1 +
include/net/sctp/sm.h
This patch is to define a common api used to alloc memory and initialize
reconf chunk header that described in rfc6525 section 3.1.
All reconf chunks will be generated by calling this helper function.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 6 +
odes.
- rename the titles of the commits and improve some changelogs.
v2->v3:
- re-split the patchset and make sure it has no dead codes for review.
Xin Long (7):
sctp: add a common helper function to generate stream reconf chunk
sctp: add support for generating stream reconf ssn reset reques
On Mon, Jan 9, 2017 at 11:53 PM, David Miller wrote:
> From: Neil Horman
> Date: Mon, 9 Jan 2017 07:43:25 -0500
>
>> These all look reasonably good, but it seems before we accept them,
>> there should be an additional patch that actually makes use of
This patch is to define Re-configuration Response Parameter described
in rfc6525 section 4.4. As optional fields are only for SSN/TSN Reset
Request Parameter, it uses another function to make that.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h
This patch is to define SSN/TSN Reset Request Parameter described
in rfc6525 section 4.3.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 5 +
include/net/sctp/sm.h| 2 ++
net/sctp/sm_make_chunk.c | 29 +
3 files chang
This patch is to define Add Incoming/Outgoing Streams Request
Parameter described in rfc6525 section 4.5 and 4.6. They can
be in one same chunk trunk as rfc6525 section 3.1-7 describes,
so make them in one function.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h
as section rfc6525 3.1-3
describes, it makes them in one function.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 26 ++
include/net/sctp/sm.h | 5 ++-
include/net/sctp/structs.h | 3 ++
net/sctp/associola.c | 1 +
net/sctp/sm_make_c
This patchset is to add some functions to generate stream reconf chunks,
described in RFC6525 Section 3 and Section 4.
v1->v2:
- put these into a smaller group.
- rename some temporary variables in the codes.
- rename the titles of the commits and improve some changelogs.
Xin Long
This patch is to define a common api used to alloc memory and initialize
reconf chunk header that described in rfc6525 section 3.1.
All reconf chunks will be generated by calling this helper function.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 6 +
define sctp_stream to contain stream arrays, and create stream.c
to put stream-related functions.
- merge 3 patches into 1, as new sctp_stream has the same name
with before.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sctp.h| 1 -
include/net/sctp/str
On Wed, Jan 4, 2017 at 9:39 PM, Marcelo Ricardo Leitner
<marcelo.leit...@gmail.com> wrote:
> On Tue, Jan 03, 2017 at 01:59:46PM +0800, Xin Long wrote:
>> This patch is to add streamout and streamin arrays in asoc, initialize
>> them in sctp_process_init and free them in
Since asoc stream arrays has replaced ssnmap, ssnmap is not used any
more, this patch is to remove asoc ssnmap and ssnmap.c.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sctp.h| 1 -
include/net/sctp/structs.h | 33
net/sctp/Makefile
This patch is to add streamout and streamin arrays in asoc, initialize
them in sctp_process_init and free them in sctp_association_free.
Stream arrays are used to replace ssnmap to save more stream things in
the next patch.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/ne
Stream arrays are used to save per stream information, which includes
ssn for each stream already.
This patch is to replace ssnmap with asoc stream arrays.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/structs.h | 19 ++-
net/sctp/associola.c
.
v1->v2:
put these patches into a smaller group.
Xin Long (3):
sctp: add stream arrays in asoc
sctp: replace ssnmap with asoc stream arrays
sctp: remove asoc ssnmap and ssnmap.c
include/net/sctp/sctp.h| 1 -
include/net/sctp/structs.h | 70 +
net/sctp/Makef
On Mon, Jan 2, 2017 at 12:32 AM, David Miller <da...@davemloft.net> wrote:
> From: Xin Long <lucien@gmail.com>
> Date: Sun, 1 Jan 2017 21:26:47 +0800
>
>> As only when the result is not performed, initial_tsn variables is
>> uninitialized, peer side would i
On Mon, Jan 2, 2017 at 12:30 AM, David Miller wrote:
>
> I'm sorry but this is way too many patches to submit at one time.
>
> Split your series into smaller, more reasonably sized, groups
> of changes.
okay, will split and repost
On Sun, Jan 1, 2017 at 8:14 PM, kbuild test robot <l...@intel.com> wrote:
> Hi Xin,
>
> [auto build test WARNING on net-next/master]
>
> url:
> https://github.com/0day-ci/linux/commits/Xin-Long/sctp-implement-rfc6525-sctp-stream-reconf/20170101-192844
> config: x8
On Sun, Jan 1, 2017 at 8:02 PM, kbuild test robot <l...@intel.com> wrote:
> Hi Xin,
>
> [auto build test WARNING on net-next/master]
>
> url:
> https://github.com/0day-ci/linux/commits/Xin-Long/sctp-implement-rfc6525-sctp-stream-reconf/20170101-192844
> config: x8
On Sun, Jan 1, 2017 at 7:20 PM, Xin Long <lucien@gmail.com> wrote:
> This patchset is to implement sctp stream reconf described in rfc6525.
>
> Patch 1-3 add per stream information in sctp asoc.
> Patch 4-8 make the chunk with different reconf params. (Section 3-4)
> P
This patch is to implement Receiver-Side Procedures for the Outgoing
SSN Reset Request Parameter described in section 5.2.2.
Note that some checks must be after request_seq check, as even those
checks fail, strreset_inseq still has to be increase by 1.
Signed-off-by: Xin Long <luc
This patch is to implement Receiver-Side Procedures for the Incoming
SSN Reset Request Parameter described in section 5.2.3.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sm.h | 4
net/sctp/stream.c | 63 +++
2
chunk, it also adds a
function sctp_merge_reconf_chunk to merge two reconf chunk into one.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sm.h| 8 +
net/sctp/sm_make_chunk.c | 94
net/sctp/sm_statefuns.c
This patch is to add Receiver-Side Procedures for the Add Outgoing
Streams Request Parameter described in section 5.2.5.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sm.h | 4
net/sctp/stream.c | 56 +++
2
This patch is to implement Receiver-Side Procedures for the Add Incoming
Streams Request Parameter described in section 5.2.6.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sm.h | 4
net/sctp/stream.c | 59
This patch is to add Stream Change Event described in section 6.1.3.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/ulpevent.h | 4
include/uapi/linux/sctp.h | 15 +++
net/sctp/ulpevent.c | 28
3 files chang
This patch is to implement Receiver-Side Procedures for the
Re-configuration Response Parameter in section 5.2.7.
sctp_process_strreset_resp would process the response for any
kind of reconf request, and the stream reconf is applied only
when the response result is success.
Signed-off-by: Xin
This patch is to add reconf chunk event based on the sctp event
frame, after which, the reconf chunk process would be activated.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/constants.h | 3 +++
net/sctp/sm_statetable.c | 30 ++
2
This patch is to implement Receiver-Side Procedures for the SSN/TSN
Reset Request Parameter described in section 6.2.4.
The process is kinda complicate, it's wonth having comments from
section 6.2.4 in the codes.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sm.
This patch is to add sockopt SCTP_ENABLE_STREAM_RESET to set
strreset_enable to indicate which reconf request type it supports,
which is described in section 6.3.1.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/structs.h | 4 +++
include/uapi/linux/sctp.h | 7 +++
This patch is to add Association Reset Event described in section 6.1.2.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/ulpevent.h | 4
include/uapi/linux/sctp.h | 15 +++
net/sctp/ulpevent.c | 28
3 files chang
This patch is to implement Sender-Side Procedures for the Add
Outgoing and Incoming Streams Request Parameter described in
5.1.5-5.1.6.
It is also to add sockopt SCTP_ADD_STREAMS in section 6.3.4
for users.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/uapi/linux/sctp.h
This patch is to add a primitive based on sctp primitive frame for
sending stream reconf request. It works as the other primitives,
and create a SCTP_CMD_REPLY command to send the request chunk out.
sctp_primitive_RECONF would be the api to send a reconf request
chunk.
Signed-off-by: Xin Long
the
reconf request chunk, so that it can be retransmitted, and to check if
the response is really for this request by comparing the information
inside with the response chunk as well.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/constants.h | 1 +
include/net/sctp/sm.h
This patch is to define Re-configuration Response Parameter described
in section 4.4. As optional fields are only for SSN/TSN Reset Request
Parameter, it uses another function to make that.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 24
i
This patch is to define Add Incoming/Outgoing Streams Request
Parameter described in section 4.5 and 4.6. They can be in one
same chunk trunk as section 3.1-7 describes, so make them in
one function.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h
to know if peer
supports reconf_enable, the value is set if ext params have reconf
chunk support when processing init chunk, just as rfc6525 section
5.1.1 demands.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/netns/sctp.h | 3 +++
include/net/sctp/structs.h | 7 +-
This patch is to implement Sender-Side Procedures for the SSN/TSN
Reset Request Parameter descibed in section 5.1.4.
It is also to add sockopt SCTP_RESET_ASSOC in section 6.3.3 for
users.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/uapi/linux/sctp.h | 1 +
net/sctp/so
reconf request chunk on the fly as section 5.1.1 demands.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/structs.h | 1 +
include/uapi/linux/sctp.h | 11 ++
net/sctp/outqueue.c| 33 +++-
net/sctp/socket.c
This patch is to add Stream Reset Event described in section 6.1.1.
It's added earlier here so that the codes for other sections could
invoked them.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/ulpevent.h | 4
include/uapi/linux/sctp.h
This patchset is to add SCTP_RECONFIG_SUPPORTED sockopt, it would
set and get asoc reconf_enable value when asoc_id is set, or it
would set and get ep reconf_enalbe value if asoc_id is 0.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/uapi/linux/sctp.h | 1 +
net/sctp/so
as section 3.1-3 describes, it makes
them in one function.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 26 ++
include/net/sctp/sm.h | 5 ++-
include/net/sctp/structs.h | 3 ++
net/sctp/associola.c | 1 +
net/sctp/sm_make_chunk.c
This patch is to define SSN/TSN Reset Request Parameter described
in section 4.3.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 5 +
include/net/sctp/sm.h| 2 ++
net/sctp/sm_make_chunk.c | 29 +
3 files changed, 36 inse
Since asoc stream arrays has replaced ssnmap, ssnmap is not used any
more, this patch is to remove asoc ssnmap and ssnmap.c.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/sctp.h| 1 -
include/net/sctp/structs.h | 33
net/sctp/Makefile
This patch is to define the reconf chunk as the section 3.1 descibes.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/linux/sctp.h | 6 ++
net/sctp/sm_make_chunk.c | 33 +
2 files changed, 39 insertions(+)
diff --git a/include/linux/sc
This patch is to add streamout and streamin arrays in asoc, initialize
them in sctp_process_init and free them in sctp_association_free.
Stream arrays are used to replace ssnmap to save more stream things in
the next patch.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/ne
Stream arrays are used to save per stream information, which includes
ssn for each stream already.
This patch is to replace ssnmap with asoc stream arrays.
Signed-off-by: Xin Long <lucien@gmail.com>
---
include/net/sctp/structs.h | 19 ++-
net/sctp/associola.c
on both sender and receiver sides (Section
5)
add sockopts and event for users (Section 6)
Patch 26-27 add reconf event, activate the sctp stream reconf process.
Xin Long (27):
sctp: add stream arrays in asoc
sctp: replace ssnmap with asoc stream arrays
sctp: remove asoc ssnmap
roc file node creation is done.
v1->v2:
correct the err clusterip_config_init returns.
Suggested-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/ipv4/netfilter/ipt_CLUSTERIP.c | 34 +++---
On Tue, Dec 20, 2016 at 8:48 AM, Pablo Neira Ayuso <pa...@netfilter.org> wrote:
> On Thu, Dec 15, 2016 at 12:31:40PM +0800, Xin Long wrote:
>> @@ -185,6 +186,17 @@ clusterip_config_init(const struct
>> ipt_clusterip_tgt_info *i, __be32 ip,
>> atomic_set(>ref
may remove an addr that still exists
in another NIC.
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/bind_addr.c | 3 +++
net/sctp/protocol.c | 3 +++
2 files changed, 6 insertions(+)
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c
index 401c607..1ebc184 100644
---
Patch 1/2 is to fix some indent level.
Given that we have kernels out there with this issue, patch 2/2 also
fix sctp_raw_to_bind_addrs.
v1 -> v2:
Explain why we didn't filter the duplicate addresses when global
address list gets updated in patch 2/2 changelog.
Xin Long (2):
sctp: red
This patch is to reduce indent level by using continue when the addr
is not allowed, and also drop end_copy by using break.
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/protocol.c | 37 +++--
1 file changed, 19 insertions(+), 18 deletions(-)
On Wed, Aug 24, 2016 at 6:38 PM, Neil Horman <nhor...@tuxdriver.com> wrote:
> On Wed, Aug 24, 2016 at 01:14:27PM +0800, Xin Long wrote:
>> >> > Ah, I see what you're doing. Ok, this makes some sense, at least on
>> >> > the receive
>> >>
: fix the issue sctp_diag uses lock_sock in
rcu_read_lock")
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/socket.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d5f4b4a..318c678 100644
--- a/net/sctp/so
st interface on sctp transport
rhashtable")
Reported-by: Dmitry Vyukov <dvyu...@google.com>
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/endpointola.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/sctp/endpointola.c b/net/sctp/endpoi
one.
Suggested-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/ipv4/netfilter/ipt_CLUSTERIP.c | 26 +++---
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/net/ipv4/netfilter/ipt_CLUSTERI
On Wed, Dec 14, 2016 at 5:37 AM, Marcelo Ricardo Leitner
wrote:
> On Tue, Dec 13, 2016 at 07:07:01PM +0100, Dmitry Vyukov wrote:
>> Hello,
>>
>> I am getting the following reports while running syzkaller fuzzer:
>>
>> [ INFO: suspicious RCU usage. ]
>> 4.9.0+ #85 Not
k_watch is ethtool.
>>
>>This patch is to enable the port only when the port_dev has carrier in
>>team_port_add.
>>
>>v1 -> v2:
>> use netif_carrier_ok() instead of !!netif_carrier_ok(), as it returns
>> bool now.
>>
>>Signed-off-by: X
ned-off-by: Xin Long <lucien@gmail.com>
---
drivers/net/team/team.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index a380649..4bc0103 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@
On Sat, Dec 3, 2016 at 10:57 PM, Marcelo Ricardo Leitner
<marcelo.leit...@gmail.com> wrote:
> On Sat, Dec 03, 2016 at 09:42:11PM +0800, Xin Long wrote:
>> Now when users add a nic to team dev, the option 'enable' of the port
>> is true by default, as team_port_enable enab
if this port was chosen to connect, and has no chance to change to use
other ports if link_watch is ethtool.
This patch is to enable the port only when the port_dev has carrier in
team_port_add.
Signed-off-by: Xin Long <lucien@gmail.com>
---
drivers/net/team/team.c | 8 ++--
On Sat, Nov 12, 2016 at 6:12 PM, Baozeng Ding <splovi...@gmail.com> wrote:
>
>
> On 2016/11/10 13:48, Xin Long wrote:
>> On Sat, Oct 15, 2016 at 4:28 PM, Baozeng Ding <splovi...@gmail.com> wrote:
>>> Hello Xin Long,
>>>
>>> On 2016/10/14 19:13
On Wed, Nov 16, 2016 at 2:04 AM, Neil Horman <nhor...@tuxdriver.com> wrote:
> On Tue, Nov 15, 2016 at 11:23:11PM +0800, Xin Long wrote:
>> Now sctp transport rhashtable uses hash(lport, dport, daddr) as the key
>> to hash a node to one chain. If in one host thousands of ass
into a list then makes this
list be as a node of the chain.
This patch is to replace rhashtable_ interface with rhltable_ interface.
Since a chain would not be too long and it would not return -EBUSY with
this fix when inserting a node, the reinsert loop is also removed here.
Signed-off-by: Xin Long <luc
shutdown is
received")
Reported-by: Andrey Konovalov <andreyk...@google.com>
Tested-by: Andrey Konovalov <andreyk...@google.com>
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/socket.c | 15 +++
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git
On Wed, Nov 9, 2016 at 2:46 AM, Andrey Konovalov <andreyk...@google.com> wrote:
> Hi Xin,
>
> Your patch seems to be fixing the issue.
>
> Tested-by: Andrey Konovalov <andreyk...@google.com>
>
> Thanks!
>
> On Tue, Nov 8, 2016 at 11:06 AM, Xin Long <luc
On Tue, Nov 8, 2016 at 5:44 AM, Andrey Konovalov wrote:
> Hi,
>
> I've got the following error report while running the syzkaller fuzzer:
>
> kasan: CONFIG_KASAN_INLINE enabled
> kasan: GPF could be caused by NULL-ptr deref or user memory access
> general protection fault:
On Mon, Nov 7, 2016 at 3:55 PM, Herbert Xu <herb...@gondor.apana.org.au> wrote:
> On Sun, Nov 06, 2016 at 09:15:07PM +0800, Xin Long wrote:
>> Now when I don't set insecure_elasticity, ht->elasticity would be
>> set 16, it would be checked in the loop of
Now when I don't set insecure_elasticity, ht->elasticity would be
set 16, it would be checked in the loop of __rhashtable_insert_fast
and rhashtable_lookup_one.
But if I set insecure_elasticity = true, ht->elasticity wouldn't be
set (and the default is 0). when it is checked in that loop.
trust on that number in such situations
> anyway.
>
> This issue doesn't exist in sctp_sendmsg() path.
>
> Reported-by: Dmitry Vyukov <dvyu...@google.com>
> Reported-by: Andrey Konovalov <andreyk...@google.com>
> Tested-by: Andrey Konovalov <andreyk...@google.com>
>
head skb early if it fails to pack packet.
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/output.c | 435 --
1 file changed, 158 insertions(+), 277 deletions(-)
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 7
nsport instead of assoc.
As holding transport can make sure to access assoc is also safe, and
actually it looks up assoc by searching transport rhashtable, to hold
transport here makes more sense.
Note that the function will be renamed later on on another patch.
Signed-off-by: Xin Long <lucien@
is to hold transport instead of assoc there.
Fixes: 1cceda784980 ("sctp: fix the issue sctp_diag uses lock_sock in
rcu_read_lock")
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/socket.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ne
unk->transport
with null instead.
This patch is to return the transport back through transport pointer
that is from __sctp_rcv_lookup_harder().
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/input.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/sctp/i
There are several places where it holds assoc after getting transport by
searching from transport rhashtable, it may cause use-after-free issue.
This patchset is to fix them by holding transport instead.
v1->v2:
Fix the changelog of patch 2/3
Xin Long (3):
sctp: hold transport inst
On Mon, Oct 31, 2016 at 6:51 PM, Marcelo Ricardo Leitner
<marcelo.leit...@gmail.com> wrote:
> On Mon, Oct 31, 2016 at 12:42:35AM +0800, Xin Long wrote:
>> Prior to this patch, it used a local variable to save the transport that is
>> looked up by __sctp_lookup_association
unk->transport
with null instead.
This patch is to return the transport back through transport pointer
that is from __sctp_rcv_lookup_harder().
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/input.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/sctp/i
On Sat, Oct 29, 2016 at 5:39 AM, Marcelo Ricardo Leitner
<marcelo.leit...@gmail.com> wrote:
> On Fri, Oct 28, 2016 at 05:42:21PM -0200, Marcelo Ricardo Leitner wrote:
>> On Fri, Oct 28, 2016 at 06:10:53PM +0800, Xin Long wrote:
>> > Prior to this patch, it used
<han...@stressinduktion.org>
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/ipv6/route.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 947ed1d..7403d90 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1364,6 +1364,9 @@
nsport instead of assoc.
As holding transport can make sure to access assoc is also safe, and
actually it looks up assoc by searching transport rhashtable, to hold
transport here makes more sense.
Note that the function will be renamed later on on another patch.
Signed-off-by: Xin Long <lucien@
value
instead.
This patch is to return the transport back through transport pointer
that is from __sctp_rcv_lookup_harder().
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/input.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/sctp/input.c b/net/
is to hold transport instead of assoc there.
Fixes: 1cceda784980 ("sctp: fix the issue sctp_diag uses lock_sock in
rcu_read_lock")
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/socket.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/ne
There are several places where it holds assoc after getting transport by
searching from transport rhashtable, it may cause use-after- free issue.
This patchset is to fix them by holding transport instead.
Xin Long (3):
sctp: hold transport instead of assoc in sctp_diag
sctp: return back
gt;
> Tested-by: Andrey Konovalov <andreyk...@google.com>
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com>
Reviewed-by: Xin Long <lucien@gmail.com>
>> in case [1], user can't see the ENOMEM, ENOMEM is more like
>> a internal err.
>>
>
> Still not clear. Are you saying, say an old kernel like 3.11 would
> not return the user ENOMEN for the use case[1] you fixed? I am not
> talking post your fix.
Sorry for confusing you.
3.11 would return the
[1]
>> This patch doesn't ignore all the ENOMEN cases, only after msg is
>> enqueued in out queue/send queue, in the lower layer, when alloc
>> new skb and copy data from old skb, if it fails to alloc new skb, sctp
>> will ignore this ENOMEM, as this msg will be taken care by retransmit
>>
> I think the specific use case this patch addresses
> seems to have bitten us in an older kernel sctp (3.11?).
> A send() on a loaded network box caused the skb to
> alloc in what appears to be this code path and fail (problem
> is intermittent, so not 100% sure). errno seen was ENOMEM.
>
be
updated and dropping this packet if it's size exceed PMTU.
Fixes: 90017accff61 ("sctp: Add GSO support")
Signed-off-by: Xin Long <lucien@gmail.com>
---
net/sctp/output.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/sctp/output.c b/net/sctp/outpu
On Sat, Aug 20, 2016 at 3:51 PM, Baozeng Ding wrote:
> Hello all,
> The following program triggers stack-out-of-bounds in memcmp. The kernel
> version is 4.8.0-rc1+ (on Aug 13 commit
> 118253a593bd1c57de2d1193df1ccffe1abe745b). Thanks.
...
>
> #define _GNU_SOURCE
>
801 - 900 of 1134 matches
Mail list logo