summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSrinivasarao P <spathi@codeaurora.org>2018-11-28 11:42:49 +0530
committerSrinivasarao P <spathi@codeaurora.org>2018-11-28 11:43:50 +0530
commit0a858409d5cd7283b8720d989bd2dba3f9353a6c (patch)
tree6eb6fa078ff6630011688a9b57b6059e80f00401 /net
parentf96a043350c0f9490ec98b48aecfcd6a8c477a98 (diff)
parentf34ff9e87b0564bd2ac1f3611d40313e80d20224 (diff)
Merge android-4.4.165 (f34ff9e) into msm-4.4
* refs/heads/tmp-f34ff9e Linux 4.4.165 xhci: Fix USB3 NULL pointer dereference at logical disconnect. HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges new helper: uaccess_kernel() ACPI / platform: Add SMB0001 HID to forbidden_id_list drivers/misc/sgi-gru: fix Spectre v1 vulnerability USB: misc: appledisplay: add 20" Apple Cinema Display misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB USB: quirks: Add no-lpm quirk for Raydium touchscreens usb: cdc-acm: add entry for Hiro (Conexant) modem uio: Fix an Oops on load media: v4l: event: Add subscription to list before calling "add" operation Revert "Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV" Revert "media: videobuf2-core: don't call memop 'finish' when queueing" btrfs: fix pinned underflow after transaction aborted gfs2: Put bitmap buffers in put_super SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() zram: close udev startup race condition as default groups lib/raid6: Fix arm64 test build hwmon: (ibmpowernv) Remove bogus __init annotations netfilter: xt_IDLETIMER: add sysfs filename checking routine netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment() s390/mm: Fix ERROR: "__node_distance" undefined! netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net s390/vdso: add missing FORCE to build targets arm64: percpu: Initialize ret in the default case platform/x86: acerhdf: Add BIOS entry for Gateway LT31 v1.3307 clk: samsung: exynos5420: Enable PERIS clocks for suspend fs/exofs: fix potential memory leak in mount option parsing um: Give start_idle_thread() a return code hfsplus: prevent btree data loss on root split hfs: prevent btree data loss on root split reiserfs: propagate errors from fill_with_dentries() properly x86/build: Use cc-option to validate stack alignment parameter x86/build: Fix stack alignment for CLang x86/boot: #undef memcpy() et al in string.c x86/build: Specify stack alignment for clang x86/build: Use __cc-option for boot code compiler options kbuild: Add __cc-option macro x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility crypto, x86: aesni - fix token pasting for clang x86/kbuild: Use cc-option to enable -falign-{jumps/loops} arm64: Disable asm-operand-width warning for clang kbuild: allow to use GCC toolchain not in Clang search path kbuild: set no-integrated-as before incl. arch Makefile kbuild: clang: disable unused variable warnings only when constant kbuild: clang: remove crufty HOSTCFLAGS kbuild: clang: fix build failures with sparse check kbuild: move cc-option and cc-disable-warning after incl. arch Makefile kbuild: Set KBUILD_CFLAGS before incl. arch Makefile kbuild: fix linker feature test macros when cross compiling with Clang efi/libstub/arm64: Set -fpie when building the EFI stub efi/libstub/arm64: Force 'hidden' visibility for section markers crypto: arm64/sha - avoid non-standard inline asm tricks kbuild: clang: Disable 'address-of-packed-member' warning modules: mark __inittest/__exittest as __maybe_unused kbuild: Add support to generate LLVM assembly files kbuild: use -Oz instead of -Os when using clang kbuild, LLVMLinux: Add -Werror to cc-option to support clang kbuild: drop -Wno-unknown-warning-option from clang options kbuild: fix asm-offset generation to work with clang kbuild: consolidate redundant sed script ASM offset generation kbuild: Consolidate header generation from ASM offset information kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS kbuild: Add better clang cross build support ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths net-gro: reset skb->pkt_type in napi_reuse_skb() ip_tunnel: don't force DF when MTU is locked flow_dissector: do not dissect l4 ports for fragments Conflicts: arch/um/os-Linux/skas/process.c Change-Id: I6587d94332e204c068f7d44428a2ec1280bc3a7f Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c4
-rw-r--r--net/core/flow_dissector.c4
-rw-r--r--net/ipv4/ip_tunnel_core.c2
-rw-r--r--net/ipv6/route.c8
-rw-r--r--net/netfilter/ipset/ip_set_hash_netportnet.c8
-rw-r--r--net/netfilter/xt_IDLETIMER.c20
-rw-r--r--net/sunrpc/xdr.c2
7 files changed, 38 insertions, 10 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 18035fa4db61..4810e43501c6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4489,6 +4489,10 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
skb->vlan_tci = 0;
skb->dev = napi->dev;
skb->skb_iif = 0;
+
+ /* eth_type_trans() assumes pkt_type is PACKET_HOST */
+ skb->pkt_type = PACKET_HOST;
+
skb->encapsulation = 0;
skb_shinfo(skb)->gso_type = 0;
skb->truesize = SKB_TRUESIZE(skb_end_offset(skb));
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 1e03956b7bb7..fbb631004b43 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -516,8 +516,8 @@ ip_proto_again:
break;
}
- if (dissector_uses_key(flow_dissector,
- FLOW_DISSECTOR_KEY_PORTS)) {
+ if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_PORTS) &&
+ !(key_control->flags & FLOW_DIS_IS_FRAGMENT)) {
key_ports = skb_flow_dissector_target(flow_dissector,
FLOW_DISSECTOR_KEY_PORTS,
target_container);
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index dbda0565781c..4916d1857b75 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -71,7 +71,7 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
iph->version = 4;
iph->ihl = sizeof(struct iphdr) >> 2;
- iph->frag_off = df;
+ iph->frag_off = ip_mtu_locked(&rt->dst) ? 0 : df;
iph->protocol = proto;
iph->tos = tos;
iph->daddr = dst;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f55c7aa1db34..ac3324a8e906 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1414,8 +1414,12 @@ EXPORT_SYMBOL_GPL(ip6_update_pmtu);
void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu)
{
- ip6_update_pmtu(skb, sock_net(sk), mtu,
- sk->sk_bound_dev_if, sk->sk_mark, sk->sk_uid);
+ int oif = sk->sk_bound_dev_if;
+
+ if (!oif && skb->dev)
+ oif = l3mdev_master_ifindex(skb->dev);
+
+ ip6_update_pmtu(skb, sock_net(sk), mtu, oif, sk->sk_mark, sk->sk_uid);
}
EXPORT_SYMBOL_GPL(ip6_sk_update_pmtu);
diff --git a/net/netfilter/ipset/ip_set_hash_netportnet.c b/net/netfilter/ipset/ip_set_hash_netportnet.c
index 9a14c237830f..b259a5814965 100644
--- a/net/netfilter/ipset/ip_set_hash_netportnet.c
+++ b/net/netfilter/ipset/ip_set_hash_netportnet.c
@@ -213,13 +213,13 @@ hash_netportnet4_uadt(struct ip_set *set, struct nlattr *tb[],
if (tb[IPSET_ATTR_CIDR]) {
e.cidr[0] = nla_get_u8(tb[IPSET_ATTR_CIDR]);
- if (!e.cidr[0] || e.cidr[0] > HOST_MASK)
+ if (e.cidr[0] > HOST_MASK)
return -IPSET_ERR_INVALID_CIDR;
}
if (tb[IPSET_ATTR_CIDR2]) {
e.cidr[1] = nla_get_u8(tb[IPSET_ATTR_CIDR2]);
- if (!e.cidr[1] || e.cidr[1] > HOST_MASK)
+ if (e.cidr[1] > HOST_MASK)
return -IPSET_ERR_INVALID_CIDR;
}
@@ -492,13 +492,13 @@ hash_netportnet6_uadt(struct ip_set *set, struct nlattr *tb[],
if (tb[IPSET_ATTR_CIDR]) {
e.cidr[0] = nla_get_u8(tb[IPSET_ATTR_CIDR]);
- if (!e.cidr[0] || e.cidr[0] > HOST_MASK)
+ if (e.cidr[0] > HOST_MASK)
return -IPSET_ERR_INVALID_CIDR;
}
if (tb[IPSET_ATTR_CIDR2]) {
e.cidr[1] = nla_get_u8(tb[IPSET_ATTR_CIDR2]);
- if (!e.cidr[1] || e.cidr[1] > HOST_MASK)
+ if (e.cidr[1] > HOST_MASK)
return -IPSET_ERR_INVALID_CIDR;
}
diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c
index 4c126cd18469..b0f4f1bca61f 100644
--- a/net/netfilter/xt_IDLETIMER.c
+++ b/net/netfilter/xt_IDLETIMER.c
@@ -283,6 +283,22 @@ static int idletimer_resume(struct notifier_block *notifier,
return NOTIFY_DONE;
}
+static int idletimer_check_sysfs_name(const char *name, unsigned int size)
+{
+ int ret;
+
+ ret = xt_check_proc_name(name, size);
+ if (ret < 0)
+ return ret;
+
+ if (!strcmp(name, "power") ||
+ !strcmp(name, "subsystem") ||
+ !strcmp(name, "uevent"))
+ return -EINVAL;
+
+ return 0;
+}
+
static int idletimer_tg_create(struct idletimer_tg_info *info)
{
int ret;
@@ -293,6 +309,10 @@ static int idletimer_tg_create(struct idletimer_tg_info *info)
goto out;
}
+ ret = idletimer_check_sysfs_name(info->label, sizeof(info->label));
+ if (ret < 0)
+ goto out_free_timer;
+
sysfs_attr_init(&info->timer->attr.attr);
info->timer->attr.attr.name = kstrdup(info->label, GFP_KERNEL);
if (!info->timer->attr.attr.name) {
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index 9b8d855e4a87..ed9bbd383f7d 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -512,7 +512,7 @@ EXPORT_SYMBOL_GPL(xdr_commit_encode);
static __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr,
size_t nbytes)
{
- static __be32 *p;
+ __be32 *p;
int space_left;
int frag1bytes, frag2bytes;