[PATCH] net: ieee802154: fix net_device reference release too early

2017-05-18 Thread linzhang
net_device pointer. So i think that dev_put should be behind of the dev_queue_xmit. Also, explicit set skb->sk is needless, sock_alloc_send_skb is already set it. Signed-off-by: linzhang <xiaolou4...@gmail.com> --- net/ieee802154/socket.c | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH] net: ieee802154: fix net_device reference release too early

2017-05-18 Thread linzhang
net_device pointer. So i think that dev_put should be behind of the dev_queue_xmit. Also, explicit set skb->sk is needless, sock_alloc_send_skb is already set it. Signed-off-by: linzhang --- net/ieee802154/socket.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/

[PATCH net v3] net: x25: fix one potential use-after-free issue

2017-05-16 Thread linzhang
-by: linzhang <xiaolou4...@gmail.com> --- changelog: v1 -> v2: * make x25_register_sysctl properly return failure v2 -> v3: * keep the same lables as v1 * fix missing semicolon --- include/net/x25.h| 4 ++-- net/x25/af_x25.c | 24 -

[PATCH net v3] net: x25: fix one potential use-after-free issue

2017-05-16 Thread linzhang
-by: linzhang --- changelog: v1 -> v2: * make x25_register_sysctl properly return failure v2 -> v3: * keep the same lables as v1 * fix missing semicolon --- include/net/x25.h| 4 ++-- net/x25/af_x25.c | 24 net/x25/sysctl_net_x25.

[PATCH net v2] net: x25: fix one potential use-after-free issue

2017-05-15 Thread linzhang
-by: linzhang <xiaolou4...@gmail.com> --- include/net/x25.h| 4 ++-- net/x25/af_x25.c | 34 +- net/x25/sysctl_net_x25.c | 5 - 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/include/net/x25.h b/include/net/x25.h index c383aa4..3

[PATCH net v2] net: x25: fix one potential use-after-free issue

2017-05-15 Thread linzhang
-by: linzhang --- include/net/x25.h| 4 ++-- net/x25/af_x25.c | 34 +- net/x25/sysctl_net_x25.c | 5 - 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/include/net/x25.h b/include/net/x25.h index c383aa4..339820c 100644 --- a/include

[PATCH] net: x25: fix one potential use-after-free issue

2017-05-14 Thread linzhang
The function x25_init is not properly unregister related resources on error handler.It is will result in kernel oops if x25_init init failed, so add right unregister call on error handler. Signed-off-by: linzhang <xiaolou4...@gmail.com> --- net/x25/af_x25.c | 6 -- 1 file chan

[PATCH] net: x25: fix one potential use-after-free issue

2017-05-14 Thread linzhang
The function x25_init is not properly unregister related resources on error handler.It is will result in kernel oops if x25_init init failed, so add right unregister call on error handler. Signed-off-by: linzhang --- net/x25/af_x25.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions

[PATCH] net: socket: mark socket protocol handler structs as const

2017-05-14 Thread linzhang
Signed-off-by: linzhang <xiaolou4...@gmail.com> --- net/bluetooth/af_bluetooth.c | 2 +- net/caif/caif_socket.c | 2 +- net/kcm/kcmsock.c| 2 +- net/nfc/af_nfc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/af_bluetooth.c

[PATCH] net: socket: mark socket protocol handler structs as const

2017-05-14 Thread linzhang
Signed-off-by: linzhang --- net/bluetooth/af_bluetooth.c | 2 +- net/caif/caif_socket.c | 2 +- net/kcm/kcmsock.c| 2 +- net/nfc/af_nfc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth

[PATCH] net: netfilter: netlink: delete extra spaces

2017-05-11 Thread linzhang
This patch cleans up extra spaces. Signed-off-by: linzhang <xiaolou4...@gmail.com> --- net/netfilter/nf_conntrack_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index dcf561b..3

[PATCH] net: netfilter: netlink: delete extra spaces

2017-05-11 Thread linzhang
This patch cleans up extra spaces. Signed-off-by: linzhang --- net/netfilter/nf_conntrack_netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index dcf561b..356e6f0 100644 --- a/net