diff options
author | Kevin Hilman <khilman@linaro.org> | 2015-09-10 13:26:56 -0700 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-09-10 13:26:56 -0700 |
commit | 070565aed13c16e108f35bcedb8ad22782683735 (patch) | |
tree | 8b3de1bf2101c8c1c93822f5583c5838fef8c8cc /net/netfilter | |
parent | 829e8333fe5de8b1f43c042d213fe45358e4ee4d (diff) | |
parent | 3ac97f2411ad66f872bd0fe401ad94af5ff4d7d3 (diff) |
Merge branch 'android-3.18' of https://android.googlesource.com/kernel/common into linux-linaro-lsk-v3.18-android
* 'android-3.18' of https://android.googlesource.com/kernel/common: (26 commits)
net: fix crash in tcp_nuke_addr()
net: xt_qtaguid/xt_socket: fix refcount underflow and crash
net: fix iterating over hashtable in tcp_nuke_addr()
nf: IDLETIMER: fix lockdep warning
ANDROID: usb: gadget: create F_midi device
usb: gadget: midi: avoid redundant f_midi_set_alt() call
usb: gadget: f_midi: fix error recovery path
usb: gadget: f_midi: fix segfault when reading empty id
usb: gadget: fix misspelling of current function in string
usb: gadget: midi: f_midi_alloc() can be static
usb: gadget: f_midi: add configfs support
usb: gadget: f_midi: use usb_gstrings_attach
usb: gadget: f_midi: remove compatibility layer
usb: gadget: f_midi: convert to new function interface with backward compatibility
usb: gadget: f_midi: check kstrdup() return value
usb: gadget: f_midi: enable use of the index parameter
usb: gadget: configfs: Fix interfaces array NULL-termination
usb: gadget: Add device attribute to determine gadget state
usb: phy: fix dual role sysfs build if kernel modules are supported
ion: Handle the memory mapping correctly on x86
...
Conflicts:
drivers/usb/gadget/Kconfig
Linaro commit 0fdc146d0ee1 (HACK: usb: gadget: fix android
composite driver build) removed some Kconfig options causing
add/remove conflicts with AOSP commits adding new options.
Resolution: take both sides (removals and new additions)
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/xt_IDLETIMER.c | 1 | ||||
-rw-r--r-- | net/netfilter/xt_socket.c | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 31f76cd19d39..0975c993a94e 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c @@ -286,6 +286,7 @@ static int idletimer_tg_create(struct idletimer_tg_info *info) goto out; } + sysfs_attr_init(&info->timer->attr.attr); info->timer->attr.attr.name = kstrdup(info->label, GFP_KERNEL); if (!info->timer->attr.attr.name) { ret = -ENOMEM; diff --git a/net/netfilter/xt_socket.c b/net/netfilter/xt_socket.c index 7eb9d7d534d6..a3b25b227dfe 100644 --- a/net/netfilter/xt_socket.c +++ b/net/netfilter/xt_socket.c @@ -184,7 +184,9 @@ xt_socket_get4_sk(const struct sk_buff *skb, struct xt_action_param *par) } #endif - if (!sk) + if (sk) + atomic_inc(&sk->sk_refcnt); + else sk = xt_socket_get_sock_v4(dev_net(skb->dev), protocol, saddr, daddr, sport, dport, par->in); @@ -225,8 +227,7 @@ socket_match(const struct sk_buff *skb, struct xt_action_param *par, (sk->sk_state == TCP_TIME_WAIT && inet_twsk(sk)->tw_transparent)); - if (sk != skb->sk) - sock_gen_put(sk); + sock_gen_put(sk); if (wildcard || !transparent) sk = NULL; @@ -361,7 +362,9 @@ xt_socket_get6_sk(const struct sk_buff *skb, struct xt_action_param *par) return NULL; } - if (!sk) + if (sk) + atomic_inc(&sk->sk_refcnt); + else sk = xt_socket_get_sock_v6(dev_net(skb->dev), tproto, saddr, daddr, sport, dport, par->in); |