[PATCH net-next] nfc: netlink: use &w->w in nfc_genl_rcv_nl_event

2021-01-14 Thread Geliang Tang
Use the struct member w of the struct urelease_work directly instead of casting it. Signed-off-by: Geliang Tang --- net/nfc/netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/nfc/netlink.c b/net/nfc/netlink.c index 573b38ad2f8e..640906359c22 100644 --- a/net

[MPTCP][PATCH net-next] mptcp: clear use_ack and use_map when dropping other suboptions

2020-12-15 Thread Geliang Tang
0003 [ 15.295492] Modules linked in: [ 15.295944] CR2: 0048 [ 15.296567] Kernel Offset: disabled [ 15.296941] ---[ end Kernel panic - not syncing: Fatal exception ]--- Reported-by: Christoph Paasch Fixes: 84dfe3677a6f (mptcp: send out dedicated ADD_ADDR packet) Signed-

Re: [MPTCP][PATCH net 1/2] mptcp: fix static checker warnings in mptcp_pm_add_timer

2020-11-11 Thread Geliang Tang
to apply patch 1 directly to net? > > > > Sorry, I didn't know it was OK to apply only one patch of the series. > > Then yes, if you don't mind, please apply this patch :) > > Not really, I was just establishing ownership ;) > > Geliang Tang, please rebase on

[MPTCP][PATCH v2 net-next] mptcp: fix static checker warnings in mptcp_pm_add_timer

2020-11-09 Thread Geliang Tang
urn; 215 Fixes: 93f323b9 ("mptcp: add a new sysctl add_addr_timeout") Reported-by: Dan Carpenter Reviewed-by: Dan Carpenter Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang --- v2: - drop "mptcp: cleanup for mptcp_pm_alloc_anno_list" - change tag to net-nex

[MPTCP][PATCH net 0/2] fix static checker warnings in

2020-11-09 Thread Geliang Tang
This patchset fixed static checker warnings in mptcp_pm_add_timer and mptcp_pm_alloc_anno_list. Geliang Tang (2): mptcp: fix static checker warnings in mptcp_pm_add_timer mptcp: cleanup for mptcp_pm_alloc_anno_list net/mptcp/pm_netlink.c | 9 + 1 file changed, 5 insertions(+), 4

[MPTCP][PATCH net 1/2] mptcp: fix static checker warnings in mptcp_pm_add_timer

2020-11-09 Thread Geliang Tang
urn; 215 Fixes: 93f323b9 ("mptcp: add a new sysctl add_addr_timeout") Reported-by: Dan Carpenter Signed-off-by: Geliang Tang Reviewed-by: Dan Carpenter --- net/mptcp/pm_netlink.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/mptcp/pm_netlink.c

[MPTCP][PATCH net 2/2] mptcp: cleanup for mptcp_pm_alloc_anno_list

2020-11-09 Thread Geliang Tang
This patch added NULL pointer check for mptcp_pm_alloc_anno_list, and avoided similar static checker warnings in mptcp_pm_add_timer. Signed-off-by: Geliang Tang Reviewed-by: Dan Carpenter --- net/mptcp/pm_netlink.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net

Re: [MPTCP][PATCH net-next 0/2] init ahmac and port of mptcp_options_received

2020-10-20 Thread Geliang Tang
Hi Jakub, Jakub Kicinski 于2020年10月21日周三 上午7:39写道: > > On Mon, 19 Oct 2020 18:23:14 +0800 Geliang Tang wrote: > > This patchset deals with initializations of mptcp_options_received's two > > fields, ahmac and port. > > Applied, but two extra comments: > - please m

[MPTCP][PATCH net-next 2/2] mptcp: move mptcp_options_received's port initialization

2020-10-19 Thread Geliang Tang
This patch moved mptcp_options_received's port initialization from mptcp_parse_option to mptcp_get_options, put it together with the other fields initializations of mptcp_options_received. Fixes: 3df523ab582c5 ("mptcp: Add ADD_ADDR handling") Signed-off-by: Geliang Tang --- net/

[MPTCP][PATCH net-next 1/2] mptcp: initialize mptcp_options_received's ahmac

2020-10-19 Thread Geliang Tang
This patch initialize mptcp_options_received's ahmac to zero, otherwise it will be a random number when receiving ADD_ADDR suboption with echo-flag=1. Fixes: 3df523ab582c5 ("mptcp: Add ADD_ADDR handling") Signed-off-by: Geliang Tang --- net/mptcp/options.c | 1 + 1 file chang

[MPTCP][PATCH net-next 0/2] init ahmac and port of mptcp_options_received

2020-10-19 Thread Geliang Tang
This patchset deals with initializations of mptcp_options_received's two fields, ahmac and port. Geliang Tang (2): mptcp: initialize mptcp_options_received's ahmac mptcp: move mptcp_options_received's port initialization net/mptcp/options.c | 3 ++- 1 file changed, 2 i

[MPTCP][PATCH net-next 16/16] mptcp: retransmit ADD_ADDR when timeout

2020-09-23 Thread Geliang Tang
This patch implemented the retransmition of ADD_ADDR when no ADD_ADDR echo is received. It added a timer with the announced address. When timeout occurs, ADD_ADDR will be retransmitted. Suggested-by: Mat Martineau Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang

[MPTCP][PATCH net-next 15/16] mptcp: add sk_stop_timer_sync helper

2020-09-23 Thread Geliang Tang
This patch added a new helper sk_stop_timer_sync, it deactivates a timer like sk_stop_timer, but waits for the handler to finish. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- include/net/sock.h | 2 ++ net/core/sock.c| 7 +++ 2 files changed, 9 insertions(+) diff --git a

[MPTCP][PATCH net-next 14/16] mptcp: add struct mptcp_pm_add_entry

2020-09-23 Thread Geliang Tang
Add a new struct mptcp_pm_add_entry to describe add_addr's entry. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/pm_netlink.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c

[MPTCP][PATCH net-next 13/16] selftests: mptcp: add remove addr and subflow test cases

2020-09-23 Thread Geliang Tang
Abeni Suggested-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- .../testing/selftests/net/mptcp/mptcp_join.sh | 145 +- 1 file changed, 142 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftest

[MPTCP][PATCH net-next 12/16] selftests: mptcp: add remove cfg in mptcp_connect

2020-09-23 Thread Geliang Tang
. Otherwise the remove address and subflow test cases don't work. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- .../selftests/net/mptcp/mptcp_connect.c| 18 +++--- 1 file change

[MPTCP][PATCH net-next 11/16] mptcp: add mptcp_destroy_common helper

2020-09-23 Thread Geliang Tang
This patch added a new helper named mptcp_destroy_common containing the shared code between mptcp_destroy() and mptcp_sock_destruct(). Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/protocol.c | 11 --- net/mptcp/protocol.h | 1 + net/mptcp/subflow.c | 4 +--- 3

[MPTCP][PATCH net-next 10/16] mptcp: add RM_ADDR related mibs

2020-09-23 Thread Geliang Tang
Suggested-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/mib.c| 2 ++ net/mptcp/mib.h| 2 ++ net/mptcp/pm_netlink.c | 5 + 3 files changed, 9 insertions(+) diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c index a33bf719ce6f..84d119436b22 100644 --- a

[MPTCP][PATCH net-next 09/16] mptcp: implement mptcp_pm_remove_subflow

2020-09-23 Thread Geliang Tang
local_id in mptcp_pm_nl_rm_subflow_received to remove a subflow. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Signed-off-by: Geliang Tang --- net/mptcp/pm.c | 9 +++-- net/mptcp/pm_netlink.c | 33 + net/mptcp/pr

[MPTCP][PATCH net-next 08/16] mptcp: remove addr and subflow in PM netlink

2020-09-23 Thread Geliang Tang
mptcp_is_enabled check in mptcp_init_sock. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/pm.c | 7 ++- net/mptcp/pm_netlink.c | 122 +++-- net/mptcp

[MPTCP][PATCH net-next 07/16] mptcp: add accept_subflow re-check

2020-09-23 Thread Geliang Tang
The re-check of pm->accept_subflow with pm->lock held was missing, this patch fixed it. Suggested-by: Mat Martineau Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang --- net/mptcp/pm.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/mptcp/pm.c

[MPTCP][PATCH net-next 06/16] selftests: mptcp: add ADD_ADDR mibs check function

2020-09-23 Thread Geliang Tang
-off-by: Geliang Tang --- .../testing/selftests/net/mptcp/mptcp_join.sh | 44 +++ 1 file changed, 44 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh index c2943e4dfcfe..9d64abdde146 100755 --- a/tools

[MPTCP][PATCH net-next 05/16] mptcp: add ADD_ADDR related mibs

2020-09-23 Thread Geliang Tang
: Geliang Tang --- net/mptcp/mib.c | 2 ++ net/mptcp/mib.h | 2 ++ net/mptcp/options.c | 7 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/net/mptcp/mib.c b/net/mptcp/mib.c index 056986c7a228..a33bf719ce6f 100644 --- a/net/mptcp/mib.c +++ b/net/mptcp/mib.c @@ -27,6 +27,8

[MPTCP][PATCH net-next 04/16] mptcp: send out ADD_ADDR with echo flag

2020-09-23 Thread Geliang Tang
When the ADD_ADDR suboption has been received, we need to send out the same ADD_ADDR suboption with echo-flag=1, and no HMAC. Suggested-by: Mat Martineau Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang --- net/mptcp/options.c| 27 --- net/mptcp/pm.c

[MPTCP][PATCH net-next 03/16] mptcp: add the incoming RM_ADDR support

2020-09-23 Thread Geliang Tang
to handle it. In mptcp_pm_nl_rm_addr_received, we closed the subflow matching the rm_id, and updated PM counter. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Suggested-by: Mat Martineau Signed-off-by: Geliang Tang --- net/mptcp/options.c| 5 + net/mptcp/pm.c | 12

[MPTCP][PATCH net-next 02/16] mptcp: add the outgoing RM_ADDR support

2020-09-23 Thread Geliang Tang
This patch added a new signal named rm_addr_signal in PM. On outgoing path, we called mptcp_pm_should_rm_signal to check if rm_addr_signal has been set. If it has been, we sent out the RM_ADDR option. Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang --- net

[MPTCP][PATCH net-next 01/16] mptcp: rename addr_signal and the related functions

2020-09-23 Thread Geliang Tang
This patch renamed addr_signal and the related functions with the explicit word "add". Suggested-by: Matthieu Baerts Suggested-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/options.c | 14 +++--- net/mptcp/pm.c | 12 ++-- net/mptcp/proto

[MPTCP][PATCH net-next 00/16] mptcp: RM_ADDR/ADD_ADDR enhancements

2020-09-23 Thread Geliang Tang
e the helpers for patch 16. These three patches add the ADD_ADDR retransmition when no ADD_ADDR echo is received. Geliang Tang (16): mptcp: rename addr_signal and the related functions mptcp: add the outgoing RM_ADDR support mptcp: add the incoming RM_ADDR support mptcp: send out ADD_ADDR with

Re: [mptcp] db71a2f198: WARNING:inconsistent_lock_state

2020-09-09 Thread Geliang Tang
; https://github.com/0day-ci/linux/commits/Geliang-Tang/mptcp-fix-subflow-s-local_id-remote_id-issues/20200908-105733 > base: https://git.kernel.org/cgit/linux/kernel/git/davem/net.git > e1f469cd5866499ac40bfdca87411e1c525a10c7 > > in testcase: kernel-selftests > version: kernel-selftes

[MPTCP][PATCH net] mptcp: fix kmalloc flag in mptcp_pm_nl_get_local_id

2020-09-08 Thread Geliang Tang
[ 280.209990] ? process_one_work+0x5b0/0x5b0 [ 280.209993] kthread+0x117/0x150 [ 280.209996] ? kthread_park+0x80/0x80 [ 280.209998] ret_from_fork+0x22/0x30 Fixes: 01cacb00b35cb ("mptcp: add netlink-based PM") Signed-off-by: Geliang Tang --- net/mptcp/pm_netlink.c | 2 +- 1 file changed, 1

[MPTCP][PATCH v2 net 2/2] mptcp: fix subflow's remote_id issues

2020-09-07 Thread Geliang Tang
tcp: Add handling of outgoing MP_JOIN requests") Fixes: f296234c98a8f ("mptcp: Add handling of incoming MP_JOIN requests") Signed-off-by: Geliang Tang --- net/mptcp/pm_netlink.c | 2 +- net/mptcp/subflow.c| 7 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff -

[MPTCP][PATCH v2 net 1/2] mptcp: fix subflow's local_id issues

2020-09-07 Thread Geliang Tang
add netlink-based PM") Signed-off-by: Geliang Tang --- net/mptcp/pm_netlink.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index 2c208d2e65cd..3e70d848033d 100644 --- a/net/mptcp/pm_netlink.c +++ b/net/mp

[MPTCP][PATCH v2 net 0/2] mptcp: fix subflow's local_id/remote_id issues

2020-09-07 Thread Geliang Tang
v2: - add Fixes tags; - simply with 'return addresses_equal'; - use 'reversed Xmas tree' way. Geliang Tang (2): mptcp: fix subflow's local_id issues mptcp: fix subflow's remote_id issues net/mptcp/pm_netlink.c | 17 +++-- net/mptcp/subflow.c

[MPTCP][PATCH net 2/2] mptcp: fix subflow's remote_id issues

2020-09-07 Thread Geliang Tang
This patch set the init remote_id to zero, otherwise it will be a random number. Then it added the missing subflow's remote_id setting code both in __mptcp_subflow_connect and in subflow_ulp_clone. Reviewed-by: Paolo Abeni Signed-off-by: Geliang Tang --- net/mptcp/pm_netlink.c | 2 +-

[MPTCP][PATCH net 1/2] mptcp: fix subflow's local_id issues

2020-09-07 Thread Geliang Tang
, it means that we can use any one of the local addresses. The zero address is not a new address, we don't need to add it to PM, so this patch added a new function address_zero to check whether an address is the zero address, if it is, we ignore this address. Reviewed-by: Paolo Abeni Signed-

[PATCH net-next] mptcp: use mptcp_for_each_subflow in mptcp_stream_accept

2020-08-03 Thread Geliang Tang
Use mptcp_for_each_subflow in mptcp_stream_accept instead of open-coding. Signed-off-by: Geliang Tang --- net/mptcp/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index d3fe7296e1c9..400824eabf73 100644 --- a/net/mptcp

[PATCH net-next] liquidio: use list_empty_careful in lio_list_delete_head

2020-06-28 Thread Geliang Tang
Use list_empty_careful() instead of open-coding. Signed-off-by: Geliang Tang --- drivers/net/ethernet/cavium/liquidio/octeon_network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_network.h b/drivers/net/ethernet/cavium

[PATCH net-next] sctp: use list_is_singular in sctp_list_single_entry

2020-06-28 Thread Geliang Tang
Use list_is_singular() instead of open-coding. Signed-off-by: Geliang Tang --- include/net/sctp/sctp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index f8bcb75bb044..e3bd198b00ae 100644 --- a/include/net/sctp/sctp.h

[PATCH net v2] mptcp: drop sndr_key in mptcp_syn_options

2020-06-22 Thread Geliang Tang
In RFC 8684, we don't need to send sndr_key in SYN package anymore, so drop it. Fixes: cc7972ea1932 ("mptcp: parse and emit MP_CAPABLE option according to v1 spec") Signed-off-by: Geliang Tang --- net/mptcp/options.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/mp

Re: [PATCH net-next 0/3] add MP_PRIO, MP_FAIL and MP_FASTCLOSE suboptions handling

2020-06-17 Thread Geliang Tang
On Tue, Jun 16, 2020 at 05:18:56PM +0200, Matthieu Baerts wrote: > Hi Geliang > > On 16/06/2020 08:47, Geliang Tang wrote: > > Add handling for sending and receiving the MP_PRIO, MP_FAIL, and > > MP_FASTCLOSE suboptions. > > Thank you for the patches! > > Unfo

[PATCH net-next 3/3] mptcp: add MP_FASTCLOSE suboption handling

2020-06-15 Thread Geliang Tang
Add handling for sending and receiving MP_FASTCLOSE suboption. Signed-off-by: Geliang Tang --- net/mptcp/options.c | 16 net/mptcp/protocol.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 82b3d7c566b4..a99b3989fec1

[PATCH net-next 2/3] mptcp: add MP_FAIL suboption handling

2020-06-15 Thread Geliang Tang
Add handling for sending and receiving MP_FAIL suboption. Signed-off-by: Geliang Tang --- net/mptcp/options.c | 18 ++ net/mptcp/protocol.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index cc3039f0ac43..82b3d7c566b4 100644

[PATCH net-next 1/3] mptcp: add MP_PRIO suboption handling

2020-06-15 Thread Geliang Tang
Add handling for sending and receiving MP_PRIO suboption. Signed-off-by: Geliang Tang --- net/mptcp/options.c | 14 ++ net/mptcp/protocol.h | 5 + 2 files changed, 19 insertions(+) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 490b92534afc..cc3039f0ac43 100644

[PATCH net-next 0/3] add MP_PRIO, MP_FAIL and MP_FASTCLOSE suboptions handling

2020-06-15 Thread Geliang Tang
Add handling for sending and receiving the MP_PRIO, MP_FAIL, and MP_FASTCLOSE suboptions. Geliang Tang (3): mptcp: add MP_PRIO suboption handling mptcp: add MP_FAIL suboption handling mptcp: add MP_FASTCLOSE suboption handling net/mptcp/options.c | 48

Re: [PATCH] mptcp: use list_first_entry_or_null

2020-06-15 Thread Geliang Tang
On Fri, Jun 12, 2020 at 11:22:31AM -0700, Mat Martineau wrote: > > Hello Geliang, > > On Fri, 12 Jun 2020, Geliang Tang wrote: > > > Use list_first_entry_or_null to simplify the code. > > > > Signed-off-by: Geliang Tang > > --- > > net/mpt

Re: [PATCH] mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX

2020-06-15 Thread Geliang Tang
On Fri, Jun 12, 2020 at 07:33:11PM +0200, Matthieu Baerts wrote: > Hi Geliang, > > On 12/06/2020 07:27, Geliang Tang wrote: > > Unify these two duplicate macros into 8. > > Thank you for this new patch! > > (...) > > > diff --git a/net/mptcp/protoco

[PATCH net-next v2] mptcp: use list_first_entry_or_null

2020-06-15 Thread Geliang Tang
Use list_first_entry_or_null to simplify the code. Signed-off-by: Geliang Tang --- Changes in v2: - Add "net-next" tag in Subject. --- net/mptcp/protocol.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 70

[PATCH net v2] mptcp: drop MPTCP_PM_MAX_ADDR

2020-06-15 Thread Geliang Tang
We have defined MPTCP_PM_ADDR_MAX in pm_netlink.c, so drop this duplicate macro. Fixes: 1b1c7a0ef7f3 ("mptcp: Add path manager interface") Signed-off-by: Geliang Tang --- Changes in v2: - change Subject from "mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX" --- net/

[PATCH] mptcp: use list_first_entry_or_null

2020-06-11 Thread Geliang Tang
Use list_first_entry_or_null to simplify the code. Signed-off-by: Geliang Tang --- net/mptcp/protocol.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index 86d265500cf6..55c65abcad64 100644 --- a/net/mptcp/protocol.h +++ b

[PATCH] mptcp: unify MPTCP_PM_MAX_ADDR and MPTCP_PM_ADDR_MAX

2020-06-11 Thread Geliang Tang
Unify these two duplicate macros into 8. Signed-off-by: Geliang Tang --- net/mptcp/pm_netlink.c | 2 -- net/mptcp/protocol.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c index b78edf237ba0..b694f13caba8 100644 --- a/net

Re: [PATCH] mptcp: bugfix for RM_ADDR option parsing

2020-06-08 Thread Geliang Tang
On Mon, Jun 08, 2020 at 12:10:23PM +0200, Matthieu Baerts wrote: > Hi Geliang, > > On 08/06/2020 09:48, Geliang Tang wrote: > > In MPTCPOPT_RM_ADDR option parsing, the pointer "ptr" pointed to the > > "Subtype" octet, the pointer

[PATCH net v2] mptcp: bugfix for RM_ADDR option parsing

2020-06-08 Thread Geliang Tang
| ptrptr+1 We should set mp_opt->rm_id to the value of "ptr+1", not "ptr". This patch will fix this bug. Fixes: 3df523ab582c ("mptcp: Add ADD_ADDR handling") Signed-off-by: Geliang Tang --- Changes in v2: - Add "-net" subject an

[PATCH] mptcp: bugfix for RM_ADDR option parsing

2020-06-08 Thread Geliang Tang
| ptrptr+1 We should set mp_opt->rm_id to the value of "ptr+1", not "ptr". This patch will fix this bug. Signed-off-by: Geliang Tang --- net/mptcp/options.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/mptcp/options.c b/net/mptcp/op

[PATCH] tcp: fix __tcp_transmit_skb's comment text

2019-02-26 Thread Geliang Tang
The function name tcp_do_sendmsg has been renamed. But it still appears in __tcp_transmit_skb's comment text. This patch changes it to tcp_sendmsg_locked. Signed-off-by: Geliang Tang --- net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net

[PATCH] netfilter: ebtables: use audit_log()

2017-08-07 Thread Geliang Tang
Use audit_log() instead of open-coding it. Signed-off-by: Geliang Tang --- net/bridge/netfilter/ebtables.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 9c6e619..54c7ef4 100644 --- a/net

[PATCH] netfilter: xtables: use audit_log()

2017-08-07 Thread Geliang Tang
Use audit_log() instead of open-coding it. Signed-off-by: Geliang Tang --- net/netfilter/x_tables.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index e164823..c83a3b5 100644 --- a/net/netfilter

[PATCH] wil6210: use memdup_user

2017-05-06 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/net/wireless/ath/wil6210/debugfs.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless

[PATCH] net/hippi/rrunner: use memdup_user

2017-05-06 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/net/hippi/rrunner.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/net/hippi/rrunner.c b/drivers/net/hippi/rrunner.c index 9b0d614

[PATCH] xfrm: use memdup_user

2017-05-06 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- net/xfrm/xfrm_state.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index fc3c5aa..5780cda 100644 --- a/net/xfrm

[PATCH] wlcore: use memdup_user

2017-05-06 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/net/wireless/ti/wlcore/debugfs.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/debugfs.c b/drivers/net/wireless/ti

[PATCH] yam: use memdup_user

2017-05-06 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/net/hamradio/yam.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index b6891ad..7a7c522 100644

[PATCH] xprtrdma: use offset_in_page() macro

2017-04-21 Thread Geliang Tang
Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang --- net/sunrpc/xprtrdma/rpc_rdma.c| 4 ++-- net/sunrpc/xprtrdma/svc_rdma_sendto.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma

[PATCH] net: atheros: atl1: use offset_in_page() macro

2017-04-21 Thread Geliang Tang
Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang --- drivers/net/ethernet/atheros/atlx/atl1.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index

[PATCH] net_sched: use setup_deferrable_timer

2017-03-24 Thread Geliang Tang
Use setup_deferrable_timer() instead of init_timer_deferrable() to simplify the code. Signed-off-by: Geliang Tang --- net/sched/cls_flow.c | 5 ++--- net/sched/sch_sfq.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index

[PATCH] isdn: use setup_timer

2017-03-23 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- drivers/isdn/divert/isdn_divert.c | 9 +++-- drivers/isdn/hardware/eicon/divasi.c| 5 ++--- drivers/isdn/hardware/mISDN/hfcmulti.c | 10 -- drivers/isdn/hardware/mISDN

[PATCH] drop_monitor: use setup_timer

2017-03-10 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- net/core/drop_monitor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index fb55327..70ccda2 100644 --- a/net/core

[PATCH] ambassador: use setup_timer

2017-03-10 Thread Geliang Tang
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- drivers/atm/ambassador.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 4a61079..906705e 100644 --- a/drivers/atm

Re: [PATCH] net/mlx4: use rb_entry()

2017-01-22 Thread Geliang Tang
On Sun, Jan 22, 2017 at 09:48:39AM +0200, Leon Romanovsky wrote: > On Fri, Jan 20, 2017 at 10:36:57PM +0800, Geliang Tang wrote: > > To make the code clearer, use rb_entry() instead of container_of() to > > deal with rbtree. > > > > Signed-off-by: Geliang Tang > &

[PATCH] net/mlx4: use rb_entry()

2017-01-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx4

[PATCH] 6lowpan: use rb_entry()

2017-01-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- net/6lowpan/nhc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/6lowpan/nhc.c b/net/6lowpan/nhc.c index 7008d53..4fa2fdd 100644 --- a/net

[PATCH] sock: use hlist_entry_safe

2017-01-20 Thread Geliang Tang
Use hlist_entry_safe() instead of open-coding it. Signed-off-by: Geliang Tang --- include/net/sock.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index 4077ec4..c4e1caf1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h

[PATCH] net_sched: sch_fq: use rb_entry()

2016-12-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- net/sched/sch_fq.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c index 86309a3..a4f738a 100644

[PATCH] net/mlx5: use rb_entry()

2016-12-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_counters.c

[PATCH] RDS: use rb_entry()

2016-12-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- net/rds/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 4c93bad..ea96114 100644 --- a/net/rds/rdma.c +++ b/net

[PATCH] netfilter: xt_connlimit: use rb_entry()

2016-12-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- net/netfilter/xt_connlimit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index 2aff2b7

[PATCH] net_sched: sch_netem: use rb_entry()

2016-12-20 Thread Geliang Tang
To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang --- net/sched/sch_netem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 9f7b380..b7e4097 100644 --- a/net

[PATCH] net/mlx5: drop duplicate header delay.h

2016-11-24 Thread Geliang Tang
Drop duplicate header delay.h from mlx5/core/main.c. Signed-off-by: Geliang Tang --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index f28df33

[PATCH] ath5k: drop duplicate header vmalloc.h

2016-11-24 Thread Geliang Tang
Drop duplicate header vmalloc.h from ath5k/debug.c. Signed-off-by: Geliang Tang --- drivers/net/wireless/ath/ath5k/debug.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index 4f8d9ed..d068df5 100644 --- a

[PATCH] ibmvnic: drop duplicate header seq_file.h

2016-11-24 Thread Geliang Tang
Drop duplicate header seq_file.h from ibmvnic.c. Signed-off-by: Geliang Tang --- drivers/net/ethernet/ibm/ibmvnic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index 1e486d1..c125966 100644 --- a/drivers/net

[PATCH] net: ieee802154: drop duplicate header delay.h

2016-11-24 Thread Geliang Tang
Drop duplicate header delay.h from adf7242.c. Signed-off-by: Geliang Tang --- drivers/net/ieee802154/adf7242.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c index 4ff4c7d..3e4c8b2 100644 --- a/drivers/net/ieee802154

[PATCH] dwc_eth_qos: drop duplicate headers

2016-11-23 Thread Geliang Tang
Drop duplicate headers types.h and delay.h from dwc_eth_qos.c. Signed-off-by: Geliang Tang --- drivers/net/ethernet/synopsys/dwc_eth_qos.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/synopsys/dwc_eth_qos.c b/drivers/net/ethernet/synopsys/dwc_eth_qos.c index

[PATCH] drivers: net: davinci_mdio: use builtin_platform_driver

2016-11-23 Thread Geliang Tang
Use builtin_platform_driver() helper to simplify the code. Signed-off-by: Geliang Tang --- drivers/net/ethernet/ti/davinci_mdio.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index

[PATCH 3/3] libceph: use KMEM_CACHE macro

2016-03-12 Thread Geliang Tang
Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code. Signed-off-by: Geliang Tang --- net/ceph/messenger.c | 10 ++ net/ceph/osd_client.c | 5 + 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index

[PATCH 3/6] wl1251: use to_delayed_work

2016-01-01 Thread Geliang Tang
Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/net/wireless/ti/wl1251/ps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wl1251/ps.c b/drivers/net/wireless/ti/wl1251/ps.c index b9e27b9..fa01b0a 100644 --- a

[PATCH 4/6] rtlwifi: use to_delayed_work

2016-01-01 Thread Geliang Tang
Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h index

[PATCH 6/6] tilepro: use to_delayed_work

2016-01-01 Thread Geliang Tang
Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/net/ethernet/tile/tilepro.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c index 6f0a449..298e059 100644

[PATCH 5/6] mwifiex: use to_delayed_work

2016-01-01 Thread Geliang Tang
Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/net/wireless/marvell/mwifiex/11h.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/11h.c b/drivers/net/wireless/marvell/mwifiex/11h.c index

[PATCH 1/6] cfg80211/mac80211: use to_delayed_work

2016-01-01 Thread Geliang Tang
Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang --- net/mac80211/mlme.c | 3 +-- net/wireless/mlme.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 1c342e2..ea70917 100644 --- a/net/mac80211

[PATCH 2/6] wlcore: use to_delayed_work

2016-01-01 Thread Geliang Tang
Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/net/wireless/ti/wlcore/main.c | 10 +- drivers/net/wireless/ti/wlcore/ps.c | 2 +- drivers/net/wireless/ti/wlcore/scan.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a

[PATCH v2] ipw2x00: use to_pci_dev()

2016-01-01 Thread Geliang Tang
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang --- This patch is against net-next tree. Changes in v2: - fix wrong title. --- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel

[PATCH 1/3] batman-adv: use to_delayed_work

2015-12-28 Thread Geliang Tang
Use to_delayed_work() instead of open-coding it. Signed-off-by: Geliang Tang --- net/batman-adv/bridge_loop_avoidance.c | 2 +- net/batman-adv/distributed-arp-table.c | 2 +- net/batman-adv/network-coding.c| 2 +- net/batman-adv/originator.c| 2 +- net/batman-adv/send.c

Re: [PATCH 06/10] net: hns: use to_platform_device()

2015-12-27 Thread Geliang Tang
On Sun, Dec 27, 2015 at 03:23:30PM +0200, Andy Shevchenko wrote: > On Sun, Dec 27, 2015 at 3:15 PM, Geliang Tang wrote: > > Use to_platform_device() instead of open-coding it. > > > > Signed-off-by: Geliang Tang > > --- > > drivers/net/ethernet/hisilicon/hns/h

[PATCH 06/10] net: hns: use to_platform_device()

2015-12-27 Thread Geliang Tang
Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns

[PATCH 5/9] ipw2x00: sdhci-pci: use to_pci_dev()

2015-12-27 Thread Geliang Tang
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/net/wireless/intel/ipw2x00/ipw2100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c index 36818c7

[PATCH 6/9] ssb: use to_pci_dev()

2015-12-27 Thread Geliang Tang
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/ssb/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ssb/pci.c b/drivers/ssb/pci.c index 0f28c08..67428f4 100644 --- a/drivers/ssb/pci.c +++ b/drivers/ssb/pci.c @@ -1130,7

[PATCH 1/9] atm: solos-pci: use to_pci_dev()

2015-12-27 Thread Geliang Tang
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang --- drivers/atm/solos-pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c index 0c2b4ba0..6ac2b2b 100644 --- a/drivers/atm/solos-pci.c +++ b

[PATCH 2/2] bridge: use kobj_to_dev instead of to_dev

2015-12-23 Thread Geliang Tang
kobj_to_dev has been defined in linux/device.h, so I replace to_dev with it. Signed-off-by: Geliang Tang --- net/bridge/br_sysfs_br.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c index 8365bd5..6b80914 100644 --- a/net

[PATCH 1/2] bonding: drop unused to_dev macro in bond_sysfs.c

2015-12-23 Thread Geliang Tang
to_dev is not used anymore so drop it. Signed-off-by: Geliang Tang --- drivers/net/bonding/bond_sysfs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index f4ae720..313dbac 100644 --- a/drivers/net/bonding/bond_sysfs.c

[PATCH] net-sysfs: use to_net_dev in net_namespace()

2015-12-22 Thread Geliang Tang
Use to_net_dev() instead of open-coding it. Signed-off-by: Geliang Tang --- net/core/net-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index bca8c35..b6c8a66 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net

[PATCH 03/14 v2] ipv4, ipv6: use list_for_each_entry*

2015-12-19 Thread Geliang Tang
Use list_for_each_entry*() instead of list_for_each*() to simplify the code. Signed-off-by: Geliang Tang --- Changes in v2: - bugfix for inet6_register_protosw in v1. --- net/ipv4/af_inet.c| 11 --- net/ipv4/tcp_output.c | 6 ++ net/ipv6/addrconf.c | 8 +++- net/ipv6

  1   2   >