Linux 4.6.3
Greg KH
maintainerI'm announcing the release of the 4.6.3 kernel.
All users of the 4.6 kernel series must upgrade.
The updated 4.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.6.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/kernel/ptrace.c | 2 arch/arm64/include/asm/elf.h | 4 arch/arm64/kernel/cpuinfo.c | 8 arch/arm64/kvm/hyp/vgic-v3-sr.c | 7 arch/arm64/mm/fault.c | 2 arch/parisc/kernel/unaligned.c | 10 arch/powerpc/include/asm/reg.h | 6 arch/powerpc/kernel/prom_init.c | 1 arch/powerpc/mm/hash_utils_64.c | 22 + arch/powerpc/platforms/pseries/eeh_pseries.c | 51 ++- arch/s390/net/bpf_jit.h | 4 arch/s390/net/bpf_jit_comp.c | 4 arch/sparc/include/asm/head_64.h | 4 arch/sparc/include/asm/pgtable_64.h | 43 ++ arch/sparc/include/asm/tlbflush_64.h | 3 arch/sparc/include/asm/ttable.h | 8 arch/sparc/kernel/Makefile | 1 arch/sparc/kernel/rtrap_64.S | 57 --- arch/sparc/kernel/signal32.c | 46 ++- arch/sparc/kernel/signal_32.c | 41 +- arch/sparc/kernel/signal_64.c | 31 +- arch/sparc/kernel/sigutil_32.c | 9 arch/sparc/kernel/sigutil_64.c | 10 arch/sparc/kernel/urtt_fill.S | 98 ++++++ arch/sparc/mm/hugetlbpage.c | 33 +- arch/sparc/mm/init_64.c | 22 - arch/sparc/mm/tlb.c | 25 + arch/sparc/mm/tsb.c | 32 +- arch/x86/kernel/traps.c | 20 - arch/x86/kvm/x86.c | 5 crypto/asymmetric_keys/Kconfig | 1 drivers/crypto/ccp/ccp-crypto-aes-xts.c | 17 - drivers/gpio/gpio-bcm-kona.c | 4 drivers/gpio/gpio-zynq.c | 11 drivers/gpio/gpiolib.c | 26 + drivers/gpu/drm/drm_crtc.c | 60 +++- drivers/gpu/drm/i915/i915_irq.c | 4 drivers/net/ethernet/atheros/alx/alx.h | 4 drivers/net/ethernet/atheros/alx/main.c | 48 +++ drivers/net/ethernet/ezchip/nps_enet.c | 4 drivers/net/ethernet/marvell/mvneta_bm.c | 1 drivers/net/ethernet/rocker/rocker_ofdpa.c | 4 drivers/net/ethernet/sfc/ef10.c | 16 + drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 drivers/net/geneve.c | 10 drivers/net/macsec.c | 4 drivers/net/team/team.c | 9 drivers/net/tun.c | 6 drivers/net/vxlan.c | 7 drivers/perf/arm_pmu.c | 6 drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 5 drivers/scsi/scsi_devinfo.c | 1 drivers/scsi/scsi_lib.c | 7 fs/dcache.c | 4 fs/ecryptfs/kthread.c | 13 fs/proc/root.c | 7 include/linux/irqchip/arm-gic-v3.h | 2 include/linux/netfilter/x_tables.h | 12 include/net/switchdev.h | 2 include/uapi/linux/libc-compat.h | 2 kernel/bpf/inode.c | 3 kernel/sched/core.c | 3 kernel/trace/bpf_trace.c | 4 mm/memcontrol.c | 3 mm/swap_state.c | 5 net/bridge/br_fdb.c | 2 net/core/hwbm.c | 3 net/ipv4/af_inet.c | 8 net/ipv4/netfilter/arp_tables.c | 293 ++++++-------------- net/ipv4/netfilter/ip_tables.c | 318 +++++----------------- net/ipv4/sysctl_net_ipv4.c | 4 net/ipv4/udp.c | 2 net/ipv6/ip6_output.c | 11 net/ipv6/netfilter/ip6_tables.c | 311 +++++---------------- net/ipv6/tcp_ipv6.c | 4 net/ipv6/udp.c | 2 net/l2tp/l2tp_core.c | 2 net/netfilter/x_tables.c | 245 ++++++++++++++++ net/netlink/af_netlink.c | 7 net/switchdev/switchdev.c | 6 net/tipc/netlink_compat.c | 2 net/tipc/socket.c | 3 net/wireless/wext-core.c | 25 + sound/pci/hda/hda_intel.c | 11 sound/pci/hda/patch_realtek.c | 73 ++++- virt/kvm/arm/hyp/vgic-v2-sr.c | 7 virt/kvm/irqchip.c | 2 88 files changed, 1302 insertions(+), 967 deletions(-)
AceLan Kao (1):
ALSA: hda - Fix headset mic detection problem for Dell machine
Al Viro (1):
fix d_walk()/non-delayed __d_free() race
Andy Lutomirski (1):
x86/entry/traps: Don't force in_interrupt() to return true in IST handlers
Aneesh Kumar K.V (1):
powerpc/mm/hash: Fix the reference bit update when handling hash fault
Arnd Bergmann (1):
crypto: public_key: select CRYPTO_AKCIPHER
Ben Dooks (1):
gpio: bcm-kona: fix bcm_kona_gpio_reset() warnings
Catalin Marinas (1):
arm64: Provide "model name" in /proc/cpuinfo for PER_LINUX32 tasks
Chen Haiquan (1):
vxlan: Accept user specified MTU value when create new vxlan link
Christoffer Dall (2):
KVM: arm/arm64: vgic-v2: Clear all dirty LRs
KVM: arm/arm64: vgic-v3: Clear all dirty LRs
Daniel Borkmann (2):
bpf, inode: disallow userns mounts
bpf, trace: use READ_ONCE for retrieving file ptr
David S. Miller (3):
sparc64: Take ctx_alloc_lock properly in hugetlb_setup().
sparc: Harden signal return frame checks.
sparc64: Fix return from trap window fill crashes.
Edward Cree (1):
sfc: on MC reset, clear PIO buffer linkage in TXQs
Elad Kanfi (1):
net: nps_enet: Disable interrupts before napi reschedule
Eric W. Biederman (1):
bpf: Use mount_nodev not mount_ns to mount the bpf filesystem
Ewan D. Milne (1):
scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist
Ezequiel Garcia (1):
ipv4: Fix non-initialized TTL when CONFIG_SYSCTL=n
Feng Tang (1):
net: alx: use custom skb allocator
Florian Westphal (16):
netfilter: x_tables: don't move to non-existent next rule
netfilter: x_tables: validate targets of jumps
netfilter: x_tables: add and use xt_check_entry_offsets
netfilter: x_tables: kill check_entry helper
netfilter: x_tables: assert minimum target size
netfilter: x_tables: add compat version of xt_check_entry_offsets
netfilter: x_tables: check standard target size too
netfilter: x_tables: check for bogus target offset
netfilter: x_tables: validate all offsets and sizes in a rule
netfilter: x_tables: don't reject valid target size on some architectures
netfilter: arp_tables: simplify translate_compat_table args
netfilter: ip_tables: simplify translate_compat_table args
netfilter: ip6_tables: simplify translate_compat_table args
netfilter: x_tables: xt_compat_match_from_user doesn't need a retval
netfilter: x_tables: do compat validation via translate_table
netfilter: x_tables: introduce and use xt_copy_counters_from_user
Gerald Schaefer (1):
mm: thp: broken page count after commit aa88b68c3b1d
Greg Kroah-Hartman (2):
Revert "drm/i915: Exit cherryview_irq_handler() after one pass" Linux 4.6.3
Gregory CLEMENT (2):
net: mvneta: Fix lacking spinlock initialization
net: hwbm: Fix unbalanced spinlock in error case
Guillaume Nault (1):
l2tp: fix configuration passed to setup_udp_tunnel_sock()
Hannes Frederic Sowa (1):
udp: prevent skbs lingering in tunnel socket queues
Helge Deller (1):
parisc: Fix pagefault crash in unaligned __get_user() call
Helmut Grohne (1):
gpio: zynq: initialize clock even without CONFIG_PM
Herbert Xu (1):
netlink: Fix dump skb leak/double free
Ivan Vecera (1):
team: don't call netdev_change_features under team->lock
Jakub Sitnicki (1):
ipv6: Skip XFRM lookup if dst_entry in socket cache is valid
James Bottomley (1):
scsi_lib: correctly retry failed zero length REQ_TYPE_FS commands
Jann Horn (3):
ecryptfs: forbid opening files without mmap handler
proc: prevent stacking filesystems on top
sched: panic on corrupted stack end
Jason Wang (1):
tuntap: correctly wake up process during uninit
Jiri Pirko (1):
switchdev: pass pointer to fib_info instead of copy
Julien Grall (1):
drivers/perf: arm_pmu: Defer the setting of __oprofile_cpu_pmu
Kailang Yang (2):
ALSA: hda/realtek - ALC256 speaker noise issue
ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703
Linus Walleij (2):
gpio: bail out silently on NULL descriptors
gpio: make sure gpiod_to_irq() returns negative on NULL desc
Maarten Lankhorst (1):
drm/core: Do not preserve framebuffer on rmfb, v4.
Marc Zyngier (1):
irqchip/gic-v3: Fix ICC_SGI1R_EL1.INTID decoding mask
Marek Vasut (1):
net: stmmac: Fix incorrect memcpy source memory
Michael Holzheu (2):
s390/bpf: fix recache skb->data/hlen for skb_vlan_push/pop s390/bpf: reduce maximum program size to 64 KB
Nicolas Dichtel (1):
uapi glibc compat: fix compilation when !__USE_MISC in glibc
Nitin Gupta (1):
sparc64: Reduce TLB flushes during hugepte changes
Paolo Bonzini (2):
KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS
KVM: irqfd: fix NULL pointer dereference in kvm_irq_map_gsi
Prasun Maiti (1):
wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel
Ricardo Ribalda Delgado (2):
gpiolib: Fix NULL pointer deference
gpiolib: Fix unaligned used of reference counters
Richard Alpe (2):
tipc: check nl sock before parsing nested attributes
tipc: fix nametable publication field in nl compat
Russell Currey (1):
powerpc/pseries/eeh: Handle RTAS delay requests in configure_bridge
Russell King (1):
ARM: fix PTRACE_SETVFPREGS on SMP systems
Sabrina Dubroca (1):
macsec: fix netlink attribute for key id
Shubhrajyoti Datta (1):
gpio: zynq: Fix the error path
Tejun Heo (1):
memcg: add RCU locking around css_for_each_descendant_pre() in memcg_offline_kmem()
Thomas Huth (3):
powerpc: Fix definition of SIAR and SDAR registers
powerpc: Use privileged SPR number for MMCR2
powerpc/pseries: Add POWER8NVL support to ibm,client-architecture-support call
Tom Lendacky (1):
crypto: ccp - Fix AES XTS error for request sizes above 4096
Torsten Hilbrich (1):
ALSA: hda/realtek: Add T560 docking unit fixup
Toshiaki Makita (1):
bridge: Don't insert unnecessary local fdb entry on changing mac address
Vinod Koul (1):
ALSA: hda - Add PCI ID for Kabylake
Will Deacon (1):
arm64: mm: always take dirty state from new pte in ptep_set_access_flags
Yuchung Cheng (1):
tcp: record TLP and ER timer stats in v6 stats
hongkun.cao (1):
pinctrl: mediatek: fix dual-edge code defect
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 6 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Charred Weasel
arch/arm/kernel/ptrace.c +1 -1
@@ -733,8 +733,8 @@ static int vfp_set(struct task_struct *target,if (ret)return ret; -vfp_flush_hwstate (thread); thread->vfpstate.hard = new_vfp; +vfp_flush_hwstate (thread);return 0 ; }
arch/arm64/include/asm/elf.h +2 -2
@@ -160,14 +160,14 @@ extern int arch_setup_additional_pages(struct linux_binprm *bprm,#define STACK_RND_MASK (0x3ffff >> (PAGE_SHIFT - 12))#endif -#ifdef CONFIG_COMPAT -#ifdef __AARCH64EB__#define COMPAT_ELF_PLATFORM ("v8b")#else #define COMPAT_ELF_PLATFORM ("v8l")#endif +#ifdef CONFIG_COMPAT +#define COMPAT_ELF_ET_DYN_BASE (2 * TASK_SIZE_32 / 3)/* AArch32 registers. */
arch/arm64/kernel/cpuinfo.c +7 -1
@@ -22,6 +22,8 @@#include <linux/bitops.h> #include <linux/bug.h> +#include <linux/compat.h> +#include <linux/elf.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/personality.h>
@@ -104,6 +106,7 @@ static const char *const compat_hwcap2_str[] = {static int c_show (struct seq_file *m,void *v) {int i, j; +bool compat =personality (current->personality) ==PER_LINUX32 ;for_each_online_cpu (i) {struct cpuinfo_arm64 *cpuinfo = &per_cpu (cpu_data, i);
@@ -115,6 +118,9 @@ static int c_show(struct seq_file *m, void *v)* "processor". Give glibc what it expects. */ seq_printf (m,"processor\t: %d\n" , i); +if (compat) +seq_printf (m,"model name\t: ARMv8 Processor rev %d (%s)\n" , +MIDR_REVISION (midr),COMPAT_ELF_PLATFORM ); seq_printf(m, "BogoMIPS\t: %lu.%02lu\n", loops_per_jiffy / (500000UL/HZ),
@@ -127,7 +133,7 @@ static int c_show(struct seq_file *m, void *v)* software which does already (at least for 32-bit). */ seq_puts (m,"Features\t:" ); -if (personality (current->personality) ==PER_LINUX32 ) { +if (compat) {#ifdef CONFIG_COMPAT for (j =0 ; compat_hwcap_str[j]; j++)if (compat_elf_hwcap & (1 << j))
arch/arm64/kvm/hyp/vgic-v3-sr.c +3 -4
@@ -190,12 +190,11 @@ void __hyp_text __vgic_v3_save_state(struct kvm_vcpu *vcpu)if (!(vcpu->arch.vgic_cpu.live_lrs & (1UL << i)))continue ; -if (cpu_if->vgic_elrsr & (1 << i)) { +if (cpu_if->vgic_elrsr & (1 << i)) cpu_if->vgic_lr[i] &= ~ICH_LR_STATE ; -continue ; - } +else + cpu_if->vgic_lr[i] =__gic_v3_get_lr (i); - cpu_if->vgic_lr[i] =__gic_v3_get_lr (i);__gic_v3_set_lr (0 , i); }
arch/arm64/mm/fault.c +1 -1
@@ -109,7 +109,7 @@ int ptep_set_access_flags(struct vm_area_struct *vma,* PTE_RDONLY is cleared by default in the asm below, so set it in * back if necessary (read-only or clean PTE). */ -if (!pte_write (entry) || !dirty) +if (!pte_write (entry) || !pte_sw_dirty (entry))pte_val (entry) |=PTE_RDONLY ;/*
arch/parisc/kernel/unaligned.c +9 -1
@@ -666,7 +666,7 @@ void handle_unaligned(struct pt_regs *regs)break ; } -if (modify &&R1 (regs->iir)) +if (ret ==0 && modify &&R1 (regs->iir)) regs->gr[R1 (regs->iir)] = newbase;
@@ -677,6 +677,14 @@ void handle_unaligned(struct pt_regs *regs)if (ret) { +/* +* The unaligned handler failed. +* If we were called by __get_user() or __put_user() jump +* to it's exception fixup handler instead of crashing. +*/ +if (!user_mode (regs) &&fixup_exception (regs)) +return ; +printk (KERN_CRIT "Unaligned handler failed, ret = %d\n" , ret);die_if_kernel ("Unaligned data reference" , regs,28 );
arch/powerpc/include/asm/reg.h +3 -3
@@ -715,7 +715,7 @@#define MMCR0_FCWAIT 0x00000002UL/* freeze counter in WAIT state */ #define MMCR0_FCHV 0x00000001UL/* freeze conditions in hypervisor mode */ #define SPRN_MMCR1 798 -#define SPRN_MMCR2 769 +#define SPRN_MMCR2 785#define SPRN_MMCRA 0x312#define MMCRA_SDSYNC 0x80000000UL/* SDAR synced with SIAR */ #define MMCRA_SDAR_DCACHE_MISS 0x40000000UL
@@ -752,13 +752,13 @@#define SPRN_PMC6 792#define SPRN_PMC7 793#define SPRN_PMC8 794 -#define SPRN_SIAR 780 -#define SPRN_SDAR 781#define SPRN_SIER 784#define SIER_SIPR 0x2000000/* Sampled MSR_PR */ #define SIER_SIHV 0x1000000/* Sampled MSR_HV */ #define SIER_SIAR_VALID 0x0400000/* SIAR contents valid */ #define SIER_SDAR_VALID 0x0200000/* SDAR contents valid */ +#define SPRN_SIAR 796 +#define SPRN_SDAR 797#define SPRN_TACR 888#define SPRN_TCSCR 889#define SPRN_CSIGR 890
arch/powerpc/kernel/prom_init.c +1 -0
@@ -656,6 +656,7 @@ unsigned char ibm_architecture_vec[] = {W (0xffff0000 ),W (0x003e0000 ),/* POWER6 */ W (0xffff0000 ),W (0x003f0000 ),/* POWER7 */ W (0xffff0000 ),W (0x004b0000 ),/* POWER8E */ +W (0xffff0000 ),W (0x004c0000 ),/* POWER8NVL */ W (0xffff0000 ),W (0x004d0000 ),/* POWER8 */ W (0xffffffff ),W (0x0f000004 ),/* all 2.07-compliant */ W(0xffffffff), W(0x0f000003), /* all 2.06-compliant */
arch/powerpc/mm/hash_utils_64.c +20 -2
@@ -159,6 +159,19 @@ static struct mmu_psize_def mmu_psize_defaults_gp[] = { }, }; +/* +* 'R' and 'C' update notes: +* - Under pHyp or KVM, the updatepp path will not set C, thus it *will* +* create writeable HPTEs without C set, because the hcall H_PROTECT +* that we use in that case will not update C +* - The above is however not a problem, because we also don't do that +* fancy "no flush" variant of eviction and we use H_REMOVE which will +* do the right thing and thus we don't have the race I described earlier +* +* - Under bare metal, we do have the race, so we need R and C set +* - We make sure R is always set and never lost +* - C is _PAGE_DIRTY, and *should* always be set for a writeable mapping +*/ unsigned long htab_convert_pte_flags (unsigned long pteflags) {unsigned long rflags =0 ;
@@ -180,9 +193,14 @@ unsigned long htab_convert_pte_flags(unsigned long pteflags) rflags |=0x1 ; }/* -* Always add "C" bit for perf. Memory coherence is always enabled +* We can't allow hardware to update hpte bits. Hence always +* set 'R' bit and set 'C' if it is a write fault +* Memory coherence is always enabled */ - rflags |=HPTE_R_C |HPTE_R_M ; + rflags |=HPTE_R_R |HPTE_R_M ; + +if (pteflags & _PAGE_DIRTY) + rflags |=HPTE_R_C ;/* * Add in WIG bits */
arch/powerpc/platforms/pseries/eeh_pseries.c +36 -15
65 lines not on this page · raw message
arch/s390/net/bpf_jit.h +2 -2
@@ -37,7 +37,7 @@ extern u8 sk_load_word[], sk_load_half[], sk_load_byte[];* | | | * +---------------+ | * | 8 byte skbp | | -* R15+170 -> +---------------+ | +* R15+176 -> +---------------+ | * | 8 byte hlen | | * R15+168 -> +---------------+ | * | 4 byte align | |
@@ -58,7 +58,7 @@ extern u8 sk_load_word[], sk_load_half[], sk_load_byte[];#define STK_OFF (STK_SPACE - STK_160_UNUSED)#define STK_OFF_TMP 160/* Offset of tmp buffer on stack */ #define STK_OFF_HLEN 168/* Offset of SKB header length on stack */ -#define STK_OFF_SKBP 170/* Offset of SKB pointer on stack */ +#define STK_OFF_SKBP 176/* Offset of SKB pointer on stack */ #define STK_OFF_R6 (160 - 11 * 8)/* Offset of r6 on stack */ #define STK_OFF_TCCNT (160 - 12 * 8)/* Offset of tail_call_cnt on stack */
arch/s390/net/bpf_jit_comp.c +2 -2
@@ -45,7 +45,7 @@ struct bpf_jit {int labels[1 ];/* Labels for local jumps */ }; -#define BPF_SIZE_MAX 0x7ffff/* Max size for program (20 bit signed displ) */ +#define BPF_SIZE_MAX 0xffff/* Max size for program (16 bit branches) */ #define SEEN_SKB 1/* skb access */ #define SEEN_MEM 2/* use mem[] for temporary storage */
@@ -446,7 +446,7 @@ static void bpf_jit_prologue(struct bpf_jit *jit)emit_load_skb_data_hlen (jit);if (jit->seen &SEEN_SKB_CHANGE )/* stg %b1,ST_OFF_SKBP(%r0,%r15) */ -EMIT6_DISP_LH (0xe3000000 ,0x0024 ,REG_W1 ,REG_0 ,REG_15 , +EMIT6_DISP_LH (0xe3000000 ,0x0024 ,BPF_REG_1 ,REG_0 ,REG_15 ,STK_OFF_SKBP ); }
arch/sparc/include/asm/head_64.h +4 -0
@@ -15,6 +15,10 @@#define PTREGS_OFF (STACK_BIAS + STACKFRAME_SZ) +#define RTRAP_PSTATE (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV|PSTATE_IE) +#define RTRAP_PSTATE_IRQOFF (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV) +#define RTRAP_PSTATE_AG_IRQOFF (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV|PSTATE_AG) +#define __CHEETAH_ID 0x003e0014#define __JALAPENO_ID 0x003e0016#define __SERRANO_ID 0x003e0022
arch/sparc/include/asm/pgtable_64.h +32 -11
74 lines not on this page · raw message
arch/sparc/include/asm/tlbflush_64.h +2 -1
@@ -8,6 +8,7 @@#define TLB_BATCH_NR 192struct tlb_batch { +bool huge;struct mm_struct *mm;unsigned long tlb_nr;unsigned long active;
@@ -16,7 +17,7 @@ struct tlb_batch {void flush_tsb_kernel_range (unsigned long start,unsigned long end);void flush_tsb_user (struct tlb_batch *tb); -void flush_tsb_user_page (struct mm_struct *mm,unsigned long vaddr); +void flush_tsb_user_page (struct mm_struct *mm,unsigned long vaddr,bool huge);/* TLB flush operations. */
arch/sparc/include/asm/ttable.h +4 -4
@@ -589,8 +589,8 @@ user_rtt_fill_64bit: \ restored; \ nop; nop; nop; nop; nop; nop; \ nop; nop; nop; nop; nop; \ - ba,a,pt %xcc, user_rtt_fill_fixup; \ - ba,a,pt %xcc, user_rtt_fill_fixup; \ + ba,a,pt %xcc, user_rtt_fill_fixup_dax; \ + ba,a,pt %xcc, user_rtt_fill_fixup_mna; \ ba,a,pt %xcc, user_rtt_fill_fixup;
@@ -652,8 +652,8 @@ user_rtt_fill_32bit: \ restored; \ nop; nop; nop; nop; nop; \ nop; nop; nop; \ - ba,a,pt %xcc, user_rtt_fill_fixup; \ - ba,a,pt %xcc, user_rtt_fill_fixup; \ + ba,a,pt %xcc, user_rtt_fill_fixup_dax; \ + ba,a,pt %xcc, user_rtt_fill_fixup_mna; \ ba,a,pt %xcc, user_rtt_fill_fixup;
arch/sparc/kernel/Makefile +1 -0
@@ -21,6 +21,7 @@ CFLAGS_REMOVE_perf_event.o := -pg CFLAGS_REMOVE_pcr.o := -pg endif +obj-$(CONFIG_SPARC64) += urtt_fill.o obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o obj-$(CONFIG_SPARC32) += etrap_32.o obj-$(CONFIG_SPARC32) += rtrap_32.o
arch/sparc/kernel/rtrap_64.S +9 -48
71 lines not on this page · raw message
arch/sparc/kernel/signal32.c +30 -16
85 lines not on this page · raw message
arch/sparc/kernel/signal_32.c +26 -15
76 lines not on this page · raw message
arch/sparc/kernel/signal_64.c +20 -11
@@ -234,6 +234,17 @@ do_sigsegv: goto out; } +/* Checks if the fp is valid. We always build rt signal frames which +* are 16-byte aligned, therefore we can always enforce that the +* restore frame has that property as well. +*/ +static bool invalid_frame_pointer (void __user *fp) +{ +if (((unsigned long ) fp) &15 ) +return true; +return false; +} +struct rt_signal_frame {struct sparc_stackf ss;siginfo_t info;
@@ -246,8 +257,8 @@ struct rt_signal_frame {void do_rt_sigreturn (struct pt_regs *regs) { +unsigned long tpc, tnpc, tstate, ufp;struct rt_signal_frame __user *sf; -unsigned long tpc, tnpc, tstate;__siginfo_fpu_t __user *fpu_save;__siginfo_rwin_t __user *rwin_save;sigset_t set;
@@ -261,10 +272,16 @@ void do_rt_sigreturn(struct pt_regs *regs) (regs->u_regs [UREG_FP ] +STACK_BIAS );/* 1. Make sure we are not getting garbage from the user */ -if (((unsigned long ) sf) &3 ) +if (invalid_frame_pointer (sf)) + goto segv; + +if (get_user (ufp, &sf->regs.u_regs[UREG_FP ])) goto segv; - err =get_user (tpc, &sf->regs.tpc); +if ((ufp +STACK_BIAS ) &0x7 ) + goto segv; + + err =__get_user (tpc, &sf->regs.tpc); err |=__get_user (tnpc, &sf->regs.tnpc);if (test_thread_flag (TIF_32BIT )) { tpc &=0xffffffff ;
@@ -308,14 +325,6 @@ segv:force_sig (SIGSEGV , current); } -/* Checks if the fp is valid */ -static int invalid_frame_pointer (void __user *fp) -{ -if (((unsigned long ) fp) &15 ) -return 1 ; -return 0 ; -} -static inline void __user *get_sigframe (struct ksignal *ksig,struct pt_regs *regs,unsigned long framesize) {unsigned long sp = regs->u_regs[UREG_FP ] +STACK_BIAS ;
arch/sparc/kernel/sigutil_32.c +8 -1
@@ -48,6 +48,10 @@ int save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)int restore_fpu_state (struct pt_regs *regs,__siginfo_fpu_t __user *fpu) {int err; + +if (((unsigned long ) fpu) &3 ) +return -EFAULT ; +#ifdef CONFIG_SMP if (test_tsk_thread_flag (current,TIF_USEDFPU )) regs->psr &= ~PSR_EF ;
@@ -97,7 +101,10 @@ int restore_rwin_state(__siginfo_rwin_t __user *rp)struct thread_info *t =current_thread_info ();int i, wsaved, err; -__get_user (wsaved, &rp->wsaved); +if (((unsigned long ) rp) &3 ) +return -EFAULT ; + +get_user (wsaved, &rp->wsaved);if (wsaved >NSWINS )return -EFAULT ;
arch/sparc/kernel/sigutil_64.c +8 -2
@@ -37,7 +37,10 @@ int restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)unsigned long fprs;int err; - err =__get_user (fprs, &fpu->si_fprs); +if (((unsigned long ) fpu) &7 ) +return -EFAULT ; + + err =get_user (fprs, &fpu->si_fprs);fprs_write (0 ); regs->tstate &= ~TSTATE_PEF ;if (fprs &FPRS_DL )
@@ -72,7 +75,10 @@ int restore_rwin_state(__siginfo_rwin_t __user *rp)struct thread_info *t =current_thread_info ();int i, wsaved, err; -__get_user (wsaved, &rp->wsaved); +if (((unsigned long ) rp) &7 ) +return -EFAULT ; + +get_user (wsaved, &rp->wsaved);if (wsaved >NSWINS )return -EFAULT ;
arch/sparc/kernel/urtt_fill.S new file +98 -0
98 lines not on this page · raw message
arch/sparc/mm/hugetlbpage.c +28 -5
@@ -176,17 +176,31 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t entry) { int i; +pte_t orig[2 ]; +unsigned long nptes;if (!pte_present (*ptep) &&pte_present (entry)) mm->context.huge_pte_count++; addr &=HPAGE_MASK ; -for (i =0 ; i < (1 <<HUGETLB_PAGE_ORDER ); i++) { -set_pte_at (mm, addr, ptep, entry); + + nptes =1 <<HUGETLB_PAGE_ORDER ; + orig[0 ] = *ptep; + orig[1 ] = *(ptep + nptes /2 ); +for (i =0 ; i < nptes; i++) { + *ptep = entry; ptep++; addr +=PAGE_SIZE ;pte_val (entry) +=PAGE_SIZE ; } + +/* Issue TLB flush at REAL_HPAGE_SIZE boundaries */ + addr -=REAL_HPAGE_SIZE ; + ptep -= nptes /2 ; +maybe_tlb_batch_add (mm, addr, ptep, orig[1 ],0 ); + addr -=REAL_HPAGE_SIZE ; + ptep -= nptes /2 ; +maybe_tlb_batch_add (mm, addr, ptep, orig[0 ],0 ); } pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
@@ -194,19 +208,28 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, {pte_t entry;int i; +unsigned long nptes; entry = *ptep;if (pte_present (entry)) mm->context.huge_pte_count--; addr &=HPAGE_MASK ; - -for (i =0 ; i < (1 <<HUGETLB_PAGE_ORDER ); i++) { -pte_clear (mm, addr, ptep); + nptes =1 <<HUGETLB_PAGE_ORDER ; +for (i =0 ; i < nptes; i++) { + *ptep =__pte (0UL ); addr +=PAGE_SIZE ; ptep++; } +/* Issue TLB flush at REAL_HPAGE_SIZE boundaries */ + addr -=REAL_HPAGE_SIZE ; + ptep -= nptes /2 ; +maybe_tlb_batch_add (mm, addr, ptep, entry,0 ); + addr -=REAL_HPAGE_SIZE ; + ptep -= nptes /2 ; +maybe_tlb_batch_add (mm, addr, ptep, entry,0 ); +return entry; }
arch/sparc/mm/init_64.c +7 -15
@@ -324,18 +324,6 @@ static void __update_mmu_tsb_insert(struct mm_struct *mm, unsigned long tsb_indetsb_insert (tsb, tag, tte); } -#if defined(CONFIG_HUGETLB_PAGE ) || defined(CONFIG_TRANSPARENT_HUGEPAGE ) -static inline bool is_hugetlb_pte (pte_t pte) -{ -if ((tlb_type == hypervisor && - (pte_val (pte) & _PAGE_SZALL_4V) == _PAGE_SZHUGE_4V) || - (tlb_type != hypervisor && - (pte_val (pte) & _PAGE_SZALL_4U) == _PAGE_SZHUGE_4U)) -return true; -return false; -} -#endif -void update_mmu_cache (struct vm_area_struct *vma,unsigned long address,pte_t *ptep) {struct mm_struct *mm;
@@ -2836,9 +2824,10 @@ void hugetlb_setup(struct pt_regs *regs)* the Data-TLB for huge pages. */ if (tlb_type == cheetah_plus) { +bool need_context_reload = false;unsigned long ctx; -spin_lock (&ctx_alloc_lock); +spin_lock_irq (&ctx_alloc_lock); ctx = mm->context.sparc64_ctx_val; ctx &= ~CTX_PGSZ_MASK ; ctx |=CTX_PGSZ_BASE <<CTX_PGSZ0_SHIFT ;
@@ -2857,9 +2846,12 @@ void hugetlb_setup(struct pt_regs *regs)* also executing in this address space. */ mm->context.sparc64_ctx_val = ctx; - on_each_cpu(context_reload, mm, 0); + need_context_reload = true; } -spin_unlock (&ctx_alloc_lock); +spin_unlock_irq (&ctx_alloc_lock); + +if (need_context_reload) +on_each_cpu (context_reload, mm,0 ); } }#endif
arch/sparc/mm/tlb.c +18 -7
@@ -67,7 +67,7 @@ void arch_leave_lazy_mmu_mode(void) }static void tlb_batch_add_one (struct mm_struct *mm,unsigned long vaddr, -bool exec) +bool exec,bool huge) {struct tlb_batch *tb = &get_cpu_var (tlb_batch);unsigned long nr;
@@ -84,13 +84,21 @@ static void tlb_batch_add_one(struct mm_struct *mm, unsigned long vaddr, }if (!tb->active) { -flush_tsb_user_page (mm, vaddr); +flush_tsb_user_page (mm, vaddr, huge);global_flush_tlb_page (mm, vaddr); goto out; } -if (nr ==0 ) +if (nr ==0 ) { tb->mm = mm; + tb->huge = huge; + } + +if (tb->huge != huge) { +flush_tlb_pending (); + tb->huge = huge; + nr =0 ; + } tb->vaddrs[nr] = vaddr; tb->tlb_nr = ++nr;
@@ -104,6 +112,8 @@ out:void tlb_batch_add (struct mm_struct *mm,unsigned long vaddr,pte_t *ptep,pte_t orig,int fullmm) { +bool huge =is_hugetlb_pte (orig); +if (tlb_type != hypervisor &&pte_dirty (orig)) {unsigned long paddr, pfn =pte_pfn (orig);
@@ -129,7 +139,7 @@ void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr, no_cache_flush:if (!fullmm) -tlb_batch_add_one (mm, vaddr,pte_exec (orig)); +tlb_batch_add_one (mm, vaddr,pte_exec (orig), huge); }#ifdef CONFIG_TRANSPARENT_HUGEPAGE
@@ -145,7 +155,7 @@ static void tlb_batch_pmd_scan(struct mm_struct *mm, unsigned long vaddr,if (pte_val (*pte) & _PAGE_VALID) {bool exec =pte_exec (*pte); -tlb_batch_add_one (mm, vaddr, exec); +tlb_batch_add_one (mm, vaddr, exec, false); } pte++; vaddr +=PAGE_SIZE ;
@@ -185,8 +195,9 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr,pte_t orig_pte =__pte (pmd_val (orig));bool exec =pte_exec (orig_pte); -tlb_batch_add_one (mm, addr, exec); -tlb_batch_add_one (mm, addr +REAL_HPAGE_SIZE , exec); +tlb_batch_add_one (mm, addr, exec, true); +tlb_batch_add_one (mm, addr +REAL_HPAGE_SIZE , exec, + true); }else {tlb_batch_pmd_scan (mm, addr, orig); }
arch/sparc/mm/tsb.c +17 -15
@@ -76,14 +76,15 @@ void flush_tsb_user(struct tlb_batch *tb)spin_lock_irqsave (&mm->context.lock, flags); - base = (unsigned long ) mm->context.tsb_block[MM_TSB_BASE ].tsb; - nentries = mm->context.tsb_block[MM_TSB_BASE ].tsb_nentries; -if (tlb_type == cheetah_plus || tlb_type == hypervisor) - base =__pa (base); -__flush_tsb_one (tb,PAGE_SHIFT , base, nentries); - +if (!tb->huge) { + base = (unsigned long ) mm->context.tsb_block[MM_TSB_BASE ].tsb; + nentries = mm->context.tsb_block[MM_TSB_BASE ].tsb_nentries; +if (tlb_type == cheetah_plus || tlb_type == hypervisor) + base =__pa (base); +__flush_tsb_one (tb,PAGE_SHIFT , base, nentries); + }#if defined(CONFIG_HUGETLB_PAGE ) || defined(CONFIG_TRANSPARENT_HUGEPAGE ) -if (mm->context.tsb_block[MM_TSB_HUGE ].tsb) { +if (tb->huge && mm->context.tsb_block[MM_TSB_HUGE ].tsb) { base = (unsigned long ) mm->context.tsb_block[MM_TSB_HUGE ].tsb; nentries = mm->context.tsb_block[MM_TSB_HUGE ].tsb_nentries;if (tlb_type == cheetah_plus || tlb_type == hypervisor)
@@ -94,20 +95,21 @@ void flush_tsb_user(struct tlb_batch *tb)spin_unlock_irqrestore (&mm->context.lock, flags); } -void flush_tsb_user_page (struct mm_struct *mm,unsigned long vaddr) +void flush_tsb_user_page (struct mm_struct *mm,unsigned long vaddr,bool huge) {unsigned long nentries, base, flags;spin_lock_irqsave (&mm->context.lock, flags); - base = (unsigned long ) mm->context.tsb_block[MM_TSB_BASE ].tsb; - nentries = mm->context.tsb_block[MM_TSB_BASE ].tsb_nentries; -if (tlb_type == cheetah_plus || tlb_type == hypervisor) - base =__pa (base); -__flush_tsb_one_entry (base, vaddr,PAGE_SHIFT , nentries); - +if (!huge) { + base = (unsigned long ) mm->context.tsb_block[MM_TSB_BASE ].tsb; + nentries = mm->context.tsb_block[MM_TSB_BASE ].tsb_nentries; +if (tlb_type == cheetah_plus || tlb_type == hypervisor) + base =__pa (base); +__flush_tsb_one_entry (base, vaddr,PAGE_SHIFT , nentries); + }#if defined(CONFIG_HUGETLB_PAGE ) || defined(CONFIG_TRANSPARENT_HUGEPAGE ) -if (mm->context.tsb_block[MM_TSB_HUGE ].tsb) { +if (huge && mm->context.tsb_block[MM_TSB_HUGE ].tsb) { base = (unsigned long ) mm->context.tsb_block[MM_TSB_HUGE ].tsb; nentries = mm->context.tsb_block[MM_TSB_HUGE ].tsb_nentries;if (tlb_type == cheetah_plus || tlb_type == hypervisor)
arch/x86/kernel/traps.c +10 -10
@@ -95,6 +95,12 @@ static inline void cond_local_irq_disable(struct pt_regs *regs)local_irq_disable (); } +/* +* In IST context, we explicitly disable preemption. This serves two +* purposes: it makes it much less likely that we would accidentally +* schedule in IST context and it will force a warning if we somehow +* manage to schedule by accident. +*/ void ist_enter (struct pt_regs *regs) {if (user_mode (regs)) {
@@ -109,13 +115,7 @@ void ist_enter(struct pt_regs *regs)rcu_nmi_enter (); } -/* -* We are atomic because we're on the IST stack; or we're on -* x86_32, in which case we still shouldn't schedule; or we're -* on x86_64 and entered from user mode, in which case we're -* still atomic unless ist_begin_non_atomic is called. -*/ -preempt_count_add (HARDIRQ_OFFSET ); +preempt_disable ();/* This code is a bit fragile. Test it. */ RCU_LOCKDEP_WARN (!rcu_is_watching (),"ist_enter didn't work" );
@@ -123,7 +123,7 @@ void ist_enter(struct pt_regs *regs)void ist_exit (struct pt_regs *regs) { -preempt_count_sub (HARDIRQ_OFFSET ); +preempt_enable_no_resched ();if (!user_mode (regs))rcu_nmi_exit ();
@@ -154,7 +154,7 @@ void ist_begin_non_atomic(struct pt_regs *regs)BUG_ON ((unsigned long )(current_top_of_stack () -current_stack_pointer ()) >=THREAD_SIZE ); -preempt_count_sub (HARDIRQ_OFFSET ); +preempt_enable_no_resched (); }/**
@@ -164,7 +164,7 @@ void ist_begin_non_atomic(struct pt_regs *regs)*/ void ist_end_non_atomic (void ) { -preempt_count_add (HARDIRQ_OFFSET ); +preempt_disable (); }static nokprobe_inline int
arch/x86/kvm/x86.c +5 -0
@@ -3032,6 +3032,11 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu,if (dbgregs->flags)return -EINVAL ; +if (dbgregs->dr6 & ~0xffffffffull ) +return -EINVAL ; +if (dbgregs->dr7 & ~0xffffffffull ) +return -EINVAL ; +memcpy (vcpu->arch.db, dbgregs->db,sizeof (vcpu->arch.db));kvm_update_dr0123 (vcpu); vcpu->arch.dr6 = dbgregs->dr6;
crypto/asymmetric_keys/Kconfig +1 -0
@@ -13,6 +13,7 @@ config ASYMMETRIC_PUBLIC_KEY_SUBTYPE tristate "Asymmetric public-key crypto algorithm subtype" select MPILIB select CRYPTO_HASH_INFO + select CRYPTO_AKCIPHER help This option provides support for asymmetric public key type handling. If signature generation and/or verification are to be used,
drivers/crypto/ccp/ccp-crypto-aes-xts.c +12 -5
@@ -122,6 +122,7 @@ static int ccp_aes_xts_crypt(struct ablkcipher_request *req,struct ccp_ctx *ctx =crypto_tfm_ctx (req->base.tfm);struct ccp_aes_req_ctx *rctx =ablkcipher_request_ctx (req);unsigned int unit; +u32 unit_size;int ret;if (!ctx->u.aes.key_len)
@@ -133,11 +134,17 @@ static int ccp_aes_xts_crypt(struct ablkcipher_request *req,if (!req->info)return -EINVAL ; -for (unit =0 ; unit <ARRAY_SIZE (unit_size_map); unit++) -if (!(req->nbytes & (unit_size_map[unit].size -1 ))) -break ; + unit_size =CCP_XTS_AES_UNIT_SIZE__LAST ; +if (req->nbytes <= unit_size_map[0 ].size) { +for (unit =0 ; unit <ARRAY_SIZE (unit_size_map); unit++) { +if (!(req->nbytes & (unit_size_map[unit].size -1 ))) { + unit_size = unit_size_map[unit].value; +break ; + } + } + } -if ((unit_size_map[unit].value ==CCP_XTS_AES_UNIT_SIZE__LAST ) || +if ((unit_size ==CCP_XTS_AES_UNIT_SIZE__LAST ) || (ctx->u.aes.key_len !=AES_KEYSIZE_128 )) {/* Use the fallback to process the request for any * unsupported unit sizes or key sizes
@@ -158,7 +165,7 @@ static int ccp_aes_xts_crypt(struct ablkcipher_request *req, rctx->cmd.engine =CCP_ENGINE_XTS_AES_128 ; rctx->cmd.u.xts.action = (encrypt) ?CCP_AES_ACTION_ENCRYPT :CCP_AES_ACTION_DECRYPT ; - rctx->cmd.u.xts.unit_size = unit_size_map[unit].value; + rctx->cmd.u.xts.unit_size = unit_size; rctx->cmd.u.xts.key = &ctx->u.aes.key_sg; rctx->cmd.u.xts.key_len = ctx->u.aes.key_len; rctx->cmd.u.xts.iv = &rctx->iv_sg;
drivers/gpio/gpio-bcm-kona.c +2 -2
@@ -546,11 +546,11 @@ static void bcm_kona_gpio_reset(struct bcm_kona_gpio *kona_gpio)/* disable interrupts and clear status */ for (i =0 ; i < kona_gpio->num_bank; i++) {/* Unlock the entire bank first */ -bcm_kona_gpio_write_lock_regs (kona_gpio, i,UNLOCK_CODE ); +bcm_kona_gpio_write_lock_regs (reg_base, i,UNLOCK_CODE );writel (0xffffffff , reg_base +GPIO_INT_MASK (i));writel (0xffffffff , reg_base +GPIO_INT_STATUS (i));/* Now re-lock the bank */ -bcm_kona_gpio_write_lock_regs (kona_gpio, i,LOCK_CODE ); +bcm_kona_gpio_write_lock_regs (reg_base, i,LOCK_CODE ); } }
drivers/gpio/gpio-zynq.c +10 -1
@@ -709,11 +709,17 @@ static int zynq_gpio_probe(struct platform_device *pdev)dev_err (&pdev->dev,"input clock not found.\n" );return PTR_ERR (gpio->clk); } + ret =clk_prepare_enable (gpio->clk); +if (ret) { +dev_err (&pdev->dev,"Unable to enable clock.\n" ); +return ret; + } +pm_runtime_set_active (&pdev->dev);pm_runtime_enable (&pdev->dev); ret =pm_runtime_get_sync (&pdev->dev);if (ret <0 ) -return ret; + goto err_pm_dis;/* report a bug if gpio chip registration fails */ ret =gpiochip_add_data (chip, gpio);
@@ -745,6 +751,9 @@ err_rm_gpiochip:gpiochip_remove (chip); err_pm_put:pm_runtime_put (&pdev->dev); +err_pm_dis: +pm_runtime_disable (&pdev->dev); +clk_disable_unprepare (gpio->clk);return ret; }
drivers/gpio/gpiolib.c +19 -7
@@ -438,7 +438,6 @@ static void gpiodevice_release(struct device *dev) {struct gpio_device *gdev =dev_get_drvdata (dev); -cdev_del (&gdev->chrdev);list_del (&gdev->list);ida_simple_remove (&gpio_ida, gdev->id);kfree (gdev->label);
@@ -471,7 +470,6 @@ static int gpiochip_setup_dev(struct gpio_device *gdev)/* From this point, the .release() function cleans up gpio_device */ gdev->dev.release = gpiodevice_release; -get_device (&gdev->dev);pr_debug ("%s: registered GPIOs %d to %d on device: %s (%s)\n" , __func__, gdev->base, gdev->base + gdev->ngpio -1 ,dev_name (&gdev->dev), gdev->chip->label ? :"generic" );
@@ -742,6 +740,8 @@ void gpiochip_remove(struct gpio_chip *chip)* be removed, else it will be dangling until the last user is * gone. */ +cdev_del (&gdev->chrdev); +device_del (&gdev->dev);put_device (&gdev->dev); }EXPORT_SYMBOL_GPL (gpiochip_remove);
@@ -841,7 +841,7 @@ struct gpio_chip *gpiochip_find(void *data,spin_lock_irqsave (&gpio_lock, flags);list_for_each_entry (gdev, &gpio_devices, list) -if (match (gdev->chip, data)) +if (gdev->chip &&match (gdev->chip, data))break ;/* No match? */
@@ -1339,10 +1339,13 @@ done:/* * This descriptor validation needs to be inserted verbatim into each * function taking a descriptor, so we need to use a preprocessor -* macro to avoid endless duplication. +* macro to avoid endless duplication. If the desc is NULL it is an +* optional GPIO and calls should just bail out. */ #define VALIDATE_DESC (desc) do { \ - if (!desc || !desc->gdev) { \ + if (!desc) \ + return 0; \ + if (!desc->gdev) { \ pr_warn("%s: invalid GPIO\n", __func__); \ return -EINVAL; \ } \
@@ -1353,7 +1356,9 @@ done: } } while (0)#define VALIDATE_DESC_VOID (desc) do { \ - if (!desc || !desc->gdev) { \ + if (!desc) \ + return; \ + if (!desc->gdev) { \ pr_warn("%s: invalid GPIO\n", __func__); \ return; \ } \
@@ -2001,7 +2006,14 @@ int gpiod_to_irq(const struct gpio_desc *desc)struct gpio_chip *chip;int offset; -VALIDATE_DESC (desc); +/* +* Cannot VALIDATE_DESC() here as gpiod_to_irq() consumer semantics +* requires this function to not return zero on an invalid descriptor +* but rather a negative error number. +*/ +if (!desc || !desc->gdev || !desc->gdev->chip) +return -EINVAL ; + chip = desc->gdev->chip; offset =gpio_chip_hwgpio (desc);return chip->to_irq ? chip->to_irq (chip, offset) : -ENXIO ;
drivers/gpu/drm/drm_crtc.c +55 -5
91 lines not on this page · raw message
drivers/gpu/drm/i915/i915_irq.c +2 -2
@@ -1829,7 +1829,7 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg)/* IRQs are synced during runtime_suspend, we don't require a wakeref */ disable_rpm_wakeref_asserts (dev_priv); - do { +for (;;) { master_ctl =I915_READ (GEN8_MASTER_IRQ ) & ~GEN8_MASTER_IRQ_CONTROL ; iir =I915_READ (VLV_IIR );
@@ -1857,7 +1857,7 @@ static irqreturn_t cherryview_irq_handler(int irq, void *arg)I915_WRITE (GEN8_MASTER_IRQ ,DE_MASTER_IRQ_CONTROL );POSTING_READ (GEN8_MASTER_IRQ ); - }while (0 ); + }enable_rpm_wakeref_asserts (dev_priv);
drivers/net/ethernet/atheros/alx/alx.h +4 -0
@@ -96,6 +96,10 @@ struct alx_priv {unsigned int rx_ringsz;unsigned int rxbuf_size; +struct page *rx_page; +unsigned int rx_page_offset; +unsigned int rx_frag_size; +struct napi_struct napi;struct alx_tx_queue txq;struct alx_rx_queue rxq;
drivers/net/ethernet/atheros/alx/main.c +47 -1
103 lines not on this page · raw message
drivers/net/ethernet/ezchip/nps_enet.c +3 -1
@@ -205,8 +205,10 @@ static int nps_enet_poll(struct napi_struct *napi, int budget)* re-adding ourselves to the poll list. */ -if (priv->tx_skb && !tx_ctrl_ct) +if (priv->tx_skb && !tx_ctrl_ct) { +nps_enet_reg_set (priv,NPS_ENET_REG_BUF_INT_ENABLE ,0 );napi_reschedule (napi); + } }return work_done;
drivers/net/ethernet/marvell/mvneta_bm.c +1 -0
@@ -189,6 +189,7 @@ struct mvneta_bm_pool *mvneta_bm_pool_use(struct mvneta_bm *priv, u8 pool_id,SKB_DATA_ALIGN (sizeof (struct skb_shared_info )); hwbm_pool->construct = mvneta_bm_construct; hwbm_pool->priv = new_pool; +spin_lock_init (&hwbm_pool->lock);/* Create new pool */ err =mvneta_bm_pool_create (priv, new_pool);
drivers/net/ethernet/rocker/rocker_ofdpa.c +2 -2
@@ -2727,7 +2727,7 @@ static int ofdpa_port_obj_fib4_add(struct rocker_port *rocker_port,return ofdpa_port_fib_ipv4 (ofdpa_port, trans,htonl (fib4->dst), fib4->dst_len, - &fib4->fi, fib4->tb_id,0 ); + fib4->fi, fib4->tb_id,0 ); } static int ofdpa_port_obj_fib4_del(struct rocker_port *rocker_port,
@@ -2737,7 +2737,7 @@ static int ofdpa_port_obj_fib4_del(struct rocker_port *rocker_port,return ofdpa_port_fib_ipv4 (ofdpa_port,NULL ,htonl (fib4->dst), fib4->dst_len, - &fib4->fi, fib4->tb_id, + fib4->fi, fib4->tb_id,OFDPA_OP_FLAG_REMOVE ); }
drivers/net/ethernet/sfc/ef10.c +16 -0
@@ -619,6 +619,17 @@ fail: return rc; } +static void efx_ef10_forget_old_piobufs (struct efx_nic *efx) +{ +struct efx_channel *channel; +struct efx_tx_queue *tx_queue; + +/* All our existing PIO buffers went away */ +efx_for_each_channel (channel, efx) +efx_for_each_channel_tx_queue (tx_queue, channel) + tx_queue->piobuf =NULL ; +} +#else /* !EFX_USE_PIO */ static int efx_ef10_alloc_piobufs (struct efx_nic *efx,unsigned int n)
@@ -635,6 +646,10 @@ static void efx_ef10_free_piobufs(struct efx_nic *efx) { } +static void efx_ef10_forget_old_piobufs (struct efx_nic *efx) +{ +} +#endif /* EFX_USE_PIO */ static void efx_ef10_remove (struct efx_nic *efx)
@@ -1018,6 +1033,7 @@ static void efx_ef10_reset_mc_allocations(struct efx_nic *efx) nic_data->must_realloc_vis = true; nic_data->must_restore_filters = true; nic_data->must_restore_piobufs = true; +efx_ef10_forget_old_piobufs (efx); nic_data->rx_rss_context =EFX_EF10_RSS_CONTEXT_INVALID ;/* Driver-created vswitches and vports must be re-created */
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +1 -1
@@ -209,7 +209,7 @@ int stmmac_mdio_register(struct net_device *ndev)return -ENOMEM ;if (mdio_bus_data->irqs) -memcpy (new_bus->irq, mdio_bus_data,sizeof (new_bus->irq)); +memcpy (new_bus->irq, mdio_bus_data->irqs,sizeof (new_bus->irq));#ifdef CONFIG_OF if (priv->device->of_node)
drivers/net/geneve.c +3 -7
@@ -336,15 +336,15 @@ static int geneve_udp_encap_recv(struct sock *sk, struct sk_buff *skb)/* Need Geneve and inner Ethernet header to be present */ if (unlikely (!pskb_may_pull (skb,GENEVE_BASE_HLEN ))) - goto error; + goto drop;/* Return packets with reserved bits set */ geneveh =geneve_hdr (skb);if (unlikely (geneveh->ver !=GENEVE_VER )) - goto error; + goto drop;if (unlikely (geneveh->proto_type !=htons (ETH_P_TEB ))) - goto error; + goto drop; gs =rcu_dereference_sk_user_data (sk);if (!gs)
@@ -367,10 +367,6 @@ drop:/* Consume bad packet */ kfree_skb (skb);return 0 ; - -error: -/* Let the UDP layer deal with the skb */ -return 1 ; } static struct socket *geneve_create_sock(struct net *net, bool ipv6,
drivers/net/macsec.c +2 -2
@@ -1645,7 +1645,7 @@ static int macsec_add_rxsa(struct sk_buff *skb, struct genl_info *info)if (tb_sa[MACSEC_SA_ATTR_ACTIVE ]) rx_sa->active = !!nla_get_u8 (tb_sa[MACSEC_SA_ATTR_ACTIVE ]); -nla_memcpy (rx_sa->key.id, tb_sa[MACSEC_SA_ATTR_KEY ],MACSEC_KEYID_LEN ); +nla_memcpy (rx_sa->key.id, tb_sa[MACSEC_SA_ATTR_KEYID ],MACSEC_KEYID_LEN ); rx_sa->sc = rx_sc;rcu_assign_pointer (rx_sc->sa[assoc_num], rx_sa);
@@ -1784,7 +1784,7 @@ static int macsec_add_txsa(struct sk_buff *skb, struct genl_info *info)return -ENOMEM ; } -nla_memcpy (tx_sa->key.id, tb_sa[MACSEC_SA_ATTR_KEY ],MACSEC_KEYID_LEN ); +nla_memcpy (tx_sa->key.id, tb_sa[MACSEC_SA_ATTR_KEYID ],MACSEC_KEYID_LEN );spin_lock_bh (&tx_sa->lock); tx_sa->next_pn =nla_get_u32 (tb_sa[MACSEC_SA_ATTR_PN ]);
drivers/net/team/team.c +7 -2
@@ -990,7 +990,7 @@ static void team_port_disable(struct team *team,#define TEAM_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ NETIF_F_RXCSUM | NETIF_F_ALL_TSO) -static void __team_compute_features (struct team *team) +static void ___team_compute_features (struct team *team) {struct team_port *port;u32 vlan_features =TEAM_VLAN_FEATURES &NETIF_F_ALL_FOR_ALL ;
@@ -1021,15 +1021,20 @@ static void __team_compute_features(struct team *team) team->dev->priv_flags &= ~IFF_XMIT_DST_RELEASE ;if (dst_release_flag == (IFF_XMIT_DST_RELEASE |IFF_XMIT_DST_RELEASE_PERM )) team->dev->priv_flags |=IFF_XMIT_DST_RELEASE ; +} +static void __team_compute_features (struct team *team) +{ +___team_compute_features (team);netdev_change_features (team->dev); }static void team_compute_features (struct team *team) {mutex_lock (&team->lock); -__team_compute_features (team); +___team_compute_features (team);mutex_unlock (&team->lock); +netdev_change_features (team->dev); }static int team_port_enter (struct team *team,struct team_port *port)
drivers/net/tun.c +3 -3
@@ -568,11 +568,13 @@ static void tun_detach_all(struct net_device *dev)for (i =0 ; i < n; i++) { tfile =rtnl_dereference (tun->tfiles[i]);BUG_ON (!tfile); + tfile->socket.sk->sk_shutdown =RCV_SHUTDOWN ; tfile->socket.sk->sk_data_ready (tfile->socket.sk);RCU_INIT_POINTER (tfile->tun,NULL ); --tun->numqueues; }list_for_each_entry (tfile, &tun->disabled, next) { + tfile->socket.sk->sk_shutdown =RCV_SHUTDOWN ; tfile->socket.sk->sk_data_ready (tfile->socket.sk);RCU_INIT_POINTER (tfile->tun,NULL ); }
@@ -628,6 +630,7 @@ static int tun_attach(struct tun_struct *tun, struct file *file, bool skip_filte goto out; } tfile->queue_index = tun->numqueues; + tfile->socket.sk->sk_shutdown &= ~RCV_SHUTDOWN ;rcu_assign_pointer (tfile->tun, tun);rcu_assign_pointer (tun->tfiles[tun->numqueues], tfile); tun->numqueues++;
@@ -1425,9 +1428,6 @@ static ssize_t tun_do_read(struct tun_struct *tun, struct tun_file *tfile,if (!iov_iter_count (to))return 0 ; -if (tun->dev->reg_state !=NETREG_REGISTERED ) -return -EIO ; -/* Read frames from queue */ skb =__skb_recv_datagram (tfile->socket.sk, noblock ?MSG_DONTWAIT :0 , &peeked, &off, &err);
drivers/net/vxlan.c +5 -2
@@ -1262,7 +1262,7 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)/* Need Vxlan and inner Ethernet header to be present */ if (!pskb_may_pull (skb,VXLAN_HLEN )) -return 1 ; + goto drop; unparsed = *vxlan_hdr (skb);/* VNI flag always required to be set */
@@ -1271,7 +1271,7 @@ static int vxlan_rcv(struct sock *sk, struct sk_buff *skb)ntohl (vxlan_hdr (skb)->vx_flags), ntohl(vxlan_hdr(skb)->vx_vni));/* Return non vxlan pkt */ -return 1 ; + goto drop; } unparsed.vx_flags &= ~VXLAN_HF_VNI ; unparsed.vx_vni &= ~VXLAN_VNI_MASK ;
@@ -2959,6 +2959,9 @@ static int vxlan_newlink(struct net *src_net, struct net_device *dev,if (data[IFLA_VXLAN_REMCSUM_NOPARTIAL ]) conf.flags |=VXLAN_F_REMCSUM_NOPARTIAL ; +if (tb[IFLA_MTU ]) + conf.mtu =nla_get_u32 (tb[IFLA_MTU ]); + err =vxlan_dev_configure (src_net, dev, &conf);switch (err) {case -ENODEV :
drivers/perf/arm_pmu.c +3 -3
@@ -987,9 +987,6 @@ int arm_pmu_device_probe(struct platform_device *pdev,armpmu_init (pmu); -if (!__oprofile_cpu_pmu) - __oprofile_cpu_pmu = pmu; - pmu->plat_device = pdev;if (node && (of_id =of_match_node (of_table, pdev->dev.of_node))) {
@@ -1025,6 +1022,9 @@ int arm_pmu_device_probe(struct platform_device *pdev,if (ret) goto out_destroy; +if (!__oprofile_cpu_pmu) + __oprofile_cpu_pmu = pmu; +pr_info ("enabled with %s PMU driver, %d counters available\n" , pmu->name, pmu->num_events);
drivers/pinctrl/mediatek/pinctrl-mtk-common.c +3 -2
@@ -1256,9 +1256,10 @@ static void mtk_eint_irq_handler(struct irq_desc *desc)const struct mtk_desc_pin *pin;chained_irq_enter (chip, desc); -for (eint_num =0 ; eint_num < pctl->devdata->ap_num; eint_num +=32 ) { +for (eint_num =0 ; + eint_num < pctl->devdata->ap_num; + eint_num +=32 , reg +=4 ) { status =readl (reg); - reg +=4 ;while (status) { offset =__ffs (status); index = eint_num + offset;
drivers/scsi/scsi_devinfo.c +1 -0
@@ -230,6 +230,7 @@ static struct { {"PIONEER", "CD-ROM DRM-624X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"Promise", "VTrak E610f", NULL, BLIST_SPARSELUN | BLIST_NO_RSOC}, {"Promise", "", NULL, BLIST_SPARSELUN}, + {"QEMU", "QEMU CD-ROM", NULL, BLIST_SKIP_VPD_PAGES}, {"QNAP", "iSCSI Storage", NULL, BLIST_MAX_1024}, {"SYNOLOGY", "iSCSI Storage", NULL, BLIST_MAX_1024}, {"QUANTUM", "XP34301", "1071", BLIST_NOTQ},
drivers/scsi/scsi_lib.c +5 -2
@@ -911,9 +911,12 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) }/* -* If we finished all bytes in the request we are done now. +* special case: failed zero length commands always need to +* drop down into the retry code. Otherwise, if we finished +* all bytes in the request we are done now. */ -if (!scsi_end_request (req, error, good_bytes,0 )) +if (!(blk_rq_bytes (req) ==0 && error) && + !scsi_end_request (req, error, good_bytes,0 ))return ;/*
fs/dcache.c +2 -2
@@ -1619,7 +1619,7 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)struct dentry *dentry =__d_alloc (parent->d_sb, name);if (!dentry)return NULL ; - + dentry->d_flags |=DCACHE_RCUACCESS ;spin_lock (&parent->d_lock);/* * don't need child lock because it is not subject
@@ -2338,7 +2338,6 @@ static void __d_rehash(struct dentry * entry, struct hlist_bl_head *b) {BUG_ON (!d_unhashed (entry));hlist_bl_lock (b); - entry->d_flags |=DCACHE_RCUACCESS ;hlist_bl_add_head_rcu (&entry->d_hash, b);hlist_bl_unlock (b); }
@@ -2637,6 +2636,7 @@ static void __d_move(struct dentry *dentry, struct dentry *target,/* ... and switch them in the tree */ if (IS_ROOT (dentry)) {/* splicing a tree */ + dentry->d_flags |=DCACHE_RCUACCESS ; dentry->d_parent = target->d_parent; target->d_parent = target;list_del_init (&target->d_child);
fs/ecryptfs/kthread.c +11 -2
@@ -25,6 +25,7 @@#include <linux/slab.h> #include <linux/wait.h> #include <linux/mount.h> +#include <linux/file.h> #include "ecryptfs_kernel.h" struct ecryptfs_open_req {
@@ -147,7 +148,7 @@ int ecryptfs_privileged_open(struct file **lower_file, flags |=IS_RDONLY (d_inode (lower_dentry)) ?O_RDONLY :O_RDWR ; (*lower_file) =dentry_open (&req.path, flags, cred);if (!IS_ERR (*lower_file)) - goto out; + goto have_file;if ((flags &O_ACCMODE ) ==O_RDONLY ) { rc =PTR_ERR ((*lower_file)); goto out;
@@ -165,8 +166,16 @@ int ecryptfs_privileged_open(struct file **lower_file,mutex_unlock (&ecryptfs_kthread_ctl.mux);wake_up (&ecryptfs_kthread_ctl.wait);wait_for_completion (&req.done); -if (IS_ERR (*lower_file)) +if (IS_ERR (*lower_file)) { rc =PTR_ERR (*lower_file); + goto out; + } +have_file: +if ((*lower_file)->f_op->mmap ==NULL ) { +fput (*lower_file); + *lower_file =NULL ; + rc = -EMEDIUMTYPE ; + } out:return rc; }
fs/proc/root.c +7 -0
@@ -121,6 +121,13 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,if (IS_ERR (sb))return ERR_CAST (sb); +/* +* procfs isn't actually a stacking filesystem; however, there is +* too much magic going on inside it to permit stacking things on +* top of it +*/ + sb->s_stack_depth =FILESYSTEM_MAX_STACK_DEPTH ; +if (!proc_parse_options (options, ns)) {deactivate_locked_super (sb);return ERR_PTR (-EINVAL );
include/linux/irqchip/arm-gic-v3.h +1 -1
@@ -301,7 +301,7 @@#define ICC_SGI1R_AFFINITY_1_SHIFT 16#define ICC_SGI1R_AFFINITY_1_MASK (0xff << ICC_SGI1R_AFFINITY_1_SHIFT)#define ICC_SGI1R_SGI_ID_SHIFT 24 -#define ICC_SGI1R_SGI_ID_MASK (0xff << ICC_SGI1R_SGI_ID_SHIFT) +#define ICC_SGI1R_SGI_ID_MASK (0xfULL << ICC_SGI1R_SGI_ID_SHIFT)#define ICC_SGI1R_AFFINITY_2_SHIFT 32#define ICC_SGI1R_AFFINITY_2_MASK (0xffULL << ICC_SGI1R_AFFINITY_1_SHIFT)#define ICC_SGI1R_IRQ_ROUTING_MODE_BIT 40
include/linux/netfilter/x_tables.h +11 -1
@@ -242,11 +242,18 @@ void xt_unregister_match(struct xt_match *target);int xt_register_matches (struct xt_match *match,unsigned int n);void xt_unregister_matches (struct xt_match *match,unsigned int n); +int xt_check_entry_offsets (const void *base,const char *elems, +unsigned int target_offset, +unsigned int next_offset); +int xt_check_match (struct xt_mtchk_param *,unsigned int size,u_int8_t proto,bool inv_proto);int xt_check_target (struct xt_tgchk_param *,unsigned int size,u_int8_t proto,bool inv_proto); +void *xt_copy_counters_from_user (const void __user *user,unsigned int len, +struct xt_counters_info *info,bool compat); + struct xt_table *xt_register_table(struct net *net, const struct xt_table *table, struct xt_table_info *bootstrap,
@@ -480,7 +487,7 @@ void xt_compat_init_offsets(u_int8_t af, unsigned int number);int xt_compat_calc_jump (u_int8_t af,unsigned int offset);int xt_compat_match_offset (const struct xt_match *match); -int xt_compat_match_from_user (struct xt_entry_match *m,void **dstptr, +void xt_compat_match_from_user (struct xt_entry_match *m,void **dstptr,unsigned int *size);int xt_compat_match_to_user (const struct xt_entry_match *m,void __user **dstptr,unsigned int *size);
@@ -490,6 +497,9 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr, unsigned int *size);int xt_compat_target_to_user (const struct xt_entry_target *t,void __user **dstptr,unsigned int *size); +int xt_compat_check_entry_offsets (const void *base,const char *elems, +unsigned int target_offset, +unsigned int next_offset);#endif /* CONFIG_COMPAT */ #endif /* _X_TABLES_H */
include/net/switchdev.h +1 -1
@@ -97,7 +97,7 @@ struct switchdev_obj_ipv4_fib {struct switchdev_obj obj;u32 dst;int dst_len; -struct fib_info fi; +struct fib_info *fi;u8 tos;u8 type;u32 nlflags;
include/uapi/linux/libc-compat.h +1 -1
@@ -52,7 +52,7 @@#if defined(__GLIBC__)/* Coordinate with glibc net/if.h header. */ -#if defined(_NET_IF_H) +#if defined(_NET_IF_H) && defined(__USE_MISC)/* GLIBC headers included first so don't define anything * that would already be defined. */
kernel/bpf/inode.c +1 -2
@@ -378,7 +378,7 @@ static int bpf_fill_super(struct super_block *sb, void *data, int silent)static struct dentry *bpf_mount (struct file_system_type *type,int flags,const char *dev_name,void *data) { -return mount_ns (type, flags, current->nsproxy->mnt_ns, bpf_fill_super); +return mount_nodev (type, flags, data, bpf_fill_super); }static struct file_system_type bpf_fs_type = {
@@ -386,7 +386,6 @@ static struct file_system_type bpf_fs_type = { .name = "bpf", .mount = bpf_mount, .kill_sb = kill_litter_super, - .fs_flags = FS_USERNS_MOUNT, };MODULE_ALIAS_FS ("bpf" );
kernel/sched/core.c +2 -1
@@ -3047,7 +3047,8 @@ static noinline void __schedule_bug(struct task_struct *prev)static inline void schedule_debug (struct task_struct *prev) {#ifdef CONFIG_SCHED_STACK_END_CHECK -BUG_ON (task_stack_end_corrupted (prev)); +if (task_stack_end_corrupted (prev)) +panic ("corrupted stack end detected inside scheduler\n" );#endif if (unlikely (in_atomic_preempt_off ())) {
kernel/trace/bpf_trace.c +2 -2
@@ -194,7 +194,7 @@ static u64 bpf_perf_event_read(u64 r1, u64 index, u64 r3, u64 r4, u64 r5)if (unlikely (index >= array->map.max_entries))return -E2BIG ; - file = (struct file *)array->ptrs[index]; + file =READ_ONCE (array->ptrs[index]);if (unlikely (!file))return -ENOENT ;
@@ -238,7 +238,7 @@ static u64 bpf_perf_event_output(u64 r1, u64 r2, u64 index, u64 r4, u64 size)if (unlikely (index >= array->map.max_entries))return -E2BIG ; - file = (struct file *)array->ptrs[index]; + file =READ_ONCE (array->ptrs[index]);if (unlikely (!file))return -ENOENT ;
mm/memcontrol.c +3 -0
@@ -2877,6 +2877,7 @@ static void memcg_offline_kmem(struct mem_cgroup *memcg)* ordering is imposed by list_lru_node->lock taken by * memcg_drain_all_list_lrus(). */ +rcu_read_lock ();/* can be called from css_free w/o cgroup_mutex */ css_for_each_descendant_pre (css, &memcg->css) { child =mem_cgroup_from_css (css);BUG_ON (child->kmemcg_id != kmemcg_id);
@@ -2884,6 +2885,8 @@ static void memcg_offline_kmem(struct mem_cgroup *memcg)if (!memcg->use_hierarchy)break ; } +rcu_read_unlock (); +memcg_drain_all_list_lrus (kmemcg_id, parent->kmemcg_id);memcg_free_cache_id (kmemcg_id);
mm/swap_state.c +4 -1
@@ -252,7 +252,10 @@ static inline void free_swap_cache(struct page *page)void free_page_and_swap_cache (struct page *page) {free_swap_cache (page); -put_page (page); +if (is_huge_zero_page (page)) +put_huge_zero_page (); +else +put_page (page); }/*
net/bridge/br_fdb.c +2 -0
@@ -279,6 +279,8 @@ void br_fdb_change_mac_address(struct net_bridge *br, const u8 *newaddr)* change from under us. */ list_for_each_entry (v, &vg->vlan_list, vlist) { +if (!br_vlan_should_use (v)) +continue ; f =__br_fdb_get (br, br->dev->dev_addr, v->vid);if (f && f->is_local && !f->dst)fdb_delete_local (br,NULL , f);
net/core/hwbm.c +3 -0
@@ -55,18 +55,21 @@ int hwbm_pool_add(struct hwbm_pool *bm_pool, unsigned int buf_num, gfp_t gfp)spin_lock_irqsave (&bm_pool->lock, flags);if (bm_pool->buf_num == bm_pool->size) {pr_warn ("pool already filled\n" ); +spin_unlock_irqrestore (&bm_pool->lock, flags);return bm_pool->buf_num; }if (buf_num + bm_pool->buf_num > bm_pool->size) {pr_warn ("cannot allocate %d buffers for pool\n" , buf_num); +spin_unlock_irqrestore (&bm_pool->lock, flags);return 0 ; }if ((buf_num + bm_pool->buf_num) < bm_pool->buf_num) {pr_warn ("Adding %d buffers to the %d current buffers will overflow\n" , buf_num, bm_pool->buf_num); +spin_unlock_irqrestore (&bm_pool->lock, flags);return 0 ; }
net/ipv4/af_inet.c +8 -0
@@ -1660,6 +1660,14 @@ static __net_init int inet_init_net(struct net *net)*/ net->ipv4.ping_group_range.range[0 ] =make_kgid (&init_user_ns,1 ); net->ipv4.ping_group_range.range[1 ] =make_kgid (&init_user_ns,0 ); + +/* Default values for sysctl-controlled parameters. +* We set them here, in case sysctl is not compiled. +*/ + net->ipv4.sysctl_ip_default_ttl =IPDEFTTL ; + net->ipv4.sysctl_ip_dynaddr =0 ; + net->ipv4.sysctl_ip_early_demux =1 ; +return 0 ; }
net/ipv4/netfilter/arp_tables.c +89 -204
470 lines not on this page · raw message
net/ipv4/netfilter/ip_tables.c +86 -232
504 lines not on this page · raw message
net/ipv4/sysctl_net_ipv4.c +0 -4
@@ -988,10 +988,6 @@ static __net_init int ipv4_sysctl_init_net(struct net *net)if (!net->ipv4.sysctl_local_reserved_ports) goto err_ports; - net->ipv4.sysctl_ip_default_ttl =IPDEFTTL ; - net->ipv4.sysctl_ip_dynaddr =0 ; - net->ipv4.sysctl_ip_early_demux =1 ; -return 0 ; err_ports:
net/ipv4/udp.c +1 -1
@@ -1616,7 +1616,7 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)/* if we're overly short, let UDP handle it */ encap_rcv =ACCESS_ONCE (up->encap_rcv); -if (skb->len >sizeof (struct udphdr ) && encap_rcv) { +if (encap_rcv) {int ret;/* Verify checksum before giving to encap */
net/ipv6/ip6_output.c +3 -8
@@ -1071,17 +1071,12 @@ struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6, const struct in6_addr *final_dst) {struct dst_entry *dst =sk_dst_check (sk,inet6_sk (sk)->dst_cookie); -int err; dst =ip6_sk_dst_check (sk, dst, fl6); +if (!dst) + dst =ip6_dst_lookup_flow (sk, fl6, final_dst); - err =ip6_dst_lookup_tail (sock_net (sk), sk, &dst, fl6); -if (err) -return ERR_PTR (err); -if (final_dst) - fl6->daddr = *final_dst; - -return xfrm_lookup_route (sock_net (sk), dst,flowi6_to_flowi (fl6), sk,0 ); +return dst; }EXPORT_SYMBOL_GPL (ip6_sk_dst_lookup_flow);
net/ipv6/netfilter/ip6_tables.c +79 -232
13 lines not on this page · raw message
net/netfilter/x_tables.c +242 -3
245 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +68 -5
73 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.