Re: [PATCH] tipc: fix -Wstringop-truncation warnings

2020-11-13 Thread Ying Xue
: 'strncpy' specified bound 32 equals > destination size [-Wstringop-truncation] > strncpy(name_copy, name, TIPC_MAX_BEARER_NAME); > ^~ > > Signed-off-by: Wenlin Kang Acked-by: Ying Xue > --- > net/tipc/bearer.c | 5 + >

Re: [PATCH net-next] tipc: Use is_broadcast_ether_addr() instead of memcmp()

2020-08-03 Thread Ying Xue
ned-off-by: Huang Guobin Acked-by: Ying Xue > --- > net/tipc/eth_media.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c > index 8b0bb600602d..c68019697cfe 100644 > --- a/net/tipc/eth_media.c &g

Re: [PATCH] net: tipc: fix general protection fault in tipc_conn_delete_sub

2020-07-28 Thread Ying Xue
On 7/27/20 10:24 PM, Greg KH wrote: diff --git a/net/tipc/topsrv.c b/net/tipc/topsrv.c index 1489cfb941d8..6c8d0c6bb112 100644 --- a/net/tipc/topsrv.c +++ b/net/tipc/topsrv.c @@ -255,6 +255,9 @@ static void tipc_conn_send_to_sock(struct tipc_conn *con) int

Re: memory leak in tipc_group_create_member

2019-08-02 Thread Ying Xue
c/socket.c:3006 >> [<7f61cbc2>] __sys_setsockopt+0x10f/0x220 net/socket.c:2084 >> [<cc630372>] __do_sys_setsockopt net/socket.c:2100 [inline] >> [<cc630372>] __se_sys_setsockopt net/socket.c:2097 [inline] >> [<

Re: [PATCH] tipc: compat: allow tipc commands without arguments

2019-08-01 Thread Ying Xue
This patch relaxes the original fix and rejects messages without > arguments only if such arguments are expected by a command (reg_type is > non zero). > > Fixes: 2753ca5d9009 ("tipc: fix uninit-value in tipc_nl_compat_doit") > Cc: sta...@vger.kernel.org > Signe

Re: [PATCH] net: tipc: Fix a possible null-pointer dereference in tipc_publ_purge()

2019-07-26 Thread Ying Xue
On 7/25/19 5:20 PM, Jia-Ju Bai wrote: > In tipc_publ_purge(), there is an if statement on 215 to > check whether p is NULL: > if (p) > > When p is NULL, it is used on line 226: > kfree_rcu(p, rcu); > > Thus, a possible null-pointer dereference may occur. > > To fix this bug, p is

Re: memory leak in tipc_buf_acquire

2019-06-16 Thread Ying Xue
On 6/10/19 2:44 AM, Xin Long wrote: > Looks we need to purge each member's deferredq list in tipc_group_delete(): > diff --git a/net/tipc/group.c b/net/tipc/group.c > index 992be61..23823eb 100644 > --- a/net/tipc/group.c > +++ b/net/tipc/group.c > @@ -218,6 +218,7 @@ void tipc_group_delete(struct

Re: Userspace woes with 5.1.5 due to TIPC

2019-05-31 Thread Ying Xue
On 5/31/19 7:02 PM, Jon Maloy wrote: > This was the very reason the broken patch was introduced. AFAIK there is no > problem after the corrected version of that patch was applied. I have prepared for our patches on net-next tree. But when I checked my patches on net tree, it's found that the

Re: Userspace woes with 5.1.5 due to TIPC

2019-05-30 Thread Ying Xue
On 5/31/19 4:47 AM, Mihai Moldovan wrote: > * On 5/30/19 9:51 PM, Jon Maloy wrote: >> Make sure the following three commits are present in TIPC *after* the >> offending commit: >> >> commit 532b0f7ece4c "tipc: fix modprobe tipc failed after switch order of >> device registration" > > This *is*

Re: [PATCH v2] tipc: Avoid copying bytes beyond the supplied data

2019-05-23 Thread Ying Xue
On 5/23/19 4:46 AM, Chris Packham wrote: > On most distros that is generated from include/uapi in the kernel source > and packaged as part of libc or a kernel-headers package. So once this > patch is accepted and makes it into the distros > /usr/include/linux/tipc_config.h will have this fix.

Re: [PATCH v2] tipc: Avoid copying bytes beyond the supplied data

2019-05-22 Thread Ying Xue
> 'bearer_name' declared here > char bearer_name[TIPC_MAX_BEARER_NAME]; > ^~~ > > We still want to ensure any padding bytes at the end are initialised, do > this with a explicit memset() rather than copy bytes past the end of > data. Apply the same logic to TCM_SET

Re: [PATCH] tipc: remove dead code in struct tipc_topsrv

2019-01-23 Thread Ying Xue
On 1/24/19 10:06 AM, Zhaolong Zhang wrote: > max_rcvbuf_size is no longer used since commit "414574a0af36". > > Signed-off-by: Zhaolong Zhang Acked-by: Ying Xue > --- > net/tipc/topsrv.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/net/tipc/to

Re: [PATCH] tipc: fix memory leak in tipc_nl_compat_publ_dump

2019-01-05 Thread Ying Xue
t") > Signed-off-by: Gustavo A. R. Silva Acked-by: Ying Xue > --- > net/tipc/netlink_compat.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c > index 40f5cae623a7..77e4b2418f3

Re: net/tipc: recursive locking in tipc_link_reset

2018-10-11 Thread Ying Xue
Jon, please help to review the patch: https://patchwork.ozlabs.org/patch/982447. Thanks, Ying On 10/11/2018 06:55 PM, Jon Maloy wrote: > Hi Dmitry, > Yes, we are aware of this, the kernel test robot warned us about this a few > days ago. > I am looking into it. > > ///jon

Re: net/tipc: recursive locking in tipc_link_reset

2018-10-11 Thread Ying Xue
Jon, please help to review the patch: https://patchwork.ozlabs.org/patch/982447. Thanks, Ying On 10/11/2018 06:55 PM, Jon Maloy wrote: > Hi Dmitry, > Yes, we are aware of this, the kernel test robot warned us about this a few > days ago. > I am looking into it. > > ///jon

Re: net/tipc: recursive locking in tipc_link_reset

2018-10-11 Thread Ying Xue
On 10/11/2018 03:59 PM, Dmitry Vyukov wrote: > On Thu, Oct 11, 2018 at 9:55 AM, Dmitry Vyukov wrote: >> Hi, >> >> I am getting the following error while booting the latest kernel on >> bb2d8f2f61047cbde08b78ec03e4ebdb01ee5434 (Oct 10). Config is attached. >> >> Since this happens during boot,

Re: net/tipc: recursive locking in tipc_link_reset

2018-10-11 Thread Ying Xue
On 10/11/2018 03:59 PM, Dmitry Vyukov wrote: > On Thu, Oct 11, 2018 at 9:55 AM, Dmitry Vyukov wrote: >> Hi, >> >> I am getting the following error while booting the latest kernel on >> bb2d8f2f61047cbde08b78ec03e4ebdb01ee5434 (Oct 10). Config is attached. >> >> Since this happens during boot,

[PATCH net] tipc: eliminate possible recursive locking detected by LOCKDEP

2018-10-11 Thread Ying Xue
for us. Fixes: 3f32d0be6c16 ("tipc: lock wakeup & inputq at tipc_link_reset()") Reported-by: Dmitry Vyukov Signed-off-by: Ying Xue --- net/tipc/link.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index fb886b

[PATCH net] tipc: eliminate possible recursive locking detected by LOCKDEP

2018-10-11 Thread Ying Xue
for us. Fixes: 3f32d0be6c16 ("tipc: lock wakeup & inputq at tipc_link_reset()") Reported-by: Dmitry Vyukov Signed-off-by: Ying Xue --- net/tipc/link.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/net/tipc/link.c b/net/tipc/link.c index fb886b

Re: KMSAN: uninit-value in strcmp

2018-05-08 Thread Ying Xue
On 05/04/2018 03:22 AM, David Miller wrote: > From: syzbot > Date: Thu, 03 May 2018 11:44:02 -0700 > >> Call Trace: >> __dump_stack lib/dump_stack.c:17 [inline] >> dump_stack+0x185/0x1d0 lib/dump_stack.c:53 >> kmsan_report+0x142/0x240

Re: KMSAN: uninit-value in strcmp

2018-05-08 Thread Ying Xue
On 05/04/2018 03:22 AM, David Miller wrote: > From: syzbot > Date: Thu, 03 May 2018 11:44:02 -0700 > >> Call Trace: >> __dump_stack lib/dump_stack.c:17 [inline] >> dump_stack+0x185/0x1d0 lib/dump_stack.c:53 >> kmsan_report+0x142/0x240 mm/kmsan/kmsan.c:1067 >> __msan_warning_32+0x6c/0xb0

Re: [PATCH v2] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-11 Thread Ying Xue
On 04/10/2018 09:17 AM, Jia-Ju Bai wrote: > tipc_mon_create() is never called in atomic context. > > The call chain ending up at dn_route_init() is: Sorry, I don't think there is any relationship between the following call chain with dn_route_init(). > [1] tipc_mon_create() <-

Re: [PATCH v2] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-11 Thread Ying Xue
On 04/10/2018 09:17 AM, Jia-Ju Bai wrote: > tipc_mon_create() is never called in atomic context. > > The call chain ending up at dn_route_init() is: Sorry, I don't think there is any relationship between the following call chain with dn_route_init(). > [1] tipc_mon_create() <-

Re: [PATCH v3] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-11 Thread Ying Xue
hich can sleep and improve the possibility of successful allocation. > > This is found by a static analysis tool named DCNS written by myself. > And I also manually check it. > > Signed-off-by: Jia-Ju Bai <baijiaju1...@gmail.com> Acked-by: Ying Xue <ying@windrive

Re: [PATCH v3] net: tipc: Replace GFP_ATOMIC with GFP_KERNEL in tipc_mon_create

2018-04-11 Thread Ying Xue
hich can sleep and improve the possibility of successful allocation. > > This is found by a static analysis tool named DCNS written by myself. > And I also manually check it. > > Signed-off-by: Jia-Ju Bai Acked-by: Ying Xue > --- > v2: > * Modify the description of GFP_AT

Re: [PATCH] tipc: bcast: use true and false for boolean values

2018-03-05 Thread Ying Xue
On 03/06/2018 05:56 AM, Gustavo A. R. Silva wrote: > Assign true or false to boolean variables instead of an integer value. > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> Acked-by: Ying Xue &l

Re: [PATCH] tipc: bcast: use true and false for boolean values

2018-03-05 Thread Ying Xue
On 03/06/2018 05:56 AM, Gustavo A. R. Silva wrote: > Assign true or false to boolean variables instead of an integer value. > > This issue was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva Acked-by: Ying Xue > --- > net/tipc/bcast.c | 2 +-

Re: [PATCH 8/8] net: tipc: remove unused hardirq.h

2017-12-07 Thread Ying Xue
> Cc: Jon Maloy <jon.ma...@ericsson.com> > Cc: Ying Xue <ying@windriver.com> > Cc: "David S. Miller" <da...@davemloft.net> Tested-by: Ying Xue <ying@windriver.com> Acked-by: Ying Xue <ying@windriver.com> > --- > net/tipc/core.h | 1

Re: [PATCH 8/8] net: tipc: remove unused hardirq.h

2017-12-07 Thread Ying Xue
On 11/18/2017 07:02 AM, Yang Shi wrote: > Preempt counter APIs have been split out, currently, hardirq.h just > includes irq_enter/exit APIs which are not used by TIPC at all. > > So, remove the unused hardirq.h. > > Signed-off-by: Yang Shi > Cc: Jon Maloy > Cc:

Re: [PATCH net v2] tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv()

2017-12-01 Thread Ying Xue
On 11/30/2017 08:32 PM, Tommi Rantala wrote: >> In my opinion, the real root cause of the issue is because we too early >> set a not-yet-initialized bearer instance to ub->bearer through >> rcu_assign_pointer(ub->bearer, b) in tipc_udp_enable(). Instead if we >> assign the bearer pointer at the

Re: [PATCH net v2] tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv()

2017-12-01 Thread Ying Xue
On 11/30/2017 08:32 PM, Tommi Rantala wrote: >> In my opinion, the real root cause of the issue is because we too early >> set a not-yet-initialized bearer instance to ub->bearer through >> rcu_assign_pointer(ub->bearer, b) in tipc_udp_enable(). Instead if we >> assign the bearer pointer at the

Re: [PATCH net v2] tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv()

2017-11-30 Thread Ying Xue
On 11/29/2017 06:48 PM, Tommi Rantala wrote: > Remove the second tipc_rcv() call in tipc_udp_recv(). We have just > checked that the bearer is not up, and calling tipc_rcv() with a bearer > that is not up leads to a TIPC div-by-zero crash in > tipc_node_calculate_timer(). The crash is rare in

Re: [PATCH net v2] tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv()

2017-11-30 Thread Ying Xue
On 11/29/2017 06:48 PM, Tommi Rantala wrote: > Remove the second tipc_rcv() call in tipc_udp_recv(). We have just > checked that the bearer is not up, and calling tipc_rcv() with a bearer > that is not up leads to a TIPC div-by-zero crash in > tipc_node_calculate_timer(). The crash is rare in

Re: [PATCH V2] tipc: Use bsearch library function

2017-09-16 Thread Ying Xue
On 09/16/2017 05:58 PM, Joe Perches wrote: > On Sat, 2017-09-16 at 17:36 +0800, Ying Xue wrote: >> On 09/16/2017 05:26 PM, Joe Perches wrote: >>> On Sat, 2017-09-16 at 17:02 +0800, Ying Xue wrote: >>>> On 09/16/2017 03:50 PM, Thomas Meyer wrote: >>>>

Re: [PATCH V2] tipc: Use bsearch library function

2017-09-16 Thread Ying Xue
On 09/16/2017 05:58 PM, Joe Perches wrote: > On Sat, 2017-09-16 at 17:36 +0800, Ying Xue wrote: >> On 09/16/2017 05:26 PM, Joe Perches wrote: >>> On Sat, 2017-09-16 at 17:02 +0800, Ying Xue wrote: >>>> On 09/16/2017 03:50 PM, Thomas Meyer wrote: >>>>

Re: [PATCH V2] tipc: Use bsearch library function

2017-09-16 Thread Ying Xue
On 09/16/2017 05:26 PM, Joe Perches wrote: > On Sat, 2017-09-16 at 17:02 +0800, Ying Xue wrote: >> On 09/16/2017 03:50 PM, Thomas Meyer wrote: >>> Use common library function rather than explicitly coding >>> some variant of it yourself. >>> >>>

Re: [PATCH V2] tipc: Use bsearch library function

2017-09-16 Thread Ying Xue
On 09/16/2017 05:26 PM, Joe Perches wrote: > On Sat, 2017-09-16 at 17:02 +0800, Ying Xue wrote: >> On 09/16/2017 03:50 PM, Thomas Meyer wrote: >>> Use common library function rather than explicitly coding >>> some variant of it yourself. >>> >>> Sign

Re: [PATCH V2] tipc: Use bsearch library function

2017-09-16 Thread Ying Xue
On 09/16/2017 03:50 PM, Thomas Meyer wrote: > Use common library function rather than explicitly coding > some variant of it yourself. > > Signed-off-by: Thomas Meyer <tho...@m3y3r.de> Acked-by: Ying Xue <ying@windriver.com> > --- &g

Re: [PATCH V2] tipc: Use bsearch library function

2017-09-16 Thread Ying Xue
On 09/16/2017 03:50 PM, Thomas Meyer wrote: > Use common library function rather than explicitly coding > some variant of it yourself. > > Signed-off-by: Thomas Meyer Acked-by: Ying Xue > --- > net/tipc/name_table.c | 30 +++--- > 1 file changed,

Re: [PATCH net v3] tipc: check minimum bearer MTU

2016-12-02 Thread Ying Xue
MTU. UDP case also needs a check to avoid overflow when calculating bearer MTU. Fixes: b97bf3fd8f6a ("[TIPC] Initial merge") Signed-off-by: Michal Kubecek <mkube...@suse.cz> Reported-by: Qian Zhang (张谦) <zhangqia...@360.cn> --- Thanks, it looks nice to me. Ac

Re: [PATCH net v3] tipc: check minimum bearer MTU

2016-12-02 Thread Ying Xue
MTU. UDP case also needs a check to avoid overflow when calculating bearer MTU. Fixes: b97bf3fd8f6a ("[TIPC] Initial merge") Signed-off-by: Michal Kubecek Reported-by: Qian Zhang (张谦) --- Thanks, it looks nice to me. Acked-by: Ying Xue

Re: [PATCH net] tipc: check minimum bearer MTU

2016-12-01 Thread Ying Xue
For UDP bearer, it seems insufficient for us to check MTU size only when UDP bearer is enabled. Meanwhile, we should update MTU size for UDP bearer with Path MTU discovery protocol once MTU size is changed after bearer is enabled. I should admit I'm not that familiar with tipc. Do you mean

Re: [PATCH net] tipc: check minimum bearer MTU

2016-12-01 Thread Ying Xue
For UDP bearer, it seems insufficient for us to check MTU size only when UDP bearer is enabled. Meanwhile, we should update MTU size for UDP bearer with Path MTU discovery protocol once MTU size is changed after bearer is enabled. I should admit I'm not that familiar with tipc. Do you mean

Re: [PATCH net] tipc: check minimum bearer MTU

2016-11-30 Thread Ying Xue
On 11/30/2016 05:57 PM, Michal Kubecek wrote: Qian Zhang (张谦) reported a potential socket buffer overflow in tipc_msg_build() which is also known as CVE-2016-8632: due to insufficient checks, a buffer overflow can occur if MTU is too short for even tipc headers. As anyone can set device MTU in a

Re: [PATCH net] tipc: check minimum bearer MTU

2016-11-30 Thread Ying Xue
On 11/30/2016 05:57 PM, Michal Kubecek wrote: Qian Zhang (张谦) reported a potential socket buffer overflow in tipc_msg_build() which is also known as CVE-2016-8632: due to insufficient checks, a buffer overflow can occur if MTU is too short for even tipc headers. As anyone can set device MTU in a

Re: [PATCH] tipc: Use kmemdup instead of kmalloc and memcpy

2016-06-27 Thread Ying Xue
gt; - to = \(kmalloc\|kzalloc\)(size,flag); > + to = kmemdup(from,size,flag); >if (to==NULL || ...) S > - memcpy(to, from, size); > > Signed-off-by: Amitoj Kaur Chawla <amitoj1...@gmail.com> Acked-by: Ying Xue <ying@windriver.com> > --- > net/tipc/

Re: [PATCH] tipc: Use kmemdup instead of kmalloc and memcpy

2016-06-27 Thread Ying Xue
gt; - to = \(kmalloc\|kzalloc\)(size,flag); > + to = kmemdup(from,size,flag); >if (to==NULL || ...) S > - memcpy(to, from, size); > > Signed-off-by: Amitoj Kaur Chawla Acked-by: Ying Xue > --- > net/tipc/server.c | 3 +-- > 1 file changed, 1 insertion(+), 2 delet

Re: [PATCH 27/31] net/tipc: use kmemdup rather than duplicating its implementation

2015-09-16 Thread Ying Xue
On 08/07/2015 03:59 PM, Andrzej Hajda wrote: > The patch was generated using fixed coccinelle semantic patch > scripts/coccinelle/api/memdup.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 > > Signed-off-by: Andrzej Hajda Reviewed-by: Ying Xue

Re: [PATCH 27/31] net/tipc: use kmemdup rather than duplicating its implementation

2015-09-16 Thread Ying Xue
On 08/07/2015 03:59 PM, Andrzej Hajda wrote: > The patch was generated using fixed coccinelle semantic patch > scripts/coccinelle/api/memdup.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2014320 > > Signed-off-by: Andrzej Hajda <a.ha...@samsung.com>

Re: [PATCH] net: tipc: fix stall during bclink wakeup procedure

2015-09-06 Thread Ying Xue
when a congestion on broadcast link occurs. > For example, when there are only 8 nodes it works fine since congestion > doesn't occur. Send queue limit is 40 in my case (I use a critical importance > level) and when 64 nodes send a message at the same moment a congestion > oc

Re: [PATCH] net: tipc: fix stall during bclink wakeup procedure

2015-09-06 Thread Ying Xue
> The issue is reproducible only when a congestion on broadcast link occurs. > For example, when there are only 8 nodes it works fine since congestion > doesn't occur. Send queue limit is 40 in my case (I use a critical importance > level) and when 64 nodes send a message at the sam

Re: [PATCH] tipc:Make the function tipc_buf_append have a return type of bool

2015-06-17 Thread Ying Xue
On 06/18/2015 10:44 AM, Nicholas Krause wrote: > This converts the function tipc_buf_append now due to this > particular function only returning either one or zero as > its return value. > > Signed-off-by: Nicholas Krause Acked-by: Ying Xue > --- > net/tipc/msg.c | 1

Re: [PATCH] tipc:Make the function tipc_buf_append have a return type of bool

2015-06-17 Thread Ying Xue
On 06/18/2015 10:44 AM, Nicholas Krause wrote: This converts the function tipc_buf_append now due to this particular function only returning either one or zero as its return value. Signed-off-by: Nicholas Krause xerofo...@gmail.com Acked-by: Ying Xue ying@windriver.com --- net/tipc

[PATCH v2] rculist: Fix another sparse warning

2015-03-25 Thread Ying Xue
address spaces) To silence these spare complaints, an RCU annotation should be added to "next" pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_from_rcu(). Signed-off-by: Ying Xue --- Changes: - Replace rcu_dere

Re: [PATCH] rculist: Fix another sparse warning

2015-03-25 Thread Ying Xue
On 03/25/2015 09:49 PM, Paul E. McKenney wrote: > On Wed, Mar 25, 2015 at 12:43:38PM +0800, Ying Xue wrote: >> This fixes the following sparse warnings: >> >> make C=1 CF=-D__CHECK_ENDIAN__ net/tipc/name_table.o >> net/tipc/name_table.c:977:17: error: incom

Re: [PATCH] rculist: Fix another sparse warning

2015-03-25 Thread Ying Xue
On 03/25/2015 09:49 PM, Paul E. McKenney wrote: On Wed, Mar 25, 2015 at 12:43:38PM +0800, Ying Xue wrote: This fixes the following sparse warnings: make C=1 CF=-D__CHECK_ENDIAN__ net/tipc/name_table.o net/tipc/name_table.c:977:17: error: incompatible types in comparison expression

[PATCH v2] rculist: Fix another sparse warning

2015-03-25 Thread Ying Xue
address spaces) To silence these spare complaints, an RCU annotation should be added to next pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_from_rcu(). Signed-off-by: Ying Xue ying@windriver.com --- Changes: - Replace

[PATCH] rculist: Fix another sparse warning

2015-03-24 Thread Ying Xue
address spaces) To silence these spare complaints, an RCU annotation should be added to "next" pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_from_rcu(). Signed-off-by: Ying Xue --- include/linux/rculist.h |4 ++

Re: [PATCH] tipc: validate length of sockaddr in connect() for dgram/rdm

2015-03-24 Thread Ying Xue
f8036 ("tipc: add support for connect() on dgram/rdm sockets") > Signed-off-by: Sasha Levin Acked-by: Ying Xue > --- > net/tipc/socket.c |2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/tipc/socket.c b/net/tipc/socket.c > index 73c2f51..986dc96 10

[PATCH] rculist: Fix another sparse warning

2015-03-24 Thread Ying Xue
address spaces) To silence these spare complaints, an RCU annotation should be added to next pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_from_rcu(). Signed-off-by: Ying Xue ying@windriver.com --- include/linux/rculist.h

Re: [PATCH] tipc: validate length of sockaddr in connect() for dgram/rdm

2015-03-24 Thread Ying Xue
() on dgram/rdm sockets) Signed-off-by: Sasha Levin sasha.le...@oracle.com Acked-by: Ying Xue ying@windriver.com --- net/tipc/socket.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 73c2f51..986dc96 100644 --- a/net/tipc/socket.c

Re: Fwd: [rhashtable] WARNING: CPU: 0 PID: 10 at kernel/locking/mutex.c:570 mutex_lock_nested()

2015-01-12 Thread Ying Xue
On 01/12/2015 08:42 PM, Thomas Graf wrote: > On 01/12/15 at 09:38am, Ying Xue wrote: >> Hi Thomas, >> >> I am really unable to see where is wrong leading to below warning >> complaints. Can you please help me check it? > > Not sure yet. It's not your patch

Re: Fwd: [rhashtable] WARNING: CPU: 0 PID: 10 at kernel/locking/mutex.c:570 mutex_lock_nested()

2015-01-12 Thread Ying Xue
On 01/12/2015 08:42 PM, Thomas Graf wrote: On 01/12/15 at 09:38am, Ying Xue wrote: Hi Thomas, I am really unable to see where is wrong leading to below warning complaints. Can you please help me check it? Not sure yet. It's not your patch that introduced the issue though. It merely

Fwd: [rhashtable] WARNING: CPU: 0 PID: 10 at kernel/locking/mutex.c:570 mutex_lock_nested()

2015-01-11 Thread Ying Xue
() Date: Sat, 10 Jan 2015 11:48:03 -0800 From: Fengguang Wu To: Ying Xue CC: LKP , linux-kernel@vger.kernel.org Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is commit 54c5b7d311c8e1801f9dcce9f388a7420a25fa90 Author: Ying Xue AuthorDate: Wed Jan 7 13:41:53

Fwd: [rhashtable] WARNING: CPU: 0 PID: 10 at kernel/locking/mutex.c:570 mutex_lock_nested()

2015-01-11 Thread Ying Xue
() Date: Sat, 10 Jan 2015 11:48:03 -0800 From: Fengguang Wu fengguang...@intel.com To: Ying Xue ying@windriver.com CC: LKP l...@01.org, linux-kernel@vger.kernel.org Greetings, 0day kernel testing robot got the below dmesg and the first bad commit is commit 54c5b7d311c8e1801f9dcce9f388a7420a25fa90

Re: [PATCH 1/1 net-next] tipc: replace 0 by NULL for pointers

2014-12-25 Thread Ying Xue
On 12/25/2014 07:05 PM, Fabian Frederick wrote: > Fix sparse warning: > net/tipc/link.c:1924:40: warning: Using plain integer as NULL pointer > > Signed-off-by: Fabian Frederick > --- Acked-by: Ying Xue > net/tipc/link.c | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH 1/1 net-next] tipc: replace 0 by NULL for pointers

2014-12-25 Thread Ying Xue
On 12/25/2014 07:05 PM, Fabian Frederick wrote: Fix sparse warning: net/tipc/link.c:1924:40: warning: Using plain integer as NULL pointer Signed-off-by: Fabian Frederick f...@skynet.be --- Acked-by: Ying Xue ying@windriver.com net/tipc/link.c | 2 +- 1 file changed, 1 insertion

[PATCH] rculist: fix sparse warning

2014-12-11 Thread Ying Xue
be added to "next" pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_continue_rcu_bh(). By the way, this commit also resolves the same error appearing in hlist_for_each_entry_continue_rcu(). Signed-off-by: Ying Xue ---

[PATCH] rculist: fix sparse warning

2014-12-11 Thread Ying Xue
be added to next pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_continue_rcu_bh(). By the way, this commit also resolves the same error appearing in hlist_for_each_entry_continue_rcu(). Signed-off-by: Ying Xue ying@windriver.com

Re: [PATCH net-next RESEND 2/2] ipv6: fix sparse warning

2014-12-10 Thread Ying Xue
On 12/11/2014 12:04 AM, Paul E. McKenney wrote: > On Wed, Dec 10, 2014 at 04:46:07PM +0800, Ying Xue wrote: >> This fixes the following spare warning when using >> >> make C=1 CF=-D__CHECK_ENDIAN__ net/ipv6/addrconf.o >> net/ipv6/addrconf.c:3495:9: error: incom

[PATCH net-next RESEND 2/2] ipv6: fix sparse warning

2014-12-10 Thread Ying Xue
to "next" pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_continue_rcu_bh(). By the way, this commit also resolves the same error appearing in hlist_for_each_entry_continue_rcu(). Signed-off-by: Ying Xue --- inc

[PATCH net-next RESEND 0/2] fix rculist sparse errors

2014-12-10 Thread Ying Xue
__rcu annotation will be added to the pointer. As a consequence, sparse warning is eliminated too. The similar errors also appear in hlist_for_each_entry_continue_rcu() and hlist_for_each_entry_from_rcu(). In this version, CC more people like Paul E. McKenney and lkml mail list. Ying Xue (2): tipc: fi

[PATCH net-next RESEND 1/2] tipc: fix RCU sparse error

2014-12-10 Thread Ying Xue
erating over a hlist with hlist_for_each_entry_from_rcu(). By the way, this commit also simplifies the way of dereferencing the first element of a hlist_head list by replacing hlist_for_each_entry_rcu() with hlist_entry_safe(). Reported-by: Kbuild test robot Cc: Kbuild test robot Signed-off-by: Ying Xue --- inc

[PATCH net-next RESEND 0/2] fix rculist sparse errors

2014-12-10 Thread Ying Xue
to the pointer. As a consequence, sparse warning is eliminated too. The similar errors also appear in hlist_for_each_entry_continue_rcu() and hlist_for_each_entry_from_rcu(). In this version, CC more people like Paul E. McKenney and lkml mail list. Ying Xue (2): tipc: fix RCU sparse error ipv6: fix sparse

[PATCH net-next RESEND 1/2] tipc: fix RCU sparse error

2014-12-10 Thread Ying Xue
with hlist_for_each_entry_from_rcu(). By the way, this commit also simplifies the way of dereferencing the first element of a hlist_head list by replacing hlist_for_each_entry_rcu() with hlist_entry_safe(). Reported-by: Kbuild test robot kbuild-...@01.org Cc: Kbuild test robot kbuild-...@01.org Signed-off-by: Ying Xue ying

[PATCH net-next RESEND 2/2] ipv6: fix sparse warning

2014-12-10 Thread Ying Xue
to next pointer of hlist_node structure through hlist_next_rcu() macro when iterating over a hlist with hlist_for_each_entry_continue_rcu_bh(). By the way, this commit also resolves the same error appearing in hlist_for_each_entry_continue_rcu(). Signed-off-by: Ying Xue ying@windriver.com

Re: [PATCH net-next RESEND 2/2] ipv6: fix sparse warning

2014-12-10 Thread Ying Xue
On 12/11/2014 12:04 AM, Paul E. McKenney wrote: On Wed, Dec 10, 2014 at 04:46:07PM +0800, Ying Xue wrote: This fixes the following spare warning when using make C=1 CF=-D__CHECK_ENDIAN__ net/ipv6/addrconf.o net/ipv6/addrconf.c:3495:9: error: incompatible types in comparison expression

[PATCH] acct: eliminate compile warning

2014-08-20 Thread Ying Xue
If ACCT_VERSION is not defined to 3, below warning appears: CC kernel/acct.o kernel/acct.c: In function ‘do_acct_process’: kernel/acct.c:475:24: warning: unused variable ‘ns’ [-Wunused-variable] Signed-off-by: Ying Xue --- kernel/acct.c |6 +++--- 1 file changed, 3 insertions

[PATCH] acct: eliminate compile warning

2014-08-20 Thread Ying Xue
If ACCT_VERSION is not defined to 3, below warning appears: CC kernel/acct.o kernel/acct.c: In function ‘do_acct_process’: kernel/acct.c:475:24: warning: unused variable ‘ns’ [-Wunused-variable] Signed-off-by: Ying Xue ying@windriver.com --- kernel/acct.c |6 +++--- 1 file

[PATCH net-next v2 05/10] decnet: use __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
() netlink_rcv_skb() dn_cache_getroute() rtnl_unlock() Signed-off-by: Ying Xue --- net/decnet/dn_route.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index ad2efa5..ce0cbbf 100644 --- a/net/decnet/dn_route.c +++ b

[PATCH net-next v2 09/10] can: use __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
As cgw_create_job() is always under rtnl_lock protection, __dev_get_by_index() instead of dev_get_by_index() should be used to find interface handler in it having us avoid to change interface reference counter. Cc: Oliver Hartkopp Signed-off-by: Ying Xue Acked-by: Oliver Hartkopp --- net/can

[PATCH net-next v2 01/10] Drivers: Staging: cxt1e1: use __dev_get_name instead of dev_get_name to find interfaces

2014-01-14 Thread Ying Xue
() dev_ifsioc() c4_ioctl() do_reset() do_del_chan() rtnl_unlock() Signed-off-by: Ying Xue --- drivers/staging/cxt1e1/linux.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c index 9b48373

[PATCH net-next v2 08/10] caif: __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
. __dev_open() chnl_net_open() Cc: Dmitry Tarnyagin Signed-off-by: Ying Xue --- net/caif/chnl_net.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 7344a8f..4589ff67 100644 --- a/net/caif/chnl_net.c +++ b/net/caif/chnl_net.c

[PATCH net-next v2 03/10] eql: use __dev_get_by_name instead of dev_get_by_name to find interface

2014-01-14 Thread Ying Xue
are no found. Signed-off-by: Ying Xue --- drivers/net/eql.c | 95 +++-- 1 file changed, 42 insertions(+), 53 deletions(-) diff --git a/drivers/net/eql.c b/drivers/net/eql.c index f219d38..7a79b60 100644 --- a/drivers/net/eql.c +++ b/drivers/net/eql.c

[PATCH net-next v2 02/10] bonding: use __dev_get_by_name instead of dev_get_by_name to find interface

2014-01-14 Thread Ying Xue
() bond_do_ioctl() rtnl_unlock() Additionally we also change the coding style in bond_do_ioctl(), letting it more readable for us. Cc: Jay Vosburgh Cc: Veaceslav Falico Signed-off-by: Ying Xue Acked-by: Veaceslav Falico --- drivers/net/bonding/bond_main.c | 49

[PATCH net-next v2 06/10] vxlan: use __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
() rtnl_fdb_add() vxlan_fdb_add() vxlan_fdb_parse() rtnl_unlock() rtnetlink_rcv() rtnl_lock() netlink_rcv_skb() rtnl_fdb_del() vxlan_fdb_del() vxlan_fdb_parse() rtnl_unlock() Cc: Stephen Hemminger Signed-off-by: Ying Xue Acked-by: Stephen Hemminger

[PATCH net-next v2 07/10] batman-adv: use __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
interface reference counter. call_netdevice_notifier() batadv_hard_if_event() batadv_hardif_add_interface() batadv_is_valid_iface() batadv_is_on_batman_iface() Cc: Antonio Quartulli Signed-off-by: Ying Xue Acked-by: Antonio Quartulli --- net/batman-adv/hard-interface.c |4

[PATCH net-next v2 04/10] dcb: use __dev_get_by_name instead of dev_get_by_name to find interface

2014-01-14 Thread Ying Xue
() dcb_doit() rtnl_unlock() Cc: John Fastabend Signed-off-by: Ying Xue --- net/dcb/dcbnl.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index 66fbe19..5536444 100644 --- a/net/dcb/dcbnl.c +++ b/net/dcb/dcbnl.c @@ -1688,21

[PATCH net-next v2 10/10] net: nl80211: __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
Signed-off-by: Ying Xue --- net/wireless/nl80211.c | 102 ++-- 1 file changed, 37 insertions(+), 65 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b4f40fe..4fa555e 100644 --- a/net/wireless/nl80211.c +++ b/net

[PATCH net-next v2 00/10] use appropriate APIs to get interfaces

2014-01-14 Thread Ying Xue
by johannes's suggestion. - Add 'Acked-by' into several patches which were acknowledged by corresponding maintainers. Ying Xue (10): Drivers: Staging: cxt1e1: use __dev_get_name instead of dev_get_name to find interfaces bonding: use __dev_get_by_name instead of dev_get_by_name to find

Re: [PATCH net-next 10/10] net: nl80211: __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
On 01/14/2014 08:11 PM, Johannes Berg wrote: > On Tue, 2014-01-14 at 15:41 +0800, Ying Xue wrote: > >> @@ -2218,10 +2194,6 @@ static int nl80211_set_wiphy(struct sk_buff *skb, >> struct genl_info *info) >> rdev->wiphy.coverage

Re: [PATCH net-next 10/10] net: nl80211: __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
On 01/14/2014 08:11 PM, Johannes Berg wrote: On Tue, 2014-01-14 at 15:41 +0800, Ying Xue wrote: @@ -2218,10 +2194,6 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) rdev-wiphy.coverage_class = old_coverage_class

[PATCH net-next v2 00/10] use appropriate APIs to get interfaces

2014-01-14 Thread Ying Xue
by johannes's suggestion. - Add 'Acked-by' into several patches which were acknowledged by corresponding maintainers. Ying Xue (10): Drivers: Staging: cxt1e1: use __dev_get_name instead of dev_get_name to find interfaces bonding: use __dev_get_by_name instead of dev_get_by_name to find

[PATCH net-next v2 10/10] net: nl80211: __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
johan...@sipsolutions.net Signed-off-by: Ying Xue ying@windriver.com --- net/wireless/nl80211.c | 102 ++-- 1 file changed, 37 insertions(+), 65 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b4f40fe..4fa555e 100644

[PATCH net-next v2 07/10] batman-adv: use __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
interface reference counter. call_netdevice_notifier() batadv_hard_if_event() batadv_hardif_add_interface() batadv_is_valid_iface() batadv_is_on_batman_iface() Cc: Antonio Quartulli anto...@meshcoding.com Signed-off-by: Ying Xue ying@windriver.com Acked-by: Antonio Quartulli

[PATCH net-next v2 04/10] dcb: use __dev_get_by_name instead of dev_get_by_name to find interface

2014-01-14 Thread Ying Xue
() dcb_doit() rtnl_unlock() Cc: John Fastabend john.r.fastab...@intel.com Signed-off-by: Ying Xue ying@windriver.com --- net/dcb/dcbnl.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c index 66fbe19..5536444 100644 --- a/net

[PATCH net-next v2 02/10] bonding: use __dev_get_by_name instead of dev_get_by_name to find interface

2014-01-14 Thread Ying Xue
() bond_do_ioctl() rtnl_unlock() Additionally we also change the coding style in bond_do_ioctl(), letting it more readable for us. Cc: Jay Vosburgh fu...@us.ibm.com Cc: Veaceslav Falico vfal...@redhat.com Signed-off-by: Ying Xue ying@windriver.com Acked-by: Veaceslav Falico vfal...@redhat.com

[PATCH net-next v2 06/10] vxlan: use __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
() rtnl_fdb_add() vxlan_fdb_add() vxlan_fdb_parse() rtnl_unlock() rtnetlink_rcv() rtnl_lock() netlink_rcv_skb() rtnl_fdb_del() vxlan_fdb_del() vxlan_fdb_parse() rtnl_unlock() Cc: Stephen Hemminger step...@networkplumber.org Signed-off-by: Ying Xue ying

[PATCH net-next v2 08/10] caif: __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-14 Thread Ying Xue
. __dev_open() chnl_net_open() Cc: Dmitry Tarnyagin dmitry.tarnya...@lockless.no Signed-off-by: Ying Xue ying@windriver.com --- net/caif/chnl_net.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c index 7344a8f..4589ff67 100644

[PATCH net-next v2 03/10] eql: use __dev_get_by_name instead of dev_get_by_name to find interface

2014-01-14 Thread Ying Xue
are no found. Signed-off-by: Ying Xue ying@windriver.com --- drivers/net/eql.c | 95 +++-- 1 file changed, 42 insertions(+), 53 deletions(-) diff --git a/drivers/net/eql.c b/drivers/net/eql.c index f219d38..7a79b60 100644 --- a/drivers/net/eql.c

  1   2   >