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

2020-11-13 Thread Ying Xue
rer.c:141:2: warning: '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 > --- > ne

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
90 net/tipc/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

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 check

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 issu

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

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

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

2019-05-22 Thread Ying Xue
: In function 'test': > test.c::161:10: note: > '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

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

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

2018-10-11 Thread Ying Xue
and then move the buffers of the temporary list to l->inputq queue, which is also safe 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

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 mm/km

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() <- tipc_enable_bearer

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

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 pract

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. >>> >>> 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 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
evice 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 upda

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 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] net: tipc: fix stall during bclink wakeup procedure

2015-09-06 Thread Ying Xue
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 same moment a congestio

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

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

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

[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
2f8036 ("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..986dc

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

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

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

[PATCH] rculist: fix sparse warning

2014-12-11 Thread Ying Xue
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 --- The

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
nnotation 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
ng 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] 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 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
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
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_

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

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

2014-01-13 Thread Ying Xue
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 04/10] dcb: use __dev_get_by_name instead of dev_get_by_name to find interface

2014-01-13 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 07/10] batman-adv: use __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-13 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 --- net/batman-adv/hard-interface.c |4 +--- 1 file changed, 1

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

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

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

2014-01-13 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 --- drivers/net/vxlan.c |3

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

2014-01-13 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 09/10] can: use __dev_get_by_index instead of dev_get_by_index to find interface

2014-01-13 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 --- net/can/gw.c | 15

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

2014-01-13 Thread Ying Xue
Signed-off-by: Ying Xue --- net/wireless/nl80211.c | 100 +--- 1 file changed, 36 insertions(+), 64 deletions(-) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index b4f40fe..0d4d7fd 100644 --- a/net/wireless/nl80211.c +++ b/net

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

2014-01-13 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 --- drivers/net/bonding/bond_main.c | 49 ++- 1 file changed, 23

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

2014-01-13 Thread Ying Xue
Under rtnl_lock protection, we should use __dev_get_name/index() rather than dev_get_name()/index() to find interface handlers because the former interfaces can help us avoid to change interface reference counter. Ying Xue (10): Drivers: Staging: cxt1e1: use __dev_get_name instead of

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

2014-01-13 Thread Ying Xue
() dev_ifsioc() c4_ioctl() do_reset() do_del_chan() 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..4a08e16 100644

[PATCH] drm/i915: silence compiler warning

2014-01-07 Thread Ying Xue
drivers/gpu/drm/i915/i915_debugfs.c: In function ‘display_crc_ctl_write’: drivers/gpu/drm/i915/i915_debugfs.c:2393:2: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized] drivers/gpu/drm/i915/i915_debugfs.c:2350:6: note: ‘val’ was declared here Signed-off-by: Ying Xue

[PATCH] atm: idt77252: fix dev refcnt leak

2013-11-19 Thread Ying Xue
init_card() calls dev_get_by_name() to get a network deceive. But it doesn't decrease network device reference count after the device is used. Signed-off-by: Ying Xue --- drivers/atm/idt77252.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/atm/idt7725

Re: [TIPC] BUG: unable to handle kernel NULL pointer dereference at 00000014

2013-06-02 Thread Ying Xue
s we will free one unallocated memory area. Thus, oops occurs. I will fix it in next review version. Regards, Ying On 06/01/2013 06:26 PM, Fengguang Wu wrote: > Greetings, > > I got the below dmesg and the first bad commit is > > commit 0fb0040ed697d2b0fbd484042cdebbe76d29a840

[PATCH] ntp: Eliminate compile warning of unused variable flags

2013-06-02 Thread Ying Xue
kernel/time/ntp.c: In function ‘__hardpps’: kernel/time/ntp.c:877:16: warning: unused variable ‘flags’ [-Wunused-variable] Signed-off-by: Ying Xue --- kernel/time/ntp.c |1 - 1 file changed, 1 deletion(-) diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 12ff13a..8f5b3b9 100644

Re: [PATCH] ntp: Move do_adjtimex() and hardpps() functions to timekeeping.c

2013-06-02 Thread Ying Xue
Sorry, please ignore the patch as I send out wrong patch. Regards, Ying On 06/03/2013 10:18 AM, Ying Xue wrote: > From: John Stultz > > In preparation for changing the ntp locking rules, move > do_adjtimex and hardpps accessor functions to timekeeping.c, > but keep the code

[PATCH] ntp: Move do_adjtimex() and hardpps() functions to timekeeping.c

2013-06-02 Thread Ying Xue
From: John Stultz In preparation for changing the ntp locking rules, move do_adjtimex and hardpps accessor functions to timekeeping.c, but keep the code logic in ntp.c. This patch also introduces a ntp_internal.h file so timekeeping specific interfaces of ntp.c can be more limitedly shared with

[PATCH] MAINTAINERS: update path for drm tegra driver

2013-05-30 Thread Ying Xue
Since 4231c6b01af9f0f3eeca4b8d0d87125d78233b41 commit, drm tegra driver was moved to host1x, however, its correspding entry in MAINTAINERS is not updated in time. Signed-off-by: Ying Xue --- MAINTAINERS |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b

[tip:sched/core] sched/rt: Avoid updating RT entry timeout twice within one tick period

2013-01-25 Thread tip-bot for Ying Xue
Commit-ID: 57d2aa00dcec67afa52478730f2b524521af14fb Gitweb: http://git.kernel.org/tip/57d2aa00dcec67afa52478730f2b524521af14fb Author: Ying Xue AuthorDate: Tue, 17 Jul 2012 15:03:43 +0800 Committer: Ingo Molnar CommitDate: Fri, 25 Jan 2013 08:31:54 +0100 sched/rt: Avoid updating RT

[PATCH] iscsi: Don't disable BH on BH context

2012-08-20 Thread Ying Xue
Since we have already in BH context when iscsi_sw_tcp_write_space() is called, it's unnecessary to disable BH. Signed-off-by: Ying Xue --- drivers/scsi/iscsi_tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c

[PATCH] dlm: cleanup send_to_sock routine

2012-08-12 Thread Ying Xue
Remove unnecessary code form send_to_sock routine. Signed-off-by: Ying Xue --- fs/dlm/lowcomms.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 5c1b0e3..f8eefe2 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c

[PATCH] dlm: convert add_sock routine return value type to void

2012-08-09 Thread Ying Xue
Since add_sock() always returns a success code - 0, its return value type should be changed from integer to void. Signed-off-by: Ying Xue --- fs/dlm/lowcomms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index e7b0ac0..8789309

[PATCH] dlm: remove redundant variable assignments

2012-08-09 Thread Ying Xue
From: Xue Ying Once the tcp_create_listen_sock() is returned successfully, we will invoke add_sock() immediately. In add_sock(), the 'con' variable is assigned to 'sk_user_data', meanwhile, the 'sock' is also set to 'con->sock'. So it's unnecessary to do the same thing in tcp_create_listen_sock()

[PATCH] USB: ftdi_sio: Quiet sparse noise about using plain integer was NULL pointer

2012-08-06 Thread Ying Xue
Pointers should not be compared to plain integers. Quiets the sparse warning: warning: Using plain integer as NULL pointer Signed-off-by: Ying Xue --- drivers/usb/serial/ftdi_sio.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers

[PATCH] sched/rt: Avoid updating RT entry timeout twice within one tick period

2012-07-17 Thread Ying Xue
As long as the RT task's jiffies is different with the global jiffies value, we allow its timeout to be updated. Signed-off-by: Ying Xue Signed-off-by: Fan Du Reviewed-by: Yong Zhang --- include/linux/sched.h |1 + kernel/sched/rt.c |6 +- 2 files changed, 6 insertions(

[PATCH] sched: Fix spacing issues in coding style

2012-07-12 Thread Ying Xue
Delete redudant spaces between type name and data name or operators. Signed-off-by: Ying Xue --- kernel/sched/cpupri.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/sched/cpupri.c b/kernel/sched/cpupri.c index d72586f..23aa789 100644 --- a/kernel/sched