[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-

[PATCH] NFSv4.1: use BITS_PER_LONG macro in nfs4session.h

2020-12-07 Thread Geliang Tang
Use the existing BITS_PER_LONG macro instead of calculating the value. Signed-off-by: Geliang Tang --- fs/nfs/nfs4session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h index b996ee23f1ba..3de425f59b3a 100644 --- a/fs/nfs

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 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

[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 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

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 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 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 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

Re: [PATCH] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-02-26 Thread Geliang Tang
On Wed, Feb 06, 2019 at 04:37:36PM +0800, Coly Li wrote: > On 2019/1/30 5:29 下午, Geliang Tang wrote: > > This patch uses kmemdup_nul to create a NUL-terminated string from > > dc->sb.label. This is better than open coding it. > > > > With this, we can move env[2] i

Re: [PATCH] security: keys: add NULL checking for key->type->instantiate

2019-02-26 Thread Geliang Tang
On Wed, Feb 06, 2019 at 10:26:53PM +, David Howells wrote: > Geliang Tang wrote: > > > key->type->instantiate can be NULL, add NULL checking to prevent > > NULL pointer dereference in __key_instantiate_and_link(). > > Do you have an oops report or test case for

Re: [PATCH] security: keys: add NULL checking for key->type->instantiate

2019-02-26 Thread Geliang Tang
On Wed, Feb 06, 2019 at 10:26:53PM +, David Howells wrote: > Geliang Tang wrote: > > > key->type->instantiate can be NULL, add NULL checking to prevent > > NULL pointer dereference in __key_instantiate_and_link(). > > Do you have an oops report or test case for

[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] bcache: use kmemdup_nul for CACHED_LABEL buffer

2019-01-30 Thread Geliang Tang
This patch uses kmemdup_nul to create a NUL-terminated string from dc->sb.label. This is better than open coding it. With this, we can move env[2] initialization into env[] array to make code more elegant. Signed-off-by: Geliang Tang --- drivers/md/bcache/super.c | 10 -- 1 f

[PATCH v5 2/2] squashfs-tools: Add posix acl support

2019-01-25 Thread Geliang Tang
This patch adds posix acl (Access Control Lists) support to squashfs-tools. Signed-off-by: Geliang Tang --- squashfs-tools/read_xattrs.c | 2 ++ squashfs-tools/squashfs_fs.h | 12 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/squashfs-tools/read_xattrs.c b

[PATCH v5 1/2] squashfs: Add posix acl support

2019-01-25 Thread Geliang Tang
Add posix acl (Access Control Lists) support for squashfs, which is marked as a todo item in squashfs documentation. This patch implements a squashfs_get_acl function to read the file's acl information from its xattr lists. Signed-off-by: Geliang Tang --- Changes in v5: - add SPDX

[PATCH v5 0/2] squashfs/squashfs-tools: Add posix acl support

2019-01-25 Thread Geliang Tang
/AgAGAOgDAAAEAAUA/xAABwD/IAAFAP8= --- Geliang Tang (1): squashfs: Add posix acl support Documentation/filesystems/squashfs.txt | 2 - fs/squashfs/Kconfig| 11 + fs/squashfs/Makefile | 1 + fs/squashfs/acl.c | 56

[PATCH v4 1/2] squashfs: Add posix acl support

2019-01-25 Thread Geliang Tang
Add posix acl (Access Control Lists) support for squashfs, which is marked as a todo item in squashfs documentation. This patch implements a squashfs_get_acl function to read the file's acl information from its xattr lists. Signed-off-by: Geliang Tang --- Documentation/filesystems/squashf

[PATCH v4 0/2] squashfs/squashfs-tools: Add posix acl support

2019-01-25 Thread Geliang Tang
/AgAGAOgDAAAEAAUA/xAABwD/IAAFAP8= --- Geliang Tang (1): squashfs: Add posix acl support Documentation/filesystems/squashfs.txt | 2 - fs/squashfs/Kconfig| 11 fs/squashfs/Makefile | 1 + fs/squashfs/acl.c | 69

[PATCH v4 2/2] squashfs-tools: Add posix acl support

2019-01-25 Thread Geliang Tang
This patch adds posix acl (Access Control Lists) support to squashfs-tools. Signed-off-by: Geliang Tang --- squashfs-tools/read_xattrs.c | 2 ++ squashfs-tools/squashfs_fs.h | 12 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/squashfs-tools/read_xattrs.c b

[PATCH] f2fs: fix typos in code comments

2019-01-24 Thread Geliang Tang
lengh -> length Signed-off-by: Geliang Tang --- include/linux/f2fs_fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index d7711048ef93..624b8a47d3c6 100644 --- a/include/linux/f2fs_fs.h +++ b/include/linux/f2fs_f

[PATCH] security: keys: add NULL checking for key->type->instantiate

2019-01-24 Thread Geliang Tang
key->type->instantiate can be NULL, add NULL checking to prevent NULL pointer dereference in __key_instantiate_and_link(). Signed-off-by: Geliang Tang --- security/keys/key.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/keys/key.c b/security/keys/key.c

[PATCH v3 2/2] squashfs-tools: Add posix acl support

2018-08-07 Thread Geliang Tang
This patch adds posix acl (Access Control Lists) support to squashfs-tools. Signed-off-by: Geliang Tang --- squashfs-tools/read_xattrs.c | 2 ++ squashfs-tools/squashfs_fs.h | 12 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/squashfs-tools/read_xattrs.c b

[PATCH v3 1/2] squashfs: Add posix acl support

2018-08-07 Thread Geliang Tang
Add posix acl (Access Control Lists) support for squashfs, which is marked as a todo item in squashfs documentation. This patch implements a squashfs_get_acl function to read the file's acl information from its xattr lists. Signed-off-by: Geliang Tang --- Documentation/filesystems/squashf

[PATCH v3 0/2] squashfs/squashfs-tools: Add posix acl support

2018-08-07 Thread Geliang Tang
/AgAGAOgDAAAEAAUA/xAABwD/IAAFAP8= --- Geliang Tang (1): squashfs: Add posix acl support Documentation/filesystems/squashfs.txt | 2 - fs/squashfs/Kconfig| 11 fs/squashfs/Makefile | 1 + fs/squashfs/acl.c | 69

[PATCH] pstore: set PSTORE_ZSTD_COMPRESS to bool

2018-08-03 Thread Geliang Tang
Fix build error: fs/pstore/platform.o: In function `zbufsize_zstd': >> platform.c:(.text+0x172): undefined reference to `ZSTD_compressBound' Signed-off-by: Geliang Tang --- fs/pstore/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/pstore/Kco

[PATCH] pstore: add zstd compression support

2018-08-01 Thread Geliang Tang
This patch added the 6th compression algorithm support for pstore: zstd. Signed-off-by: Geliang Tang --- fs/pstore/Kconfig| 17 ++--- fs/pstore/platform.c | 16 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig

Re: [PATCH] pstore: add zstd compression support

2018-04-23 Thread Geliang Tang
On Wed, Mar 21, 2018 at 08:29:31PM +0800, Geliang Tang wrote: > This patch added the 6th compression algorithm support for pstore: zstd. > > Signed-off-by: Geliang Tang > --- > Depend on 'crypto: Add zstd support' by Nick Terrell Hi Kees, The patch 'crypto: zst

[PATCH v2] squashfs: Add posix acl support

2018-04-09 Thread Geliang Tang
Add posix acl (Access Control Lists) support for squashfs, which is marked as a todo item in squashfs' documentation. This patch implements the squashfs_get_acl function to read file's acl information from its xattr lists. Signed-off-by: Geliang Tang --- Changes in v2: - fix build

[PATCH] squashfs-tools: Add posix acl support

2018-04-09 Thread Geliang Tang
Add posix acl (Access Control Lists) support for mksquashfs and unsquashfs tools. Signed-off-by: Geliang Tang --- squashfs-tools/read_xattrs.c | 2 ++ squashfs-tools/squashfs_fs.h | 12 +++- squashfs-tools/unsquashfs_xattr.c | 4 +++- 3 files changed, 12 insertions(+), 6

[PATCH] squashfs: Add posix acl support

2018-04-09 Thread Geliang Tang
Add posix acl (Access Control Lists) support for squashfs, which is marked as a todo item in squashfs' documentation. This patch implements the squashfs_get_acl function to read file's acl information from its xattr lists. Signed-off-by: Geliang Tang --- Documentation/filesystems/sq

[PATCH] pstore: set PSTORE_842_COMPRESS tristate

2018-03-21 Thread Geliang Tang
This patch sets PSTORE_842_COMPRESS 'tristate' like other pstore compression algorithms in Kconfig. Signed-off-by: Geliang Tang --- fs/pstore/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig index 09c19ef91526..a80c9bc0f

[PATCH] pstore: rename two compression functions

2018-03-21 Thread Geliang Tang
ession pstore_choose_compression pstore_choose_compression pstore_compress pstore_compress pstore_decompress pstore_decompress Signed-off-by: Geliang Tang --- fs/pstore/platform.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[PATCH] pstore: add zstd compression support

2018-03-21 Thread Geliang Tang
This patch added the 6th compression algorithm support for pstore: zstd. Signed-off-by: Geliang Tang --- Depend on 'crypto: Add zstd support' by Nick Terrell --- fs/pstore/Kconfig| 17 ++--- fs/pstore/platform.c | 16 2 files changed, 30 insert

[PATCH] pstore: use crypto compress API

2018-03-09 Thread Geliang Tang
the crypto subsystem has already initialized. 4) use 'unsigned int' type instead of 'size_t' in pstore_compress, pstore_decompress functions' length arguments. 5) rename 'zlib' to 'deflate' to follow the crypto API's name convention. Signed-off

[PATCH v4] pstore: add lz4hc and 842 compression support

2018-02-12 Thread Geliang Tang
Currently, pstore has supported three compression algorithms: zlib, lzo and lz4. This patch added two more compression algorithms: lz4hc and 842. Signed-off-by: Geliang Tang --- Changes in v4: -842 compress is not work in patch v3 since big_oops_buf_sz is too big. change big_oops_buf_sz from

[PATCH v3] pstore: add lz4hc and 842 compression support

2018-02-11 Thread Geliang Tang
Currently, pstore has supported three compression algorithms: zlib, lzo and lz4. This patch added two more compression algorithms: lz4hc and 842. Signed-off-by: Geliang Tang --- Changes in v3: -fix outlen in 842 Changes in v2: -fix checkpatch.pl WARNING: please write a paragraph that

Re: [PATCH] pstore: add lz4hc and 842 compression support

2018-02-11 Thread Geliang Tang
return -EIO; > > + } > > + outlen = len; > > This has no effect. What was intended? > > > + ret = sw842_decompress(in, inlen, out, &len); > > + if (ret < 0) { > > + pr_err("sw842_decompress error, ret = %

[PATCH v2] pstore: add lz4hc and 842 compression support

2017-11-01 Thread Geliang Tang
From: Geliang Tang Currently, pstore has supported three compression algorithms: zlib, lzo and lz4. This patch added two more compression algorithms: lz4hc and 842. Signed-off-by: Geliang Tang --- Changes in v2: fix checkpatch.pl WARNING: please write a paragraph that describes the config

[PATCH] crypto: drop unnecessary return statements

2017-08-28 Thread Geliang Tang
/marvell/cesa.c:81: FILE: drivers/crypto/ux500/cryp/cryp_core.c:1755: Signed-off-by: Geliang Tang --- crypto/rmd128.c | 2 -- crypto/rmd160.c | 2 -- crypto/rmd256.c | 2 -- crypto/rmd320.c | 2 -- crypto/tcrypt.c

[PATCH] lsm_audit: use get_task_comm

2017-08-28 Thread Geliang Tang
get_task_comm() copys the task's comm under the task_lock, it's safer than directly using memcpy(). Signed-off-by: Geliang Tang --- security/lsm_audit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/lsm_audit.c b/security/lsm_audit.c index 28d4c3

[PATCH] pstore: add lz4hc and 842 compression support

2017-08-28 Thread Geliang Tang
Currently, pstore has supported three compression algorithms: zlib, lzo and lz4. This patch added two more compression algorithms: lz4hc and 842. Signed-off-by: Geliang Tang --- fs/pstore/Kconfig| 14 ++ fs/pstore/platform.c | 128 +-- 2

[PATCH] staging: media: atomisp: use kvmalloc/kvzalloc

2017-08-07 Thread Geliang Tang
Use kvmalloc()/kvzalloc() instead of atomisp_kernel_malloc() /atomisp_kernel_zalloc(). Signed-off-by: Geliang Tang --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 31 +- .../media/atomisp/pci/atomisp2/atomisp_cmd.h | 2 -- .../atomisp/pci/atomisp2

[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] 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] audit: update the function comments

2017-08-07 Thread Geliang Tang
Update the function comments to match the code. Signed-off-by: Geliang Tang --- kernel/audit.c | 2 +- kernel/auditsc.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/audit.c b/kernel/audit.c index 0cf15c7..be1c28f 100644 --- a/kernel/audit.c

[tip:efi/core] efi/efi_test: Use memdup_user() helper

2017-06-05 Thread tip-bot for Geliang Tang
Commit-ID: 5f72cad65cfaac5e40d0de8b7f48ee647af69cd5 Gitweb: http://git.kernel.org/tip/5f72cad65cfaac5e40d0de8b7f48ee647af69cd5 Author: Geliang Tang AuthorDate: Fri, 2 Jun 2017 13:52:05 + Committer: Ingo Molnar CommitDate: Mon, 5 Jun 2017 17:50:42 +0200 efi/efi_test: Use

[PATCH] usb: gadget: f_fs: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/usb/gadget/function/f_fs.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index

[PATCH] KEYS: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- security/keys/keyctl.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index dd0da25..ce1574a 100644 --- a

[PATCH] USB: iowarrior: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/usb/misc/iowarrior.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index 7756953..816afad

[PATCH] mmc: block: use memdup_user

2017-05-12 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- drivers/mmc/core/block.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 8273b07..47ccb2a 100644

[PATCH v2] usb: cdc-wdm: use memdup_user

2017-05-08 Thread Geliang Tang
Use memdup_user() helper instead of open-coding to simplify the code. Signed-off-by: Geliang Tang --- Changes in v2: - return count instead of "rv < 0 ? rv : count". --- drivers/usb/class/cdc-wdm.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --

[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] 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] 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

  1   2   3   4   5   6   7   8   >