mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-27 17:21:34 +00:00
Upgrade Pine64 kernel to 3.10.75
3.10.76 currently breaks aufs
This commit is contained in:
parent
1ac698cfa7
commit
0d282c9587
8 changed files with 10472 additions and 0 deletions
2323
patch/kernel/pine64-default/01-patch-3.10.67-68-e.patch
Normal file
2323
patch/kernel/pine64-default/01-patch-3.10.67-68-e.patch
Normal file
File diff suppressed because it is too large
Load diff
776
patch/kernel/pine64-default/01-patch-3.10.68-69-e.patch
Normal file
776
patch/kernel/pine64-default/01-patch-3.10.68-69-e.patch
Normal file
|
@ -0,0 +1,776 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index dd67be657716..81ede20061cf 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 68
|
||||
+SUBLEVEL = 69
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h
|
||||
index cf2749488cd4..be9b5ca9a6c0 100644
|
||||
--- a/arch/arm64/include/asm/cputype.h
|
||||
+++ b/arch/arm64/include/asm/cputype.h
|
||||
@@ -74,6 +74,8 @@ static inline u32 __attribute_const__ read_cpuid_cachetype(void)
|
||||
return read_cpuid(ID_CTR_EL0);
|
||||
}
|
||||
|
||||
+void cpuinfo_store_cpu(void);
|
||||
+
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif
|
||||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
|
||||
index add6ea616843..7cc551d1b0e1 100644
|
||||
--- a/arch/arm64/kernel/setup.c
|
||||
+++ b/arch/arm64/kernel/setup.c
|
||||
@@ -43,7 +43,7 @@
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/efi.h>
|
||||
#include <linux/sys_config.h>
|
||||
-
|
||||
+#include <linux/personality.h>
|
||||
#include <asm/fixmap.h>
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/elf.h>
|
||||
@@ -97,6 +98,19 @@ void __init early_print(const char *str, ...)
|
||||
printk("%s", buf);
|
||||
}
|
||||
|
||||
+struct cpuinfo_arm64 {
|
||||
+ struct cpu cpu;
|
||||
+ u32 reg_midr;
|
||||
+};
|
||||
+
|
||||
+static DEFINE_PER_CPU(struct cpuinfo_arm64, cpu_data);
|
||||
+
|
||||
+void cpuinfo_store_cpu(void)
|
||||
+{
|
||||
+ struct cpuinfo_arm64 *info = this_cpu_ptr(&cpu_data);
|
||||
+ info->reg_midr = read_cpuid_id();
|
||||
+}
|
||||
+
|
||||
static void __init setup_processor(void)
|
||||
{
|
||||
struct cpu_info *cpu_info;
|
||||
@@ -127,6 +141,8 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
|
||||
struct boot_param_header *devtree;
|
||||
unsigned long dt_root;
|
||||
|
||||
+ cpuinfo_store_cpu();
|
||||
+
|
||||
/* Check we have a non-NULL DT pointer */
|
||||
if (!dt_phys) {
|
||||
early_print("\n"
|
||||
@@ -290,14 +306,12 @@ static int __init arm64_device_init(void)
|
||||
}
|
||||
arch_initcall(arm64_device_init);
|
||||
|
||||
-static DEFINE_PER_CPU(struct cpu, cpu_data);
|
||||
-
|
||||
static int __init topology_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
- struct cpu *cpu = &per_cpu(cpu_data, i);
|
||||
+ struct cpu *cpu = &per_cpu(cpu_data.cpu, i);
|
||||
cpu->hotpluggable = 1;
|
||||
register_cpu(cpu, i);
|
||||
}
|
||||
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
|
||||
index 9c93e126328c..b0a8703a25ec 100644
|
||||
--- a/arch/arm64/kernel/smp.c
|
||||
+++ b/arch/arm64/kernel/smp.c
|
||||
@@ -200,6 +200,11 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
|
||||
raw_spin_unlock(&boot_lock);
|
||||
|
||||
/*
|
||||
+ * Log the CPU info before it is marked online and might get read.
|
||||
+ */
|
||||
+ cpuinfo_store_cpu();
|
||||
+
|
||||
+ /*
|
||||
* OK, now it's safe to let the boot CPU continue. Wait for
|
||||
* the CPU migration code to notice that the CPU is online
|
||||
* before we continue.
|
||||
diff --git a/arch/mips/kernel/irq_cpu.c b/arch/mips/kernel/irq_cpu.c
|
||||
index 72ef2d25cbf2..ab941a366012 100644
|
||||
--- a/arch/mips/kernel/irq_cpu.c
|
||||
+++ b/arch/mips/kernel/irq_cpu.c
|
||||
@@ -56,6 +56,8 @@ static struct irq_chip mips_cpu_irq_controller = {
|
||||
.irq_mask_ack = mask_mips_irq,
|
||||
.irq_unmask = unmask_mips_irq,
|
||||
.irq_eoi = unmask_mips_irq,
|
||||
+ .irq_disable = mask_mips_irq,
|
||||
+ .irq_enable = unmask_mips_irq,
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -92,6 +94,8 @@ static struct irq_chip mips_mt_cpu_irq_controller = {
|
||||
.irq_mask_ack = mips_mt_cpu_irq_ack,
|
||||
.irq_unmask = unmask_mips_irq,
|
||||
.irq_eoi = unmask_mips_irq,
|
||||
+ .irq_disable = mask_mips_irq,
|
||||
+ .irq_enable = unmask_mips_irq,
|
||||
};
|
||||
|
||||
void __init mips_cpu_irq_init(void)
|
||||
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
|
||||
index 6e7862ab46cc..caeec21df1c4 100644
|
||||
--- a/arch/mips/kernel/smp.c
|
||||
+++ b/arch/mips/kernel/smp.c
|
||||
@@ -109,10 +109,10 @@ asmlinkage __cpuinit void start_secondary(void)
|
||||
else
|
||||
#endif /* CONFIG_MIPS_MT_SMTC */
|
||||
cpu_probe();
|
||||
- cpu_report();
|
||||
per_cpu_trap_init(false);
|
||||
mips_clockevent_init();
|
||||
mp_ops->init_secondary();
|
||||
+ cpu_report();
|
||||
|
||||
/*
|
||||
* XXX parity protection should be folded in here when it's converted
|
||||
diff --git a/arch/x86/include/uapi/asm/vmx.h b/arch/x86/include/uapi/asm/vmx.h
|
||||
index 7a34e8fe54bd..dccea7f29051 100644
|
||||
--- a/arch/x86/include/uapi/asm/vmx.h
|
||||
+++ b/arch/x86/include/uapi/asm/vmx.h
|
||||
@@ -67,6 +67,7 @@
|
||||
#define EXIT_REASON_EPT_MISCONFIG 49
|
||||
#define EXIT_REASON_INVEPT 50
|
||||
#define EXIT_REASON_PREEMPTION_TIMER 52
|
||||
+#define EXIT_REASON_INVVPID 53
|
||||
#define EXIT_REASON_WBINVD 54
|
||||
#define EXIT_REASON_XSETBV 55
|
||||
#define EXIT_REASON_APIC_WRITE 56
|
||||
@@ -112,6 +113,7 @@
|
||||
{ EXIT_REASON_EOI_INDUCED, "EOI_INDUCED" }, \
|
||||
{ EXIT_REASON_INVALID_STATE, "INVALID_STATE" }, \
|
||||
{ EXIT_REASON_INVD, "INVD" }, \
|
||||
+ { EXIT_REASON_INVVPID, "INVVPID" }, \
|
||||
{ EXIT_REASON_INVPCID, "INVPCID" }, \
|
||||
{ EXIT_REASON_PREEMPTION_TIMER, "PREEMPTION_TIMER" }
|
||||
|
||||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
|
||||
index 7112be5f1eaf..04cc2fa7744f 100644
|
||||
--- a/arch/x86/kvm/vmx.c
|
||||
+++ b/arch/x86/kvm/vmx.c
|
||||
@@ -438,6 +438,7 @@ struct vcpu_vmx {
|
||||
#endif
|
||||
int gs_ldt_reload_needed;
|
||||
int fs_reload_needed;
|
||||
+ unsigned long vmcs_host_cr4; /* May not match real cr4 */
|
||||
} host_state;
|
||||
struct {
|
||||
int vm86_active;
|
||||
@@ -4076,11 +4077,16 @@ static void vmx_set_constant_host_state(struct vcpu_vmx *vmx)
|
||||
u32 low32, high32;
|
||||
unsigned long tmpl;
|
||||
struct desc_ptr dt;
|
||||
+ unsigned long cr4;
|
||||
|
||||
vmcs_writel(HOST_CR0, read_cr0() & ~X86_CR0_TS); /* 22.2.3 */
|
||||
- vmcs_writel(HOST_CR4, read_cr4()); /* 22.2.3, 22.2.5 */
|
||||
vmcs_writel(HOST_CR3, read_cr3()); /* 22.2.3 FIXME: shadow tables */
|
||||
|
||||
+ /* Save the most likely value for this task's CR4 in the VMCS. */
|
||||
+ cr4 = read_cr4();
|
||||
+ vmcs_writel(HOST_CR4, cr4); /* 22.2.3, 22.2.5 */
|
||||
+ vmx->host_state.vmcs_host_cr4 = cr4;
|
||||
+
|
||||
vmcs_write16(HOST_CS_SELECTOR, __KERNEL_CS); /* 22.2.4 */
|
||||
#ifdef CONFIG_X86_64
|
||||
/*
|
||||
@@ -6248,6 +6254,12 @@ static int handle_invept(struct kvm_vcpu *vcpu)
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static int handle_invvpid(struct kvm_vcpu *vcpu)
|
||||
+{
|
||||
+ kvm_queue_exception(vcpu, UD_VECTOR);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* The exit handlers return 1 if the exit was handled fully and guest execution
|
||||
* may resume. Otherwise they set the kvm_run parameter to indicate what needs
|
||||
@@ -6293,6 +6305,7 @@ static int (*const kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = {
|
||||
[EXIT_REASON_MWAIT_INSTRUCTION] = handle_invalid_op,
|
||||
[EXIT_REASON_MONITOR_INSTRUCTION] = handle_invalid_op,
|
||||
[EXIT_REASON_INVEPT] = handle_invept,
|
||||
+ [EXIT_REASON_INVVPID] = handle_invvpid,
|
||||
};
|
||||
|
||||
static const int kvm_vmx_max_exit_handlers =
|
||||
@@ -6519,7 +6532,7 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
|
||||
case EXIT_REASON_VMPTRST: case EXIT_REASON_VMREAD:
|
||||
case EXIT_REASON_VMRESUME: case EXIT_REASON_VMWRITE:
|
||||
case EXIT_REASON_VMOFF: case EXIT_REASON_VMON:
|
||||
- case EXIT_REASON_INVEPT:
|
||||
+ case EXIT_REASON_INVEPT: case EXIT_REASON_INVVPID:
|
||||
/*
|
||||
* VMX instructions trap unconditionally. This allows L1 to
|
||||
* emulate them for its L2 guest, i.e., allows 3-level nesting!
|
||||
@@ -6964,7 +6977,7 @@ static void atomic_switch_perf_msrs(struct vcpu_vmx *vmx)
|
||||
static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||
- unsigned long debugctlmsr;
|
||||
+ unsigned long debugctlmsr, cr4;
|
||||
|
||||
/* Record the guest's net vcpu time for enforced NMI injections. */
|
||||
if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked))
|
||||
@@ -6985,6 +6998,12 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
|
||||
if (test_bit(VCPU_REGS_RIP, (unsigned long *)&vcpu->arch.regs_dirty))
|
||||
vmcs_writel(GUEST_RIP, vcpu->arch.regs[VCPU_REGS_RIP]);
|
||||
|
||||
+ cr4 = read_cr4();
|
||||
+ if (unlikely(cr4 != vmx->host_state.vmcs_host_cr4)) {
|
||||
+ vmcs_writel(HOST_CR4, cr4);
|
||||
+ vmx->host_state.vmcs_host_cr4 = cr4;
|
||||
+ }
|
||||
+
|
||||
/* When single-stepping over STI and MOV SS, we must clear the
|
||||
* corresponding interruptibility bits in the guest state. Otherwise
|
||||
* vmentry fails as it then expects bit 14 (BS) in pending debug
|
||||
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
|
||||
index 981c2dbd72cc..88f143d9754e 100644
|
||||
--- a/arch/x86/pci/common.c
|
||||
+++ b/arch/x86/pci/common.c
|
||||
@@ -448,6 +448,22 @@ static const struct dmi_system_id pciprobe_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ftServer"),
|
||||
},
|
||||
},
|
||||
+ {
|
||||
+ .callback = set_scan_all,
|
||||
+ .ident = "Stratus/NEC ftServer",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R32"),
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ .callback = set_scan_all,
|
||||
+ .ident = "Stratus/NEC ftServer",
|
||||
+ .matches = {
|
||||
+ DMI_MATCH(DMI_SYS_VENDOR, "NEC"),
|
||||
+ DMI_MATCH(DMI_PRODUCT_NAME, "Express5800/R31"),
|
||||
+ },
|
||||
+ },
|
||||
{}
|
||||
};
|
||||
|
||||
diff --git a/crypto/crc32c.c b/crypto/crc32c.c
|
||||
index 06f7018c9d95..238f0e627ef3 100644
|
||||
--- a/crypto/crc32c.c
|
||||
+++ b/crypto/crc32c.c
|
||||
@@ -170,3 +170,4 @@ module_exit(crc32c_mod_fini);
|
||||
MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>");
|
||||
MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations wrapper for lib/crc32c");
|
||||
MODULE_LICENSE("GPL");
|
||||
+MODULE_ALIAS_CRYPTO("crc32c");
|
||||
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
|
||||
index 1d74a80e031e..ca1cb2d756c2 100644
|
||||
--- a/drivers/gpio/gpiolib.c
|
||||
+++ b/drivers/gpio/gpiolib.c
|
||||
@@ -874,6 +874,7 @@ static int gpiod_export_link(struct device *dev, const char *name,
|
||||
if (tdev != NULL) {
|
||||
status = sysfs_create_link(&dev->kobj, &tdev->kobj,
|
||||
name);
|
||||
+ put_device(tdev);
|
||||
} else {
|
||||
status = -ENODEV;
|
||||
}
|
||||
@@ -927,7 +928,7 @@ static int gpiod_sysfs_set_active_low(struct gpio_desc *desc, int value)
|
||||
}
|
||||
|
||||
status = sysfs_set_active_low(desc, dev, value);
|
||||
-
|
||||
+ put_device(dev);
|
||||
unlock:
|
||||
mutex_unlock(&sysfs_lock);
|
||||
|
||||
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
|
||||
index 4635788e14bf..ec9770f42538 100644
|
||||
--- a/fs/ext4/file.c
|
||||
+++ b/fs/ext4/file.c
|
||||
@@ -100,7 +100,7 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
struct blk_plug plug;
|
||||
int unaligned_aio = 0;
|
||||
ssize_t ret;
|
||||
- int overwrite = 0;
|
||||
+ int *overwrite = iocb->private;
|
||||
size_t length = iov_length(iov, nr_segs);
|
||||
|
||||
if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS) &&
|
||||
@@ -118,8 +118,6 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
mutex_lock(&inode->i_mutex);
|
||||
blk_start_plug(&plug);
|
||||
|
||||
- iocb->private = &overwrite;
|
||||
-
|
||||
/* check whether we do a DIO overwrite or not */
|
||||
if (ext4_should_dioread_nolock(inode) && !unaligned_aio &&
|
||||
!file->f_mapping->nrpages && pos + length <= i_size_read(inode)) {
|
||||
@@ -143,7 +141,7 @@ ext4_file_dio_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
* So we should check these two conditions.
|
||||
*/
|
||||
if (err == len && (map.m_flags & EXT4_MAP_MAPPED))
|
||||
- overwrite = 1;
|
||||
+ *overwrite = 1;
|
||||
}
|
||||
|
||||
ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos);
|
||||
@@ -170,6 +168,7 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
{
|
||||
struct inode *inode = file_inode(iocb->ki_filp);
|
||||
ssize_t ret;
|
||||
+ int overwrite = 0;
|
||||
|
||||
/*
|
||||
* If we have encountered a bitmap-format file, the size limit
|
||||
@@ -190,6 +189,7 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
}
|
||||
}
|
||||
|
||||
+ iocb->private = &overwrite;
|
||||
if (unlikely(iocb->ki_filp->f_flags & O_DIRECT))
|
||||
ret = ext4_file_dio_write(iocb, iov, nr_segs, pos);
|
||||
else
|
||||
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h
|
||||
index 9bc72dec3fa6..b02c202223a6 100644
|
||||
--- a/fs/nilfs2/nilfs.h
|
||||
+++ b/fs/nilfs2/nilfs.h
|
||||
@@ -141,7 +141,6 @@ enum {
|
||||
* @ti_save: Backup of journal_info field of task_struct
|
||||
* @ti_flags: Flags
|
||||
* @ti_count: Nest level
|
||||
- * @ti_garbage: List of inode to be put when releasing semaphore
|
||||
*/
|
||||
struct nilfs_transaction_info {
|
||||
u32 ti_magic;
|
||||
@@ -150,7 +149,6 @@ struct nilfs_transaction_info {
|
||||
one of other filesystems has a bug. */
|
||||
unsigned short ti_flags;
|
||||
unsigned short ti_count;
|
||||
- struct list_head ti_garbage;
|
||||
};
|
||||
|
||||
/* ti_magic */
|
||||
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
|
||||
index 958a5b57ed4a..b3c95c1a4700 100644
|
||||
--- a/fs/nilfs2/segment.c
|
||||
+++ b/fs/nilfs2/segment.c
|
||||
@@ -305,7 +305,6 @@ static void nilfs_transaction_lock(struct super_block *sb,
|
||||
ti->ti_count = 0;
|
||||
ti->ti_save = cur_ti;
|
||||
ti->ti_magic = NILFS_TI_MAGIC;
|
||||
- INIT_LIST_HEAD(&ti->ti_garbage);
|
||||
current->journal_info = ti;
|
||||
|
||||
for (;;) {
|
||||
@@ -332,8 +331,6 @@ static void nilfs_transaction_unlock(struct super_block *sb)
|
||||
|
||||
up_write(&nilfs->ns_segctor_sem);
|
||||
current->journal_info = ti->ti_save;
|
||||
- if (!list_empty(&ti->ti_garbage))
|
||||
- nilfs_dispose_list(nilfs, &ti->ti_garbage, 0);
|
||||
}
|
||||
|
||||
static void *nilfs_segctor_map_segsum_entry(struct nilfs_sc_info *sci,
|
||||
@@ -746,6 +743,15 @@ static void nilfs_dispose_list(struct the_nilfs *nilfs,
|
||||
}
|
||||
}
|
||||
|
||||
+static void nilfs_iput_work_func(struct work_struct *work)
|
||||
+{
|
||||
+ struct nilfs_sc_info *sci = container_of(work, struct nilfs_sc_info,
|
||||
+ sc_iput_work);
|
||||
+ struct the_nilfs *nilfs = sci->sc_super->s_fs_info;
|
||||
+
|
||||
+ nilfs_dispose_list(nilfs, &sci->sc_iput_queue, 0);
|
||||
+}
|
||||
+
|
||||
static int nilfs_test_metadata_dirty(struct the_nilfs *nilfs,
|
||||
struct nilfs_root *root)
|
||||
{
|
||||
@@ -1899,8 +1905,8 @@ static int nilfs_segctor_collect_dirty_files(struct nilfs_sc_info *sci,
|
||||
static void nilfs_segctor_drop_written_files(struct nilfs_sc_info *sci,
|
||||
struct the_nilfs *nilfs)
|
||||
{
|
||||
- struct nilfs_transaction_info *ti = current->journal_info;
|
||||
struct nilfs_inode_info *ii, *n;
|
||||
+ int defer_iput = false;
|
||||
|
||||
spin_lock(&nilfs->ns_inode_lock);
|
||||
list_for_each_entry_safe(ii, n, &sci->sc_dirty_files, i_dirty) {
|
||||
@@ -1911,9 +1917,24 @@ static void nilfs_segctor_drop_written_files(struct nilfs_sc_info *sci,
|
||||
clear_bit(NILFS_I_BUSY, &ii->i_state);
|
||||
brelse(ii->i_bh);
|
||||
ii->i_bh = NULL;
|
||||
- list_move_tail(&ii->i_dirty, &ti->ti_garbage);
|
||||
+ list_del_init(&ii->i_dirty);
|
||||
+ if (!ii->vfs_inode.i_nlink) {
|
||||
+ /*
|
||||
+ * Defer calling iput() to avoid a deadlock
|
||||
+ * over I_SYNC flag for inodes with i_nlink == 0
|
||||
+ */
|
||||
+ list_add_tail(&ii->i_dirty, &sci->sc_iput_queue);
|
||||
+ defer_iput = true;
|
||||
+ } else {
|
||||
+ spin_unlock(&nilfs->ns_inode_lock);
|
||||
+ iput(&ii->vfs_inode);
|
||||
+ spin_lock(&nilfs->ns_inode_lock);
|
||||
+ }
|
||||
}
|
||||
spin_unlock(&nilfs->ns_inode_lock);
|
||||
+
|
||||
+ if (defer_iput)
|
||||
+ schedule_work(&sci->sc_iput_work);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2580,6 +2601,8 @@ static struct nilfs_sc_info *nilfs_segctor_new(struct super_block *sb,
|
||||
INIT_LIST_HEAD(&sci->sc_segbufs);
|
||||
INIT_LIST_HEAD(&sci->sc_write_logs);
|
||||
INIT_LIST_HEAD(&sci->sc_gc_inodes);
|
||||
+ INIT_LIST_HEAD(&sci->sc_iput_queue);
|
||||
+ INIT_WORK(&sci->sc_iput_work, nilfs_iput_work_func);
|
||||
init_timer(&sci->sc_timer);
|
||||
|
||||
sci->sc_interval = HZ * NILFS_SC_DEFAULT_TIMEOUT;
|
||||
@@ -2606,6 +2629,8 @@ static void nilfs_segctor_write_out(struct nilfs_sc_info *sci)
|
||||
ret = nilfs_segctor_construct(sci, SC_LSEG_SR);
|
||||
nilfs_transaction_unlock(sci->sc_super);
|
||||
|
||||
+ flush_work(&sci->sc_iput_work);
|
||||
+
|
||||
} while (ret && retrycount-- > 0);
|
||||
}
|
||||
|
||||
@@ -2630,6 +2655,9 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
|
||||
|| sci->sc_seq_request != sci->sc_seq_done);
|
||||
spin_unlock(&sci->sc_state_lock);
|
||||
|
||||
+ if (flush_work(&sci->sc_iput_work))
|
||||
+ flag = true;
|
||||
+
|
||||
if (flag || !nilfs_segctor_confirm(sci))
|
||||
nilfs_segctor_write_out(sci);
|
||||
|
||||
@@ -2639,6 +2667,12 @@ static void nilfs_segctor_destroy(struct nilfs_sc_info *sci)
|
||||
nilfs_dispose_list(nilfs, &sci->sc_dirty_files, 1);
|
||||
}
|
||||
|
||||
+ if (!list_empty(&sci->sc_iput_queue)) {
|
||||
+ nilfs_warning(sci->sc_super, __func__,
|
||||
+ "iput queue is not empty\n");
|
||||
+ nilfs_dispose_list(nilfs, &sci->sc_iput_queue, 1);
|
||||
+ }
|
||||
+
|
||||
WARN_ON(!list_empty(&sci->sc_segbufs));
|
||||
WARN_ON(!list_empty(&sci->sc_write_logs));
|
||||
|
||||
diff --git a/fs/nilfs2/segment.h b/fs/nilfs2/segment.h
|
||||
index 38a1d0013314..a48d6de1e02c 100644
|
||||
--- a/fs/nilfs2/segment.h
|
||||
+++ b/fs/nilfs2/segment.h
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/buffer_head.h>
|
||||
+#include <linux/workqueue.h>
|
||||
#include <linux/nilfs2_fs.h>
|
||||
#include "nilfs.h"
|
||||
|
||||
@@ -92,6 +93,8 @@ struct nilfs_segsum_pointer {
|
||||
* @sc_nblk_inc: Block count of current generation
|
||||
* @sc_dirty_files: List of files to be written
|
||||
* @sc_gc_inodes: List of GC inodes having blocks to be written
|
||||
+ * @sc_iput_queue: list of inodes for which iput should be done
|
||||
+ * @sc_iput_work: work struct to defer iput call
|
||||
* @sc_freesegs: array of segment numbers to be freed
|
||||
* @sc_nfreesegs: number of segments on @sc_freesegs
|
||||
* @sc_dsync_inode: inode whose data pages are written for a sync operation
|
||||
@@ -135,6 +138,8 @@ struct nilfs_sc_info {
|
||||
|
||||
struct list_head sc_dirty_files;
|
||||
struct list_head sc_gc_inodes;
|
||||
+ struct list_head sc_iput_queue;
|
||||
+ struct work_struct sc_iput_work;
|
||||
|
||||
__u64 *sc_freesegs;
|
||||
size_t sc_nfreesegs;
|
||||
diff --git a/include/sound/ak4113.h b/include/sound/ak4113.h
|
||||
index 2609048c1d44..3a34f6edc2d1 100644
|
||||
--- a/include/sound/ak4113.h
|
||||
+++ b/include/sound/ak4113.h
|
||||
@@ -286,7 +286,7 @@ struct ak4113 {
|
||||
ak4113_write_t *write;
|
||||
ak4113_read_t *read;
|
||||
void *private_data;
|
||||
- unsigned int init:1;
|
||||
+ atomic_t wq_processing;
|
||||
spinlock_t lock;
|
||||
unsigned char regmap[AK4113_WRITABLE_REGS];
|
||||
struct snd_kcontrol *kctls[AK4113_CONTROLS];
|
||||
diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h
|
||||
index 3ce69fd92523..69441161009c 100644
|
||||
--- a/include/sound/ak4114.h
|
||||
+++ b/include/sound/ak4114.h
|
||||
@@ -168,7 +168,7 @@ struct ak4114 {
|
||||
ak4114_write_t * write;
|
||||
ak4114_read_t * read;
|
||||
void * private_data;
|
||||
- unsigned int init: 1;
|
||||
+ atomic_t wq_processing;
|
||||
spinlock_t lock;
|
||||
unsigned char regmap[7];
|
||||
unsigned char txcsb[5];
|
||||
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
|
||||
index 02fc5c933673..7020eecb398b 100644
|
||||
--- a/kernel/smpboot.c
|
||||
+++ b/kernel/smpboot.c
|
||||
@@ -279,6 +279,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)
|
||||
unsigned int cpu;
|
||||
int ret = 0;
|
||||
|
||||
+ get_online_cpus();
|
||||
mutex_lock(&smpboot_threads_lock);
|
||||
for_each_online_cpu(cpu) {
|
||||
ret = __smpboot_create_thread(plug_thread, cpu);
|
||||
@@ -291,6 +292,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread)
|
||||
list_add(&plug_thread->list, &hotplug_threads);
|
||||
out:
|
||||
mutex_unlock(&smpboot_threads_lock);
|
||||
+ put_online_cpus();
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(smpboot_register_percpu_thread);
|
||||
diff --git a/lib/checksum.c b/lib/checksum.c
|
||||
index 129775eb6de6..8b39e86dbab5 100644
|
||||
--- a/lib/checksum.c
|
||||
+++ b/lib/checksum.c
|
||||
@@ -181,6 +181,15 @@ csum_partial_copy(const void *src, void *dst, int len, __wsum sum)
|
||||
EXPORT_SYMBOL(csum_partial_copy);
|
||||
|
||||
#ifndef csum_tcpudp_nofold
|
||||
+static inline u32 from64to32(u64 x)
|
||||
+{
|
||||
+ /* add up 32-bit and 32-bit for 32+c bit */
|
||||
+ x = (x & 0xffffffff) + (x >> 32);
|
||||
+ /* add up carry.. */
|
||||
+ x = (x & 0xffffffff) + (x >> 32);
|
||||
+ return (u32)x;
|
||||
+}
|
||||
+
|
||||
__wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
|
||||
unsigned short len,
|
||||
unsigned short proto,
|
||||
@@ -195,8 +204,7 @@ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
|
||||
#else
|
||||
s += (proto + len) << 8;
|
||||
#endif
|
||||
- s += (s >> 32);
|
||||
- return (__force __wsum)s;
|
||||
+ return (__force __wsum)from64to32(s);
|
||||
}
|
||||
EXPORT_SYMBOL(csum_tcpudp_nofold);
|
||||
#endif
|
||||
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
|
||||
index 2beeabf502c5..9056d22d2880 100644
|
||||
--- a/mm/pagewalk.c
|
||||
+++ b/mm/pagewalk.c
|
||||
@@ -199,7 +199,10 @@ int walk_page_range(unsigned long addr, unsigned long end,
|
||||
*/
|
||||
if ((vma->vm_start <= addr) &&
|
||||
(vma->vm_flags & VM_PFNMAP)) {
|
||||
- next = vma->vm_end;
|
||||
+ if (walk->pte_hole)
|
||||
+ err = walk->pte_hole(addr, next, walk);
|
||||
+ if (err)
|
||||
+ break;
|
||||
pgd = pgd_offset(walk->mm, next);
|
||||
continue;
|
||||
}
|
||||
diff --git a/sound/i2c/other/ak4113.c b/sound/i2c/other/ak4113.c
|
||||
index e04e750a77ed..7a9149bb2a38 100644
|
||||
--- a/sound/i2c/other/ak4113.c
|
||||
+++ b/sound/i2c/other/ak4113.c
|
||||
@@ -56,8 +56,7 @@ static inline unsigned char reg_read(struct ak4113 *ak4113, unsigned char reg)
|
||||
|
||||
static void snd_ak4113_free(struct ak4113 *chip)
|
||||
{
|
||||
- chip->init = 1; /* don't schedule new work */
|
||||
- mb();
|
||||
+ atomic_inc(&chip->wq_processing); /* don't schedule new work */
|
||||
cancel_delayed_work_sync(&chip->work);
|
||||
kfree(chip);
|
||||
}
|
||||
@@ -89,6 +88,7 @@ int snd_ak4113_create(struct snd_card *card, ak4113_read_t *read,
|
||||
chip->write = write;
|
||||
chip->private_data = private_data;
|
||||
INIT_DELAYED_WORK(&chip->work, ak4113_stats);
|
||||
+ atomic_set(&chip->wq_processing, 0);
|
||||
|
||||
for (reg = 0; reg < AK4113_WRITABLE_REGS ; reg++)
|
||||
chip->regmap[reg] = pgm[reg];
|
||||
@@ -139,13 +139,11 @@ static void ak4113_init_regs(struct ak4113 *chip)
|
||||
|
||||
void snd_ak4113_reinit(struct ak4113 *chip)
|
||||
{
|
||||
- chip->init = 1;
|
||||
- mb();
|
||||
- flush_delayed_work(&chip->work);
|
||||
+ if (atomic_inc_return(&chip->wq_processing) == 1)
|
||||
+ cancel_delayed_work_sync(&chip->work);
|
||||
ak4113_init_regs(chip);
|
||||
/* bring up statistics / event queing */
|
||||
- chip->init = 0;
|
||||
- if (chip->kctls[0])
|
||||
+ if (atomic_dec_and_test(&chip->wq_processing))
|
||||
schedule_delayed_work(&chip->work, HZ / 10);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_ak4113_reinit);
|
||||
@@ -632,8 +630,9 @@ static void ak4113_stats(struct work_struct *work)
|
||||
{
|
||||
struct ak4113 *chip = container_of(work, struct ak4113, work.work);
|
||||
|
||||
- if (!chip->init)
|
||||
+ if (atomic_inc_return(&chip->wq_processing) == 1)
|
||||
snd_ak4113_check_rate_and_errors(chip, chip->check_flags);
|
||||
|
||||
- schedule_delayed_work(&chip->work, HZ / 10);
|
||||
+ if (atomic_dec_and_test(&chip->wq_processing))
|
||||
+ schedule_delayed_work(&chip->work, HZ / 10);
|
||||
}
|
||||
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
|
||||
index 5bf4fca19e48..84a1ee7af552 100644
|
||||
--- a/sound/i2c/other/ak4114.c
|
||||
+++ b/sound/i2c/other/ak4114.c
|
||||
@@ -66,8 +66,7 @@ static void reg_dump(struct ak4114 *ak4114)
|
||||
|
||||
static void snd_ak4114_free(struct ak4114 *chip)
|
||||
{
|
||||
- chip->init = 1; /* don't schedule new work */
|
||||
- mb();
|
||||
+ atomic_inc(&chip->wq_processing); /* don't schedule new work */
|
||||
cancel_delayed_work_sync(&chip->work);
|
||||
kfree(chip);
|
||||
}
|
||||
@@ -100,6 +99,7 @@ int snd_ak4114_create(struct snd_card *card,
|
||||
chip->write = write;
|
||||
chip->private_data = private_data;
|
||||
INIT_DELAYED_WORK(&chip->work, ak4114_stats);
|
||||
+ atomic_set(&chip->wq_processing, 0);
|
||||
|
||||
for (reg = 0; reg < 7; reg++)
|
||||
chip->regmap[reg] = pgm[reg];
|
||||
@@ -152,13 +152,11 @@ static void ak4114_init_regs(struct ak4114 *chip)
|
||||
|
||||
void snd_ak4114_reinit(struct ak4114 *chip)
|
||||
{
|
||||
- chip->init = 1;
|
||||
- mb();
|
||||
- flush_delayed_work(&chip->work);
|
||||
+ if (atomic_inc_return(&chip->wq_processing) == 1)
|
||||
+ cancel_delayed_work_sync(&chip->work);
|
||||
ak4114_init_regs(chip);
|
||||
/* bring up statistics / event queing */
|
||||
- chip->init = 0;
|
||||
- if (chip->kctls[0])
|
||||
+ if (atomic_dec_and_test(&chip->wq_processing))
|
||||
schedule_delayed_work(&chip->work, HZ / 10);
|
||||
}
|
||||
|
||||
@@ -612,10 +610,10 @@ static void ak4114_stats(struct work_struct *work)
|
||||
{
|
||||
struct ak4114 *chip = container_of(work, struct ak4114, work.work);
|
||||
|
||||
- if (!chip->init)
|
||||
+ if (atomic_inc_return(&chip->wq_processing) == 1)
|
||||
snd_ak4114_check_rate_and_errors(chip, chip->check_flags);
|
||||
-
|
||||
- schedule_delayed_work(&chip->work, HZ / 10);
|
||||
+ if (atomic_dec_and_test(&chip->wq_processing))
|
||||
+ schedule_delayed_work(&chip->work, HZ / 10);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(snd_ak4114_create);
|
||||
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
|
||||
index f3fdfa07fcb9..c5f79591e68b 100644
|
||||
--- a/sound/soc/atmel/atmel_ssc_dai.c
|
||||
+++ b/sound/soc/atmel/atmel_ssc_dai.c
|
||||
@@ -331,7 +331,6 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
|
||||
struct atmel_pcm_dma_params *dma_params;
|
||||
int dir, channels, bits;
|
||||
u32 tfmr, rfmr, tcmr, rcmr;
|
||||
- int start_event;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
@@ -450,19 +449,10 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
|
||||
* The SSC transmit clock is obtained from the BCLK signal on
|
||||
* on the TK line, and the SSC receive clock is
|
||||
* generated from the transmit clock.
|
||||
- *
|
||||
- * For single channel data, one sample is transferred
|
||||
- * on the falling edge of the LRC clock.
|
||||
- * For two channel data, one sample is
|
||||
- * transferred on both edges of the LRC clock.
|
||||
*/
|
||||
- start_event = ((channels == 1)
|
||||
- ? SSC_START_FALLING_RF
|
||||
- : SSC_START_EDGE_RF);
|
||||
-
|
||||
rcmr = SSC_BF(RCMR_PERIOD, 0)
|
||||
| SSC_BF(RCMR_STTDLY, START_DELAY)
|
||||
- | SSC_BF(RCMR_START, start_event)
|
||||
+ | SSC_BF(RCMR_START, SSC_START_FALLING_RF)
|
||||
| SSC_BF(RCMR_CKI, SSC_CKI_RISING)
|
||||
| SSC_BF(RCMR_CKO, SSC_CKO_NONE)
|
||||
| SSC_BF(RCMR_CKS, SSC_CKS_CLOCK);
|
||||
@@ -470,14 +460,14 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
|
||||
rfmr = SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE)
|
||||
| SSC_BF(RFMR_FSOS, SSC_FSOS_NONE)
|
||||
| SSC_BF(RFMR_FSLEN, 0)
|
||||
- | SSC_BF(RFMR_DATNB, 0)
|
||||
+ | SSC_BF(RFMR_DATNB, (channels - 1))
|
||||
| SSC_BIT(RFMR_MSBF)
|
||||
| SSC_BF(RFMR_LOOP, 0)
|
||||
| SSC_BF(RFMR_DATLEN, (bits - 1));
|
||||
|
||||
tcmr = SSC_BF(TCMR_PERIOD, 0)
|
||||
| SSC_BF(TCMR_STTDLY, START_DELAY)
|
||||
- | SSC_BF(TCMR_START, start_event)
|
||||
+ | SSC_BF(TCMR_START, SSC_START_FALLING_RF)
|
||||
| SSC_BF(TCMR_CKI, SSC_CKI_FALLING)
|
||||
| SSC_BF(TCMR_CKO, SSC_CKO_NONE)
|
||||
| SSC_BF(TCMR_CKS, SSC_CKS_PIN);
|
||||
@@ -486,7 +476,7 @@ static int atmel_ssc_hw_params(struct snd_pcm_substream *substream,
|
||||
| SSC_BF(TFMR_FSDEN, 0)
|
||||
| SSC_BF(TFMR_FSOS, SSC_FSOS_NONE)
|
||||
| SSC_BF(TFMR_FSLEN, 0)
|
||||
- | SSC_BF(TFMR_DATNB, 0)
|
||||
+ | SSC_BF(TFMR_DATNB, (channels - 1))
|
||||
| SSC_BIT(TFMR_MSBF)
|
||||
| SSC_BF(TFMR_DATDEF, 0)
|
||||
| SSC_BF(TFMR_DATLEN, (bits - 1));
|
||||
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
|
||||
index 23670737116e..3b5f565a23a5 100644
|
||||
--- a/sound/soc/codecs/sgtl5000.c
|
||||
+++ b/sound/soc/codecs/sgtl5000.c
|
||||
@@ -1242,6 +1242,9 @@ static int sgtl5000_enable_regulators(struct snd_soc_codec *codec)
|
||||
/* wait for all power rails bring up */
|
||||
udelay(10);
|
||||
|
||||
+ /* Need 8 clocks before I2C accesses */
|
||||
+ udelay(1);
|
||||
+
|
||||
/* read chip information */
|
||||
reg = snd_soc_read(codec, SGTL5000_CHIP_ID);
|
||||
if (((reg & SGTL5000_PARTID_MASK) >> SGTL5000_PARTID_SHIFT) !=
|
569
patch/kernel/pine64-default/01-patch-3.10.69-70.patch
Normal file
569
patch/kernel/pine64-default/01-patch-3.10.69-70.patch
Normal file
|
@ -0,0 +1,569 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 81ede20061cf..402cbb7c27f1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 69
|
||||
+SUBLEVEL = 70
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
|
||||
index 9951e66b8502..7e3f45105f11 100644
|
||||
--- a/drivers/block/rbd.c
|
||||
+++ b/drivers/block/rbd.c
|
||||
@@ -2149,7 +2149,6 @@ static void rbd_img_obj_callback(struct rbd_obj_request *obj_request)
|
||||
rbd_assert(img_request->obj_request_count > 0);
|
||||
rbd_assert(which != BAD_WHICH);
|
||||
rbd_assert(which < img_request->obj_request_count);
|
||||
- rbd_assert(which >= img_request->next_completion);
|
||||
|
||||
spin_lock_irq(&img_request->completion_lock);
|
||||
if (which != img_request->next_completion)
|
||||
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c
|
||||
index e4561264e124..a895ed02da86 100644
|
||||
--- a/drivers/media/rc/ir-lirc-codec.c
|
||||
+++ b/drivers/media/rc/ir-lirc-codec.c
|
||||
@@ -42,11 +42,17 @@ static int ir_lirc_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
||||
return -EINVAL;
|
||||
|
||||
/* Packet start */
|
||||
- if (ev.reset)
|
||||
- return 0;
|
||||
+ if (ev.reset) {
|
||||
+ /* Userspace expects a long space event before the start of
|
||||
+ * the signal to use as a sync. This may be done with repeat
|
||||
+ * packets and normal samples. But if a reset has been sent
|
||||
+ * then we assume that a long time has passed, so we send a
|
||||
+ * space with the maximum time value. */
|
||||
+ sample = LIRC_SPACE(LIRC_VALUE_MASK);
|
||||
+ IR_dprintk(2, "delivering reset sync space to lirc_dev\n");
|
||||
|
||||
/* Carrier reports */
|
||||
- if (ev.carrier_report) {
|
||||
+ } else if (ev.carrier_report) {
|
||||
sample = LIRC_FREQUENCY(ev.carrier);
|
||||
IR_dprintk(2, "carrier report (freq: %d)\n", sample);
|
||||
|
||||
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
|
||||
index af951f343ff6..50104a7e963f 100644
|
||||
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
|
||||
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
|
||||
@@ -2315,7 +2315,10 @@ static int netxen_nic_poll(struct napi_struct *napi, int budget)
|
||||
|
||||
work_done = netxen_process_rcv_ring(sds_ring, budget);
|
||||
|
||||
- if ((work_done < budget) && tx_complete) {
|
||||
+ if (!tx_complete)
|
||||
+ work_done = budget;
|
||||
+
|
||||
+ if (work_done < budget) {
|
||||
napi_complete(&sds_ring->napi);
|
||||
if (test_bit(__NX_DEV_UP, &adapter->state))
|
||||
netxen_nic_enable_int(sds_ring);
|
||||
diff --git a/drivers/net/ppp/ppp_deflate.c b/drivers/net/ppp/ppp_deflate.c
|
||||
index 602c625d95d5..b5edc7f96a39 100644
|
||||
--- a/drivers/net/ppp/ppp_deflate.c
|
||||
+++ b/drivers/net/ppp/ppp_deflate.c
|
||||
@@ -246,7 +246,7 @@ static int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf,
|
||||
/*
|
||||
* See if we managed to reduce the size of the packet.
|
||||
*/
|
||||
- if (olen < isize) {
|
||||
+ if (olen < isize && olen <= osize) {
|
||||
state->stats.comp_bytes += olen;
|
||||
state->stats.comp_packets++;
|
||||
} else {
|
||||
diff --git a/include/net/ip.h b/include/net/ip.h
|
||||
index 8695359982d1..0a62365149e2 100644
|
||||
--- a/include/net/ip.h
|
||||
+++ b/include/net/ip.h
|
||||
@@ -37,11 +37,12 @@ struct inet_skb_parm {
|
||||
struct ip_options opt; /* Compiled IP options */
|
||||
unsigned char flags;
|
||||
|
||||
-#define IPSKB_FORWARDED 1
|
||||
-#define IPSKB_XFRM_TUNNEL_SIZE 2
|
||||
-#define IPSKB_XFRM_TRANSFORMED 4
|
||||
-#define IPSKB_FRAG_COMPLETE 8
|
||||
-#define IPSKB_REROUTED 16
|
||||
+#define IPSKB_FORWARDED BIT(0)
|
||||
+#define IPSKB_XFRM_TUNNEL_SIZE BIT(1)
|
||||
+#define IPSKB_XFRM_TRANSFORMED BIT(2)
|
||||
+#define IPSKB_FRAG_COMPLETE BIT(3)
|
||||
+#define IPSKB_REROUTED BIT(4)
|
||||
+#define IPSKB_DOREDIRECT BIT(5)
|
||||
|
||||
u16 frag_max_size;
|
||||
};
|
||||
@@ -162,7 +163,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
|
||||
return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0;
|
||||
}
|
||||
|
||||
-void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
|
||||
+void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr,
|
||||
__be32 saddr, const struct ip_reply_arg *arg,
|
||||
unsigned int len);
|
||||
|
||||
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
|
||||
index 2ba9de89e8ec..03e6378d5353 100644
|
||||
--- a/include/net/netns/ipv4.h
|
||||
+++ b/include/net/netns/ipv4.h
|
||||
@@ -43,6 +43,7 @@ struct netns_ipv4 {
|
||||
struct inet_peer_base *peers;
|
||||
struct tcpm_hash_bucket *tcp_metrics_hash;
|
||||
unsigned int tcp_metrics_hash_log;
|
||||
+ struct sock * __percpu *tcp_sk;
|
||||
struct netns_frags frags;
|
||||
#ifdef CONFIG_NETFILTER
|
||||
struct xt_table *iptable_filter;
|
||||
diff --git a/net/core/dev.c b/net/core/dev.c
|
||||
index cca7ae0ba915..c310440309bb 100644
|
||||
--- a/net/core/dev.c
|
||||
+++ b/net/core/dev.c
|
||||
@@ -6015,10 +6015,20 @@ static int dev_cpu_callback(struct notifier_block *nfb,
|
||||
oldsd->output_queue = NULL;
|
||||
oldsd->output_queue_tailp = &oldsd->output_queue;
|
||||
}
|
||||
- /* Append NAPI poll list from offline CPU. */
|
||||
- if (!list_empty(&oldsd->poll_list)) {
|
||||
- list_splice_init(&oldsd->poll_list, &sd->poll_list);
|
||||
- raise_softirq_irqoff(NET_RX_SOFTIRQ);
|
||||
+ /* Append NAPI poll list from offline CPU, with one exception :
|
||||
+ * process_backlog() must be called by cpu owning percpu backlog.
|
||||
+ * We properly handle process_queue & input_pkt_queue later.
|
||||
+ */
|
||||
+ while (!list_empty(&oldsd->poll_list)) {
|
||||
+ struct napi_struct *napi = list_first_entry(&oldsd->poll_list,
|
||||
+ struct napi_struct,
|
||||
+ poll_list);
|
||||
+
|
||||
+ list_del_init(&napi->poll_list);
|
||||
+ if (napi->poll == process_backlog)
|
||||
+ napi->state = 0;
|
||||
+ else
|
||||
+ ____napi_schedule(sd, napi);
|
||||
}
|
||||
|
||||
raise_softirq_irqoff(NET_TX_SOFTIRQ);
|
||||
@@ -6029,7 +6039,7 @@ static int dev_cpu_callback(struct notifier_block *nfb,
|
||||
netif_rx(skb);
|
||||
input_queue_head_incr(oldsd);
|
||||
}
|
||||
- while ((skb = __skb_dequeue(&oldsd->input_pkt_queue))) {
|
||||
+ while ((skb = skb_dequeue(&oldsd->input_pkt_queue))) {
|
||||
netif_rx(skb);
|
||||
input_queue_head_incr(oldsd);
|
||||
}
|
||||
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
|
||||
index 25c4dd563a79..279b5dcf09ae 100644
|
||||
--- a/net/core/rtnetlink.c
|
||||
+++ b/net/core/rtnetlink.c
|
||||
@@ -2477,12 +2477,16 @@ static int rtnl_bridge_notify(struct net_device *dev, u16 flags)
|
||||
goto errout;
|
||||
}
|
||||
|
||||
+ if (!skb->len)
|
||||
+ goto errout;
|
||||
+
|
||||
rtnl_notify(skb, net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
|
||||
return 0;
|
||||
errout:
|
||||
WARN_ON(err == -EMSGSIZE);
|
||||
kfree_skb(skb);
|
||||
- rtnl_set_sk_err(net, RTNLGRP_LINK, err);
|
||||
+ if (err)
|
||||
+ rtnl_set_sk_err(net, RTNLGRP_LINK, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
|
||||
index bd1c5baf69be..31ee5c6033df 100644
|
||||
--- a/net/ipv4/ip_forward.c
|
||||
+++ b/net/ipv4/ip_forward.c
|
||||
@@ -175,7 +175,8 @@ int ip_forward(struct sk_buff *skb)
|
||||
* We now generate an ICMP HOST REDIRECT giving the route
|
||||
* we calculated.
|
||||
*/
|
||||
- if (rt->rt_flags&RTCF_DOREDIRECT && !opt->srr && !skb_sec_path(skb))
|
||||
+ if (IPCB(skb)->flags & IPSKB_DOREDIRECT && !opt->srr &&
|
||||
+ !skb_sec_path(skb))
|
||||
ip_rt_send_redirect(skb);
|
||||
|
||||
skb->priority = rt_tos2priority(iph->tos);
|
||||
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
|
||||
index 22fa05e041ea..def18547748e 100644
|
||||
--- a/net/ipv4/ip_output.c
|
||||
+++ b/net/ipv4/ip_output.c
|
||||
@@ -1454,23 +1454,8 @@ static int ip_reply_glue_bits(void *dptr, char *to, int offset,
|
||||
/*
|
||||
* Generic function to send a packet as reply to another packet.
|
||||
* Used to send some TCP resets/acks so far.
|
||||
- *
|
||||
- * Use a fake percpu inet socket to avoid false sharing and contention.
|
||||
*/
|
||||
-static DEFINE_PER_CPU(struct inet_sock, unicast_sock) = {
|
||||
- .sk = {
|
||||
- .__sk_common = {
|
||||
- .skc_refcnt = ATOMIC_INIT(1),
|
||||
- },
|
||||
- .sk_wmem_alloc = ATOMIC_INIT(1),
|
||||
- .sk_allocation = GFP_ATOMIC,
|
||||
- .sk_flags = (1UL << SOCK_USE_WRITE_QUEUE),
|
||||
- },
|
||||
- .pmtudisc = IP_PMTUDISC_WANT,
|
||||
- .uc_ttl = -1,
|
||||
-};
|
||||
-
|
||||
-void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
|
||||
+void ip_send_unicast_reply(struct sock *sk, struct sk_buff *skb, __be32 daddr,
|
||||
__be32 saddr, const struct ip_reply_arg *arg,
|
||||
unsigned int len)
|
||||
{
|
||||
@@ -1478,9 +1463,8 @@ void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
|
||||
struct ipcm_cookie ipc;
|
||||
struct flowi4 fl4;
|
||||
struct rtable *rt = skb_rtable(skb);
|
||||
+ struct net *net = sock_net(sk);
|
||||
struct sk_buff *nskb;
|
||||
- struct sock *sk;
|
||||
- struct inet_sock *inet;
|
||||
int err;
|
||||
|
||||
if (ip_options_echo(&replyopts.opt.opt, skb))
|
||||
@@ -1508,15 +1492,11 @@ void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
|
||||
if (IS_ERR(rt))
|
||||
return;
|
||||
|
||||
- inet = &get_cpu_var(unicast_sock);
|
||||
+ inet_sk(sk)->tos = arg->tos;
|
||||
|
||||
- inet->tos = arg->tos;
|
||||
- sk = &inet->sk;
|
||||
sk->sk_priority = skb->priority;
|
||||
sk->sk_protocol = ip_hdr(skb)->protocol;
|
||||
sk->sk_bound_dev_if = arg->bound_dev_if;
|
||||
- sock_net_set(sk, net);
|
||||
- __skb_queue_head_init(&sk->sk_write_queue);
|
||||
sk->sk_sndbuf = sysctl_wmem_default;
|
||||
err = ip_append_data(sk, &fl4, ip_reply_glue_bits, arg->iov->iov_base,
|
||||
len, 0, &ipc, &rt, MSG_DONTWAIT);
|
||||
@@ -1532,13 +1512,10 @@ void ip_send_unicast_reply(struct net *net, struct sk_buff *skb, __be32 daddr,
|
||||
arg->csumoffset) = csum_fold(csum_add(nskb->csum,
|
||||
arg->csum));
|
||||
nskb->ip_summed = CHECKSUM_NONE;
|
||||
- skb_orphan(nskb);
|
||||
skb_set_queue_mapping(nskb, skb_get_queue_mapping(skb));
|
||||
ip_push_pending_frames(sk, &fl4);
|
||||
}
|
||||
out:
|
||||
- put_cpu_var(unicast_sock);
|
||||
-
|
||||
ip_rt_put(rt);
|
||||
}
|
||||
|
||||
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
|
||||
index 23e6ab0a2dc0..f6603142cb33 100644
|
||||
--- a/net/ipv4/ip_sockglue.c
|
||||
+++ b/net/ipv4/ip_sockglue.c
|
||||
@@ -410,15 +410,11 @@ int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
|
||||
|
||||
memcpy(&errhdr.ee, &serr->ee, sizeof(struct sock_extended_err));
|
||||
sin = &errhdr.offender;
|
||||
- sin->sin_family = AF_UNSPEC;
|
||||
+ memset(sin, 0, sizeof(*sin));
|
||||
if (serr->ee.ee_origin == SO_EE_ORIGIN_ICMP) {
|
||||
- struct inet_sock *inet = inet_sk(sk);
|
||||
-
|
||||
sin->sin_family = AF_INET;
|
||||
sin->sin_addr.s_addr = ip_hdr(skb)->saddr;
|
||||
- sin->sin_port = 0;
|
||||
- memset(&sin->sin_zero, 0, sizeof(sin->sin_zero));
|
||||
- if (inet->cmsg_flags)
|
||||
+ if (inet_sk(sk)->cmsg_flags)
|
||||
ip_cmsg_recv(msg, skb);
|
||||
}
|
||||
|
||||
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
|
||||
index aa857a4a06a8..698f3a2ac5ae 100644
|
||||
--- a/net/ipv4/ping.c
|
||||
+++ b/net/ipv4/ping.c
|
||||
@@ -720,8 +720,11 @@ void ping_rcv(struct sk_buff *skb)
|
||||
sk = ping_v4_lookup(net, saddr, daddr, ntohs(icmph->un.echo.id),
|
||||
skb->dev->ifindex);
|
||||
if (sk != NULL) {
|
||||
+ struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
|
||||
+
|
||||
pr_debug("rcv on socket %p\n", sk);
|
||||
- ping_queue_rcv_skb(sk, skb_get(skb));
|
||||
+ if (skb2)
|
||||
+ ping_queue_rcv_skb(sk, skb2);
|
||||
sock_put(sk);
|
||||
return;
|
||||
}
|
||||
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
|
||||
index d4d162eac4df..e23c5f64286b 100644
|
||||
--- a/net/ipv4/route.c
|
||||
+++ b/net/ipv4/route.c
|
||||
@@ -1514,11 +1514,10 @@ static int __mkroute_input(struct sk_buff *skb,
|
||||
|
||||
do_cache = res->fi && !itag;
|
||||
if (out_dev == in_dev && err && IN_DEV_TX_REDIRECTS(out_dev) &&
|
||||
+ skb->protocol == htons(ETH_P_IP) &&
|
||||
(IN_DEV_SHARED_MEDIA(out_dev) ||
|
||||
- inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res)))) {
|
||||
- flags |= RTCF_DOREDIRECT;
|
||||
- do_cache = false;
|
||||
- }
|
||||
+ inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
|
||||
+ IPCB(skb)->flags |= IPSKB_DOREDIRECT;
|
||||
|
||||
if (skb->protocol != htons(ETH_P_IP)) {
|
||||
/* Not IP (i.e. ARP). Do not create route, if it is
|
||||
@@ -2255,6 +2254,8 @@ static int rt_fill_info(struct net *net, __be32 dst, __be32 src,
|
||||
r->rtm_flags = (rt->rt_flags & ~0xFFFF) | RTM_F_CLONED;
|
||||
if (rt->rt_flags & RTCF_NOTIFY)
|
||||
r->rtm_flags |= RTM_F_NOTIFY;
|
||||
+ if (IPCB(skb)->flags & IPSKB_DOREDIRECT)
|
||||
+ r->rtm_flags |= RTCF_DOREDIRECT;
|
||||
|
||||
if (nla_put_be32(skb, RTA_DST, dst))
|
||||
goto nla_put_failure;
|
||||
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
|
||||
index e025c1c788a1..cce35e5a7ee6 100644
|
||||
--- a/net/ipv4/tcp_ipv4.c
|
||||
+++ b/net/ipv4/tcp_ipv4.c
|
||||
@@ -707,7 +707,8 @@ static void tcp_v4_send_reset(struct sock *sk, struct sk_buff *skb)
|
||||
|
||||
net = dev_net(skb_dst(skb)->dev);
|
||||
arg.tos = ip_hdr(skb)->tos;
|
||||
- ip_send_unicast_reply(net, skb, ip_hdr(skb)->saddr,
|
||||
+ ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk),
|
||||
+ skb, ip_hdr(skb)->saddr,
|
||||
ip_hdr(skb)->daddr, &arg, arg.iov[0].iov_len);
|
||||
|
||||
TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS);
|
||||
@@ -790,7 +791,8 @@ static void tcp_v4_send_ack(struct sk_buff *skb, u32 seq, u32 ack,
|
||||
if (oif)
|
||||
arg.bound_dev_if = oif;
|
||||
arg.tos = tos;
|
||||
- ip_send_unicast_reply(net, skb, ip_hdr(skb)->saddr,
|
||||
+ ip_send_unicast_reply(*this_cpu_ptr(net->ipv4.tcp_sk),
|
||||
+ skb, ip_hdr(skb)->saddr,
|
||||
ip_hdr(skb)->daddr, &arg, arg.iov[0].iov_len);
|
||||
|
||||
TCP_INC_STATS_BH(net, TCP_MIB_OUTSEGS);
|
||||
@@ -2898,14 +2900,39 @@ struct proto tcp_prot = {
|
||||
};
|
||||
EXPORT_SYMBOL(tcp_prot);
|
||||
|
||||
+static void __net_exit tcp_sk_exit(struct net *net)
|
||||
+{
|
||||
+ int cpu;
|
||||
+
|
||||
+ for_each_possible_cpu(cpu)
|
||||
+ inet_ctl_sock_destroy(*per_cpu_ptr(net->ipv4.tcp_sk, cpu));
|
||||
+ free_percpu(net->ipv4.tcp_sk);
|
||||
+}
|
||||
+
|
||||
static int __net_init tcp_sk_init(struct net *net)
|
||||
{
|
||||
+ int res, cpu;
|
||||
+
|
||||
+ net->ipv4.tcp_sk = alloc_percpu(struct sock *);
|
||||
+ if (!net->ipv4.tcp_sk)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
+ for_each_possible_cpu(cpu) {
|
||||
+ struct sock *sk;
|
||||
+
|
||||
+ res = inet_ctl_sock_create(&sk, PF_INET, SOCK_RAW,
|
||||
+ IPPROTO_TCP, net);
|
||||
+ if (res)
|
||||
+ goto fail;
|
||||
+ *per_cpu_ptr(net->ipv4.tcp_sk, cpu) = sk;
|
||||
+ }
|
||||
net->ipv4.sysctl_tcp_ecn = 2;
|
||||
return 0;
|
||||
-}
|
||||
|
||||
-static void __net_exit tcp_sk_exit(struct net *net)
|
||||
-{
|
||||
+fail:
|
||||
+ tcp_sk_exit(net);
|
||||
+
|
||||
+ return res;
|
||||
}
|
||||
|
||||
static void __net_exit tcp_sk_exit_batch(struct list_head *net_exit_list)
|
||||
diff --git a/net/ipv4/udp_diag.c b/net/ipv4/udp_diag.c
|
||||
index 7927db0a9279..4a000f1dd757 100644
|
||||
--- a/net/ipv4/udp_diag.c
|
||||
+++ b/net/ipv4/udp_diag.c
|
||||
@@ -99,11 +99,13 @@ static void udp_dump(struct udp_table *table, struct sk_buff *skb, struct netlin
|
||||
s_slot = cb->args[0];
|
||||
num = s_num = cb->args[1];
|
||||
|
||||
- for (slot = s_slot; slot <= table->mask; num = s_num = 0, slot++) {
|
||||
+ for (slot = s_slot; slot <= table->mask; s_num = 0, slot++) {
|
||||
struct sock *sk;
|
||||
struct hlist_nulls_node *node;
|
||||
struct udp_hslot *hslot = &table->hash[slot];
|
||||
|
||||
+ num = 0;
|
||||
+
|
||||
if (hlist_nulls_empty(&hslot->head))
|
||||
continue;
|
||||
|
||||
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
|
||||
index 8997340e3742..ce17d3da9b2b 100644
|
||||
--- a/net/ipv6/datagram.c
|
||||
+++ b/net/ipv6/datagram.c
|
||||
@@ -374,11 +374,10 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
|
||||
|
||||
memcpy(&errhdr.ee, &serr->ee, sizeof(struct sock_extended_err));
|
||||
sin = &errhdr.offender;
|
||||
- sin->sin6_family = AF_UNSPEC;
|
||||
+ memset(sin, 0, sizeof(*sin));
|
||||
+
|
||||
if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) {
|
||||
sin->sin6_family = AF_INET6;
|
||||
- sin->sin6_flowinfo = 0;
|
||||
- sin->sin6_port = 0;
|
||||
if (skb->protocol == htons(ETH_P_IPV6)) {
|
||||
sin->sin6_addr = ipv6_hdr(skb)->saddr;
|
||||
if (np->rxopt.all)
|
||||
@@ -387,12 +386,9 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
|
||||
ipv6_iface_scope_id(&sin->sin6_addr,
|
||||
IP6CB(skb)->iif);
|
||||
} else {
|
||||
- struct inet_sock *inet = inet_sk(sk);
|
||||
-
|
||||
ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr,
|
||||
&sin->sin6_addr);
|
||||
- sin->sin6_scope_id = 0;
|
||||
- if (inet->cmsg_flags)
|
||||
+ if (inet_sk(sk)->cmsg_flags)
|
||||
ip_cmsg_recv(msg, skb);
|
||||
}
|
||||
}
|
||||
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
|
||||
index 009c9620f442..ceeb9458bb60 100644
|
||||
--- a/net/ipv6/ip6_fib.c
|
||||
+++ b/net/ipv6/ip6_fib.c
|
||||
@@ -638,6 +638,29 @@ static inline bool rt6_qualify_for_ecmp(struct rt6_info *rt)
|
||||
RTF_GATEWAY;
|
||||
}
|
||||
|
||||
+static void fib6_purge_rt(struct rt6_info *rt, struct fib6_node *fn,
|
||||
+ struct net *net)
|
||||
+{
|
||||
+ if (atomic_read(&rt->rt6i_ref) != 1) {
|
||||
+ /* This route is used as dummy address holder in some split
|
||||
+ * nodes. It is not leaked, but it still holds other resources,
|
||||
+ * which must be released in time. So, scan ascendant nodes
|
||||
+ * and replace dummy references to this route with references
|
||||
+ * to still alive ones.
|
||||
+ */
|
||||
+ while (fn) {
|
||||
+ if (!(fn->fn_flags & RTN_RTINFO) && fn->leaf == rt) {
|
||||
+ fn->leaf = fib6_find_prefix(net, fn);
|
||||
+ atomic_inc(&fn->leaf->rt6i_ref);
|
||||
+ rt6_release(rt);
|
||||
+ }
|
||||
+ fn = fn->parent;
|
||||
+ }
|
||||
+ /* No more references are possible at this point. */
|
||||
+ BUG_ON(atomic_read(&rt->rt6i_ref) != 1);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Insert routing information in a node.
|
||||
*/
|
||||
@@ -775,11 +798,12 @@ add:
|
||||
rt->dst.rt6_next = iter->dst.rt6_next;
|
||||
atomic_inc(&rt->rt6i_ref);
|
||||
inet6_rt_notify(RTM_NEWROUTE, rt, info);
|
||||
- rt6_release(iter);
|
||||
if (!(fn->fn_flags & RTN_RTINFO)) {
|
||||
info->nl_net->ipv6.rt6_stats->fib_route_nodes++;
|
||||
fn->fn_flags |= RTN_RTINFO;
|
||||
}
|
||||
+ fib6_purge_rt(iter, fn, info->nl_net);
|
||||
+ rt6_release(iter);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1284,24 +1308,7 @@ static void fib6_del_route(struct fib6_node *fn, struct rt6_info **rtp,
|
||||
fn = fib6_repair_tree(net, fn);
|
||||
}
|
||||
|
||||
- if (atomic_read(&rt->rt6i_ref) != 1) {
|
||||
- /* This route is used as dummy address holder in some split
|
||||
- * nodes. It is not leaked, but it still holds other resources,
|
||||
- * which must be released in time. So, scan ascendant nodes
|
||||
- * and replace dummy references to this route with references
|
||||
- * to still alive ones.
|
||||
- */
|
||||
- while (fn) {
|
||||
- if (!(fn->fn_flags & RTN_RTINFO) && fn->leaf == rt) {
|
||||
- fn->leaf = fib6_find_prefix(net, fn);
|
||||
- atomic_inc(&fn->leaf->rt6i_ref);
|
||||
- rt6_release(rt);
|
||||
- }
|
||||
- fn = fn->parent;
|
||||
- }
|
||||
- /* No more references are possible at this point. */
|
||||
- BUG_ON(atomic_read(&rt->rt6i_ref) != 1);
|
||||
- }
|
||||
+ fib6_purge_rt(rt, fn, net);
|
||||
|
||||
inet6_rt_notify(RTM_DELROUTE, rt, info);
|
||||
rt6_release(rt);
|
||||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
|
||||
index b2614b22622b..92274796eb71 100644
|
||||
--- a/net/ipv6/route.c
|
||||
+++ b/net/ipv6/route.c
|
||||
@@ -1141,12 +1141,9 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, struct sock *sk,
|
||||
struct net *net = dev_net(dst->dev);
|
||||
|
||||
rt6->rt6i_flags |= RTF_MODIFIED;
|
||||
- if (mtu < IPV6_MIN_MTU) {
|
||||
- u32 features = dst_metric(dst, RTAX_FEATURES);
|
||||
+ if (mtu < IPV6_MIN_MTU)
|
||||
mtu = IPV6_MIN_MTU;
|
||||
- features |= RTAX_FEATURE_ALLFRAG;
|
||||
- dst_metric_set(dst, RTAX_FEATURES, features);
|
||||
- }
|
||||
+
|
||||
dst_metric_set(dst, RTAX_MTU, mtu);
|
||||
rt6_update_expires(rt6, net->ipv6.sysctl.ip6_rt_mtu_expires);
|
||||
}
|
||||
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
|
||||
index ca4a1a1b8e69..6360a14edeab 100644
|
||||
--- a/net/sctp/associola.c
|
||||
+++ b/net/sctp/associola.c
|
||||
@@ -1297,7 +1297,6 @@ void sctp_assoc_update(struct sctp_association *asoc,
|
||||
asoc->peer.peer_hmacs = new->peer.peer_hmacs;
|
||||
new->peer.peer_hmacs = NULL;
|
||||
|
||||
- sctp_auth_key_put(asoc->asoc_shared_key);
|
||||
sctp_auth_asoc_init_active_key(asoc, GFP_ATOMIC);
|
||||
}
|
||||
|
||||
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
|
||||
index 29fc16f3633f..beedadf62f6c 100644
|
||||
--- a/net/sctp/sm_make_chunk.c
|
||||
+++ b/net/sctp/sm_make_chunk.c
|
||||
@@ -2595,7 +2595,7 @@ do_addr_param:
|
||||
|
||||
addr_param = param.v + sizeof(sctp_addip_param_t);
|
||||
|
||||
- af = sctp_get_af_specific(param_type2af(param.p->type));
|
||||
+ af = sctp_get_af_specific(param_type2af(addr_param->p.type));
|
||||
if (af == NULL)
|
||||
break;
|
||||
|
1503
patch/kernel/pine64-default/01-patch-3.10.70-71.patch
Normal file
1503
patch/kernel/pine64-default/01-patch-3.10.70-71.patch
Normal file
File diff suppressed because it is too large
Load diff
2182
patch/kernel/pine64-default/01-patch-3.10.71-72-e.patch
Normal file
2182
patch/kernel/pine64-default/01-patch-3.10.71-72-e.patch
Normal file
File diff suppressed because it is too large
Load diff
1772
patch/kernel/pine64-default/01-patch-3.10.72-73.patch
Normal file
1772
patch/kernel/pine64-default/01-patch-3.10.72-73.patch
Normal file
File diff suppressed because it is too large
Load diff
599
patch/kernel/pine64-default/01-patch-3.10.73-74.patch
Normal file
599
patch/kernel/pine64-default/01-patch-3.10.73-74.patch
Normal file
|
@ -0,0 +1,599 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index b1129094ebfd..d2a3930159ea 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 73
|
||||
+SUBLEVEL = 74
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
|
||||
index 1382fec9e8c5..7fcb1ac0f232 100644
|
||||
--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
|
||||
+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-0.dtsi
|
||||
@@ -50,6 +50,7 @@ ethernet@b0000 {
|
||||
fsl,num_tx_queues = <0x8>;
|
||||
fsl,magic-packet;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
+ ranges;
|
||||
|
||||
queue-group@b0000 {
|
||||
#address-cells = <1>;
|
||||
diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
|
||||
index 221cd2ea5b31..9f25427c1527 100644
|
||||
--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
|
||||
+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-1.dtsi
|
||||
@@ -50,6 +50,7 @@ ethernet@b1000 {
|
||||
fsl,num_tx_queues = <0x8>;
|
||||
fsl,magic-packet;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
+ ranges;
|
||||
|
||||
queue-group@b1000 {
|
||||
#address-cells = <1>;
|
||||
diff --git a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
|
||||
index 61456c317609..cd7c318ab131 100644
|
||||
--- a/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
|
||||
+++ b/arch/powerpc/boot/dts/fsl/pq3-etsec2-2.dtsi
|
||||
@@ -49,6 +49,7 @@ ethernet@b2000 {
|
||||
fsl,num_tx_queues = <0x8>;
|
||||
fsl,magic-packet;
|
||||
local-mac-address = [ 00 00 00 00 00 00 ];
|
||||
+ ranges;
|
||||
|
||||
queue-group@b2000 {
|
||||
#address-cells = <1>;
|
||||
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
|
||||
index a87f0c42cb8b..f69fed826a56 100644
|
||||
--- a/drivers/md/dm.c
|
||||
+++ b/drivers/md/dm.c
|
||||
@@ -2333,10 +2333,16 @@ static void __dm_destroy(struct mapped_device *md, bool wait)
|
||||
set_bit(DMF_FREEING, &md->flags);
|
||||
spin_unlock(&_minor_lock);
|
||||
|
||||
+ /*
|
||||
+ * Take suspend_lock so that presuspend and postsuspend methods
|
||||
+ * do not race with internal suspend.
|
||||
+ */
|
||||
+ mutex_lock(&md->suspend_lock);
|
||||
if (!dm_suspended_md(md)) {
|
||||
dm_table_presuspend_targets(map);
|
||||
dm_table_postsuspend_targets(map);
|
||||
}
|
||||
+ mutex_unlock(&md->suspend_lock);
|
||||
|
||||
/*
|
||||
* Rare, but there may be I/O requests still going to complete,
|
||||
diff --git a/drivers/net/ethernet/amd/pcnet32.c b/drivers/net/ethernet/amd/pcnet32.c
|
||||
index ed2130727643..f6415fda103b 100644
|
||||
--- a/drivers/net/ethernet/amd/pcnet32.c
|
||||
+++ b/drivers/net/ethernet/amd/pcnet32.c
|
||||
@@ -1516,7 +1516,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
{
|
||||
struct pcnet32_private *lp;
|
||||
int i, media;
|
||||
- int fdx, mii, fset, dxsuflo;
|
||||
+ int fdx, mii, fset, dxsuflo, sram;
|
||||
int chip_version;
|
||||
char *chipname;
|
||||
struct net_device *dev;
|
||||
@@ -1553,7 +1553,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
}
|
||||
|
||||
/* initialize variables */
|
||||
- fdx = mii = fset = dxsuflo = 0;
|
||||
+ fdx = mii = fset = dxsuflo = sram = 0;
|
||||
chip_version = (chip_version >> 12) & 0xffff;
|
||||
|
||||
switch (chip_version) {
|
||||
@@ -1586,6 +1586,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
chipname = "PCnet/FAST III 79C973"; /* PCI */
|
||||
fdx = 1;
|
||||
mii = 1;
|
||||
+ sram = 1;
|
||||
break;
|
||||
case 0x2626:
|
||||
chipname = "PCnet/Home 79C978"; /* PCI */
|
||||
@@ -1609,6 +1610,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
chipname = "PCnet/FAST III 79C975"; /* PCI */
|
||||
fdx = 1;
|
||||
mii = 1;
|
||||
+ sram = 1;
|
||||
break;
|
||||
case 0x2628:
|
||||
chipname = "PCnet/PRO 79C976";
|
||||
@@ -1637,6 +1639,31 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
|
||||
dxsuflo = 1;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * The Am79C973/Am79C975 controllers come with 12K of SRAM
|
||||
+ * which we can use for the Tx/Rx buffers but most importantly,
|
||||
+ * the use of SRAM allow us to use the BCR18:NOUFLO bit to avoid
|
||||
+ * Tx fifo underflows.
|
||||
+ */
|
||||
+ if (sram) {
|
||||
+ /*
|
||||
+ * The SRAM is being configured in two steps. First we
|
||||
+ * set the SRAM size in the BCR25:SRAM_SIZE bits. According
|
||||
+ * to the datasheet, each bit corresponds to a 512-byte
|
||||
+ * page so we can have at most 24 pages. The SRAM_SIZE
|
||||
+ * holds the value of the upper 8 bits of the 16-bit SRAM size.
|
||||
+ * The low 8-bits start at 0x00 and end at 0xff. So the
|
||||
+ * address range is from 0x0000 up to 0x17ff. Therefore,
|
||||
+ * the SRAM_SIZE is set to 0x17. The next step is to set
|
||||
+ * the BCR26:SRAM_BND midway through so the Tx and Rx
|
||||
+ * buffers can share the SRAM equally.
|
||||
+ */
|
||||
+ a->write_bcr(ioaddr, 25, 0x17);
|
||||
+ a->write_bcr(ioaddr, 26, 0xc);
|
||||
+ /* And finally enable the NOUFLO bit */
|
||||
+ a->write_bcr(ioaddr, 18, a->read_bcr(ioaddr, 18) | (1 << 11));
|
||||
+ }
|
||||
+
|
||||
dev = alloc_etherdev(sizeof(*lp));
|
||||
if (!dev) {
|
||||
ret = -ENOMEM;
|
||||
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
|
||||
index e6660d692008..ec0d32ad7592 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
|
||||
@@ -541,7 +541,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
|
||||
|
||||
ret = iwl_mvm_mac_ctxt_add(mvm, vif);
|
||||
if (ret)
|
||||
- goto out_remove_mac;
|
||||
+ goto out_release;
|
||||
|
||||
/*
|
||||
* Update power state on the new interface. Admittedly, based on
|
||||
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
|
||||
index cfd49eca67aa..c81716042073 100644
|
||||
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
|
||||
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
|
||||
@@ -1465,7 +1465,7 @@ static int tcm_qla2xxx_check_initiator_node_acl(
|
||||
/*
|
||||
* Finally register the new FC Nexus with TCM
|
||||
*/
|
||||
- __transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess);
|
||||
+ transport_register_session(se_nacl->se_tpg, se_nacl, se_sess, sess);
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
|
||||
index 6948984a25ab..c2d602825422 100644
|
||||
--- a/drivers/staging/vt6655/rf.c
|
||||
+++ b/drivers/staging/vt6655/rf.c
|
||||
@@ -966,6 +966,7 @@ bool RFbSetPower(
|
||||
break;
|
||||
case RATE_6M:
|
||||
case RATE_9M:
|
||||
+ case RATE_12M:
|
||||
case RATE_18M:
|
||||
byPwr = pDevice->abyOFDMPwrTbl[uCH];
|
||||
if (pDevice->byRFType == RF_UW2452) {
|
||||
diff --git a/drivers/target/tcm_fc/tfc_io.c b/drivers/target/tcm_fc/tfc_io.c
|
||||
index e415af32115a..c67d3795db4a 100644
|
||||
--- a/drivers/target/tcm_fc/tfc_io.c
|
||||
+++ b/drivers/target/tcm_fc/tfc_io.c
|
||||
@@ -346,7 +346,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd)
|
||||
ep = fc_seq_exch(seq);
|
||||
if (ep) {
|
||||
lport = ep->lp;
|
||||
- if (lport && (ep->xid <= lport->lro_xid))
|
||||
+ if (lport && (ep->xid <= lport->lro_xid)) {
|
||||
/*
|
||||
* "ddp_done" trigger invalidation of HW
|
||||
* specific DDP context
|
||||
@@ -361,6 +361,7 @@ void ft_invl_hw_context(struct ft_cmd *cmd)
|
||||
* identified using ep->xid)
|
||||
*/
|
||||
cmd->was_ddp_setup = 0;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/fs/hfsplus/brec.c b/fs/hfsplus/brec.c
|
||||
index 6e560d56094b..754fdf8c6356 100644
|
||||
--- a/fs/hfsplus/brec.c
|
||||
+++ b/fs/hfsplus/brec.c
|
||||
@@ -131,13 +131,16 @@ skip:
|
||||
hfs_bnode_write(node, entry, data_off + key_len, entry_len);
|
||||
hfs_bnode_dump(node);
|
||||
|
||||
- if (new_node) {
|
||||
- /* update parent key if we inserted a key
|
||||
- * at the start of the first node
|
||||
- */
|
||||
- if (!rec && new_node != node)
|
||||
- hfs_brec_update_parent(fd);
|
||||
+ /*
|
||||
+ * update parent key if we inserted a key
|
||||
+ * at the start of the node and it is not the new node
|
||||
+ */
|
||||
+ if (!rec && new_node != node) {
|
||||
+ hfs_bnode_read_key(node, fd->search_key, data_off + size);
|
||||
+ hfs_brec_update_parent(fd);
|
||||
+ }
|
||||
|
||||
+ if (new_node) {
|
||||
hfs_bnode_put(fd->bnode);
|
||||
if (!new_node->parent) {
|
||||
hfs_btree_inc_height(tree);
|
||||
@@ -168,9 +171,6 @@ skip:
|
||||
goto again;
|
||||
}
|
||||
|
||||
- if (!rec)
|
||||
- hfs_brec_update_parent(fd);
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -370,6 +370,8 @@ again:
|
||||
if (IS_ERR(parent))
|
||||
return PTR_ERR(parent);
|
||||
__hfs_brec_find(parent, fd, hfs_find_rec_by_key);
|
||||
+ if (fd->record < 0)
|
||||
+ return -ENOENT;
|
||||
hfs_bnode_dump(parent);
|
||||
rec = fd->record;
|
||||
|
||||
diff --git a/kernel/events/core.c b/kernel/events/core.c
|
||||
index 7bf4d519c20f..7daf52c340cd 100644
|
||||
--- a/kernel/events/core.c
|
||||
+++ b/kernel/events/core.c
|
||||
@@ -4007,6 +4007,13 @@ static void perf_pending_event(struct irq_work *entry)
|
||||
{
|
||||
struct perf_event *event = container_of(entry,
|
||||
struct perf_event, pending);
|
||||
+ int rctx;
|
||||
+
|
||||
+ rctx = perf_swevent_get_recursion_context();
|
||||
+ /*
|
||||
+ * If we 'fail' here, that's OK, it means recursion is already disabled
|
||||
+ * and we won't recurse 'further'.
|
||||
+ */
|
||||
|
||||
if (event->pending_disable) {
|
||||
event->pending_disable = 0;
|
||||
@@ -4017,6 +4024,9 @@ static void perf_pending_event(struct irq_work *entry)
|
||||
event->pending_wakeup = 0;
|
||||
perf_event_wakeup(event);
|
||||
}
|
||||
+
|
||||
+ if (rctx >= 0)
|
||||
+ perf_swevent_put_recursion_context(rctx);
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
|
||||
index 845563b81a0f..9f0ea9d8be73 100644
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -60,13 +60,24 @@ struct ieee80211_local;
|
||||
#define IEEE80211_UNSET_POWER_LEVEL INT_MIN
|
||||
|
||||
/*
|
||||
- * Some APs experience problems when working with U-APSD. Decrease the
|
||||
- * probability of that happening by using legacy mode for all ACs but VO.
|
||||
- * The AP that caused us trouble was a Cisco 4410N. It ignores our
|
||||
- * setting, and always treats non-VO ACs as legacy.
|
||||
+ * Some APs experience problems when working with U-APSD. Decreasing the
|
||||
+ * probability of that happening by using legacy mode for all ACs but VO isn't
|
||||
+ * enough.
|
||||
+ *
|
||||
+ * Cisco 4410N originally forced us to enable VO by default only because it
|
||||
+ * treated non-VO ACs as legacy.
|
||||
+ *
|
||||
+ * However some APs (notably Netgear R7000) silently reclassify packets to
|
||||
+ * different ACs. Since u-APSD ACs require trigger frames for frame retrieval
|
||||
+ * clients would never see some frames (e.g. ARP responses) or would fetch them
|
||||
+ * accidentally after a long time.
|
||||
+ *
|
||||
+ * It makes little sense to enable u-APSD queues by default because it needs
|
||||
+ * userspace applications to be aware of it to actually take advantage of the
|
||||
+ * possible additional powersavings. Implicitly depending on driver autotrigger
|
||||
+ * frame support doesn't make much sense.
|
||||
*/
|
||||
-#define IEEE80211_DEFAULT_UAPSD_QUEUES \
|
||||
- IEEE80211_WMM_IE_STA_QOSINFO_AC_VO
|
||||
+#define IEEE80211_DEFAULT_UAPSD_QUEUES 0
|
||||
|
||||
#define IEEE80211_DEFAULT_MAX_SP_LEN \
|
||||
IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL
|
||||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
|
||||
index 9299a38c372e..cd60be8d9aba 100644
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -2023,6 +2023,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
|
||||
hdr = (struct ieee80211_hdr *) skb->data;
|
||||
mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
|
||||
|
||||
+ if (ieee80211_drop_unencrypted(rx, hdr->frame_control))
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
/* frame is in RMC, don't forward */
|
||||
if (ieee80211_is_data(hdr->frame_control) &&
|
||||
is_multicast_ether_addr(hdr->addr1) &&
|
||||
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
|
||||
index dc200bf831ae..90a0e552cb32 100644
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -4032,6 +4032,16 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
|
||||
if (parse_station_flags(info, dev->ieee80211_ptr->iftype, ¶ms))
|
||||
return -EINVAL;
|
||||
|
||||
+ /* HT/VHT requires QoS, but if we don't have that just ignore HT/VHT
|
||||
+ * as userspace might just pass through the capabilities from the IEs
|
||||
+ * directly, rather than enforcing this restriction and returning an
|
||||
+ * error in this case.
|
||||
+ */
|
||||
+ if (!(params.sta_flags_set & BIT(NL80211_STA_FLAG_WME))) {
|
||||
+ params.ht_capa = NULL;
|
||||
+ params.vht_capa = NULL;
|
||||
+ }
|
||||
+
|
||||
/* When you run into this, adjust the code below for the new flag */
|
||||
BUILD_BUG_ON(NL80211_STA_FLAG_MAX != 7);
|
||||
|
||||
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
|
||||
index 3c839cc4e00e..0ef2b2a33ee5 100644
|
||||
--- a/sound/soc/codecs/adav80x.c
|
||||
+++ b/sound/soc/codecs/adav80x.c
|
||||
@@ -307,7 +307,7 @@ static int adav80x_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
|
||||
- unsigned int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ unsigned int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
@@ -323,7 +323,7 @@ static int adav80x_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = adav80x->deemph;
|
||||
+ ucontrol->value.integer.value[0] = adav80x->deemph;
|
||||
return 0;
|
||||
};
|
||||
|
||||
diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
|
||||
index 5f9af1fb76e8..68379c14720b 100644
|
||||
--- a/sound/soc/codecs/ak4641.c
|
||||
+++ b/sound/soc/codecs/ak4641.c
|
||||
@@ -74,7 +74,7 @@ static int ak4641_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
@@ -90,7 +90,7 @@ static int ak4641_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = ak4641->deemph;
|
||||
+ ucontrol->value.integer.value[0] = ak4641->deemph;
|
||||
return 0;
|
||||
};
|
||||
|
||||
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
|
||||
index 03036b326732..ffa4a2d8a4bc 100644
|
||||
--- a/sound/soc/codecs/cs4271.c
|
||||
+++ b/sound/soc/codecs/cs4271.c
|
||||
@@ -267,7 +267,7 @@ static int cs4271_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = cs4271->deemph;
|
||||
+ ucontrol->value.integer.value[0] = cs4271->deemph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ static int cs4271_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- cs4271->deemph = ucontrol->value.enumerated.item[0];
|
||||
+ cs4271->deemph = ucontrol->value.integer.value[0];
|
||||
return cs4271_set_deemph(codec);
|
||||
}
|
||||
|
||||
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
|
||||
index 3b5f565a23a5..665e0ddc2ef0 100644
|
||||
--- a/sound/soc/codecs/sgtl5000.c
|
||||
+++ b/sound/soc/codecs/sgtl5000.c
|
||||
@@ -1111,13 +1111,7 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
|
||||
/* Enable VDDC charge pump */
|
||||
ana_pwr |= SGTL5000_VDDC_CHRGPMP_POWERUP;
|
||||
} else if (vddio >= 3100 && vdda >= 3100) {
|
||||
- /*
|
||||
- * if vddio and vddd > 3.1v,
|
||||
- * charge pump should be clean before set ana_pwr
|
||||
- */
|
||||
- snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
|
||||
- SGTL5000_VDDC_CHRGPMP_POWERUP, 0);
|
||||
-
|
||||
+ ana_pwr &= ~SGTL5000_VDDC_CHRGPMP_POWERUP;
|
||||
/* VDDC use VDDIO rail */
|
||||
lreg_ctrl |= SGTL5000_VDDC_ASSN_OVRD;
|
||||
lreg_ctrl |= SGTL5000_VDDC_MAN_ASSN_VDDIO <<
|
||||
diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
|
||||
index d447c4aa1d5e..675a8fd0deed 100644
|
||||
--- a/sound/soc/codecs/tas5086.c
|
||||
+++ b/sound/soc/codecs/tas5086.c
|
||||
@@ -173,7 +173,7 @@ static int tas5086_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = priv->deemph;
|
||||
+ ucontrol->value.integer.value[0] = priv->deemph;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ static int tas5086_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- priv->deemph = ucontrol->value.enumerated.item[0];
|
||||
+ priv->deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
return tas5086_set_deemph(codec);
|
||||
}
|
||||
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
|
||||
index 7fefd766b582..124fb538dfa9 100644
|
||||
--- a/sound/soc/codecs/wm2000.c
|
||||
+++ b/sound/soc/codecs/wm2000.c
|
||||
@@ -605,7 +605,7 @@ static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm2000->anc_active;
|
||||
+ ucontrol->value.integer.value[0] = wm2000->anc_active;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -615,7 +615,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||
- int anc_active = ucontrol->value.enumerated.item[0];
|
||||
+ int anc_active = ucontrol->value.integer.value[0];
|
||||
int ret;
|
||||
|
||||
if (anc_active > 1)
|
||||
@@ -638,7 +638,7 @@ static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm2000->spk_ena;
|
||||
+ ucontrol->value.integer.value[0] = wm2000->spk_ena;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -648,7 +648,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||
- int val = ucontrol->value.enumerated.item[0];
|
||||
+ int val = ucontrol->value.integer.value[0];
|
||||
int ret;
|
||||
|
||||
if (val > 1)
|
||||
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
|
||||
index 10d492b6a5b4..944b09b1f481 100644
|
||||
--- a/sound/soc/codecs/wm8731.c
|
||||
+++ b/sound/soc/codecs/wm8731.c
|
||||
@@ -121,7 +121,7 @@ static int wm8731_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8731->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8731->deemph;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ static int wm8731_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
int ret = 0;
|
||||
|
||||
if (deemph > 1)
|
||||
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
|
||||
index 9d88437cdcd1..79f4a217b5d5 100644
|
||||
--- a/sound/soc/codecs/wm8903.c
|
||||
+++ b/sound/soc/codecs/wm8903.c
|
||||
@@ -446,7 +446,7 @@ static int wm8903_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8903->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8903->deemph;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -456,7 +456,7 @@ static int wm8903_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
int ret = 0;
|
||||
|
||||
if (deemph > 1)
|
||||
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
|
||||
index af62f843a691..c68d541cd350 100644
|
||||
--- a/sound/soc/codecs/wm8904.c
|
||||
+++ b/sound/soc/codecs/wm8904.c
|
||||
@@ -523,7 +523,7 @@ static int wm8904_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8904->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8904->deemph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ static int wm8904_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
|
||||
index 82c8ba975720..1c1fc6119758 100644
|
||||
--- a/sound/soc/codecs/wm8955.c
|
||||
+++ b/sound/soc/codecs/wm8955.c
|
||||
@@ -393,7 +393,7 @@ static int wm8955_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8955->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8955->deemph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ static int wm8955_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
||||
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
|
||||
index 412d90f7b256..4a8decf85a4a 100644
|
||||
--- a/sound/soc/codecs/wm8960.c
|
||||
+++ b/sound/soc/codecs/wm8960.c
|
||||
@@ -181,7 +181,7 @@ static int wm8960_get_deemph(struct snd_kcontrol *kcontrol,
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
- ucontrol->value.enumerated.item[0] = wm8960->deemph;
|
||||
+ ucontrol->value.integer.value[0] = wm8960->deemph;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
|
||||
- int deemph = ucontrol->value.enumerated.item[0];
|
||||
+ int deemph = ucontrol->value.integer.value[0];
|
||||
|
||||
if (deemph > 1)
|
||||
return -EINVAL;
|
748
patch/kernel/pine64-default/01-patch-3.10.74-75.patch
Normal file
748
patch/kernel/pine64-default/01-patch-3.10.74-75.patch
Normal file
|
@ -0,0 +1,748 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index d2a3930159ea..87909d8302ad 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
-SUBLEVEL = 74
|
||||
+SUBLEVEL = 75
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
|
||||
index a88894190e41..c991fe680e58 100644
|
||||
--- a/drivers/acpi/processor_idle.c
|
||||
+++ b/drivers/acpi/processor_idle.c
|
||||
@@ -978,7 +978,7 @@ static int acpi_processor_setup_cpuidle_states(struct acpi_processor *pr)
|
||||
return -EINVAL;
|
||||
|
||||
drv->safe_state_index = -1;
|
||||
- for (i = 0; i < CPUIDLE_STATE_MAX; i++) {
|
||||
+ for (i = CPUIDLE_DRIVER_STATE_START; i < CPUIDLE_STATE_MAX; i++) {
|
||||
drv->states[i].name[0] = '\0';
|
||||
drv->states[i].desc[0] = '\0';
|
||||
}
|
||||
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
|
||||
index cf1576d54363..a5c987ae665d 100644
|
||||
--- a/drivers/block/nbd.c
|
||||
+++ b/drivers/block/nbd.c
|
||||
@@ -815,10 +815,6 @@ static int __init nbd_init(void)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);
|
||||
- if (!nbd_dev)
|
||||
- return -ENOMEM;
|
||||
-
|
||||
part_shift = 0;
|
||||
if (max_part > 0) {
|
||||
part_shift = fls(max_part);
|
||||
@@ -840,6 +836,10 @@ static int __init nbd_init(void)
|
||||
if (nbds_max > 1UL << (MINORBITS - part_shift))
|
||||
return -EINVAL;
|
||||
|
||||
+ nbd_dev = kcalloc(nbds_max, sizeof(*nbd_dev), GFP_KERNEL);
|
||||
+ if (!nbd_dev)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
for (i = 0; i < nbds_max; i++) {
|
||||
struct gendisk *disk = alloc_disk(1 << part_shift);
|
||||
if (!disk)
|
||||
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
|
||||
index ec3fc4fd9160..b94a37630e36 100644
|
||||
--- a/drivers/dma/omap-dma.c
|
||||
+++ b/drivers/dma/omap-dma.c
|
||||
@@ -487,6 +487,7 @@ static int omap_dma_terminate_all(struct omap_chan *c)
|
||||
* c->desc is NULL and exit.)
|
||||
*/
|
||||
if (c->desc) {
|
||||
+ omap_dma_desc_free(&c->desc->vd);
|
||||
c->desc = NULL;
|
||||
/* Avoid stopping the dma twice */
|
||||
if (!c->paused)
|
||||
diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c
|
||||
index b131520521e4..72b02483ff03 100644
|
||||
--- a/drivers/gpu/drm/radeon/radeon_bios.c
|
||||
+++ b/drivers/gpu/drm/radeon/radeon_bios.c
|
||||
@@ -76,7 +76,7 @@ static bool igp_read_bios_from_vram(struct radeon_device *rdev)
|
||||
|
||||
static bool radeon_read_bios(struct radeon_device *rdev)
|
||||
{
|
||||
- uint8_t __iomem *bios;
|
||||
+ uint8_t __iomem *bios, val1, val2;
|
||||
size_t size;
|
||||
|
||||
rdev->bios = NULL;
|
||||
@@ -86,15 +86,19 @@ static bool radeon_read_bios(struct radeon_device *rdev)
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (size == 0 || bios[0] != 0x55 || bios[1] != 0xaa) {
|
||||
+ val1 = readb(&bios[0]);
|
||||
+ val2 = readb(&bios[1]);
|
||||
+
|
||||
+ if (size == 0 || val1 != 0x55 || val2 != 0xaa) {
|
||||
pci_unmap_rom(rdev->pdev, bios);
|
||||
return false;
|
||||
}
|
||||
- rdev->bios = kmemdup(bios, size, GFP_KERNEL);
|
||||
+ rdev->bios = kzalloc(size, GFP_KERNEL);
|
||||
if (rdev->bios == NULL) {
|
||||
pci_unmap_rom(rdev->pdev, bios);
|
||||
return false;
|
||||
}
|
||||
+ memcpy_fromio(rdev->bios, bios, size);
|
||||
pci_unmap_rom(rdev->pdev, bios);
|
||||
return true;
|
||||
}
|
||||
diff --git a/drivers/iio/imu/adis_trigger.c b/drivers/iio/imu/adis_trigger.c
|
||||
index e0017c22bb9c..f53e9a803a0e 100644
|
||||
--- a/drivers/iio/imu/adis_trigger.c
|
||||
+++ b/drivers/iio/imu/adis_trigger.c
|
||||
@@ -60,7 +60,7 @@ int adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)
|
||||
iio_trigger_set_drvdata(adis->trig, adis);
|
||||
ret = iio_trigger_register(adis->trig);
|
||||
|
||||
- indio_dev->trig = adis->trig;
|
||||
+ indio_dev->trig = iio_trigger_get(adis->trig);
|
||||
if (ret)
|
||||
goto error_free_irq;
|
||||
|
||||
diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
|
||||
index 7da0832f187b..01d661e0fa6c 100644
|
||||
--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
|
||||
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c
|
||||
@@ -25,6 +25,16 @@
|
||||
#include <linux/poll.h>
|
||||
#include "inv_mpu_iio.h"
|
||||
|
||||
+static void inv_clear_kfifo(struct inv_mpu6050_state *st)
|
||||
+{
|
||||
+ unsigned long flags;
|
||||
+
|
||||
+ /* take the spin lock sem to avoid interrupt kick in */
|
||||
+ spin_lock_irqsave(&st->time_stamp_lock, flags);
|
||||
+ kfifo_reset(&st->timestamps);
|
||||
+ spin_unlock_irqrestore(&st->time_stamp_lock, flags);
|
||||
+}
|
||||
+
|
||||
int inv_reset_fifo(struct iio_dev *indio_dev)
|
||||
{
|
||||
int result;
|
||||
@@ -51,6 +61,10 @@ int inv_reset_fifo(struct iio_dev *indio_dev)
|
||||
INV_MPU6050_BIT_FIFO_RST);
|
||||
if (result)
|
||||
goto reset_fifo_fail;
|
||||
+
|
||||
+ /* clear timestamps fifo */
|
||||
+ inv_clear_kfifo(st);
|
||||
+
|
||||
/* enable interrupt */
|
||||
if (st->chip_config.accl_fifo_enable ||
|
||||
st->chip_config.gyro_fifo_enable) {
|
||||
@@ -84,16 +98,6 @@ reset_fifo_fail:
|
||||
return result;
|
||||
}
|
||||
|
||||
-static void inv_clear_kfifo(struct inv_mpu6050_state *st)
|
||||
-{
|
||||
- unsigned long flags;
|
||||
-
|
||||
- /* take the spin lock sem to avoid interrupt kick in */
|
||||
- spin_lock_irqsave(&st->time_stamp_lock, flags);
|
||||
- kfifo_reset(&st->timestamps);
|
||||
- spin_unlock_irqrestore(&st->time_stamp_lock, flags);
|
||||
-}
|
||||
-
|
||||
/**
|
||||
* inv_mpu6050_irq_handler() - Cache a timestamp at each data ready interrupt.
|
||||
*/
|
||||
@@ -187,7 +191,6 @@ end_session:
|
||||
flush_fifo:
|
||||
/* Flush HW and SW FIFOs. */
|
||||
inv_reset_fifo(indio_dev);
|
||||
- inv_clear_kfifo(st);
|
||||
mutex_unlock(&indio_dev->mlock);
|
||||
iio_trigger_notify_done(indio_dev->trig);
|
||||
|
||||
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
|
||||
index a84112322071..055ebebc07dd 100644
|
||||
--- a/drivers/infiniband/core/umem.c
|
||||
+++ b/drivers/infiniband/core/umem.c
|
||||
@@ -94,6 +94,14 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
|
||||
if (dmasync)
|
||||
dma_set_attr(DMA_ATTR_WRITE_BARRIER, &attrs);
|
||||
|
||||
+ /*
|
||||
+ * If the combination of the addr and size requested for this memory
|
||||
+ * region causes an integer overflow, return error.
|
||||
+ */
|
||||
+ if ((PAGE_ALIGN(addr + size) <= size) ||
|
||||
+ (PAGE_ALIGN(addr + size) <= addr))
|
||||
+ return ERR_PTR(-EINVAL);
|
||||
+
|
||||
if (!can_do_mlock())
|
||||
return ERR_PTR(-EPERM);
|
||||
|
||||
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
|
||||
index 2c6f0f2ecd9d..949b38633496 100644
|
||||
--- a/drivers/infiniband/core/uverbs_main.c
|
||||
+++ b/drivers/infiniband/core/uverbs_main.c
|
||||
@@ -460,6 +460,7 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
|
||||
|
||||
entry->desc.async.element = element;
|
||||
entry->desc.async.event_type = event;
|
||||
+ entry->desc.async.reserved = 0;
|
||||
entry->counter = counter;
|
||||
|
||||
list_add_tail(&entry->list, &file->async_file->event_list);
|
||||
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
|
||||
index 4d599cedbb0b..6ee534874535 100644
|
||||
--- a/drivers/infiniband/hw/mlx4/mad.c
|
||||
+++ b/drivers/infiniband/hw/mlx4/mad.c
|
||||
@@ -64,6 +64,14 @@ enum {
|
||||
#define GUID_TBL_BLK_NUM_ENTRIES 8
|
||||
#define GUID_TBL_BLK_SIZE (GUID_TBL_ENTRY_SIZE * GUID_TBL_BLK_NUM_ENTRIES)
|
||||
|
||||
+/* Counters should be saturate once they reach their maximum value */
|
||||
+#define ASSIGN_32BIT_COUNTER(counter, value) do {\
|
||||
+ if ((value) > U32_MAX) \
|
||||
+ counter = cpu_to_be32(U32_MAX); \
|
||||
+ else \
|
||||
+ counter = cpu_to_be32(value); \
|
||||
+} while (0)
|
||||
+
|
||||
struct mlx4_mad_rcv_buf {
|
||||
struct ib_grh grh;
|
||||
u8 payload[256];
|
||||
@@ -730,10 +738,14 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
|
||||
static void edit_counter(struct mlx4_counter *cnt,
|
||||
struct ib_pma_portcounters *pma_cnt)
|
||||
{
|
||||
- pma_cnt->port_xmit_data = cpu_to_be32((be64_to_cpu(cnt->tx_bytes)>>2));
|
||||
- pma_cnt->port_rcv_data = cpu_to_be32((be64_to_cpu(cnt->rx_bytes)>>2));
|
||||
- pma_cnt->port_xmit_packets = cpu_to_be32(be64_to_cpu(cnt->tx_frames));
|
||||
- pma_cnt->port_rcv_packets = cpu_to_be32(be64_to_cpu(cnt->rx_frames));
|
||||
+ ASSIGN_32BIT_COUNTER(pma_cnt->port_xmit_data,
|
||||
+ (be64_to_cpu(cnt->tx_bytes) >> 2));
|
||||
+ ASSIGN_32BIT_COUNTER(pma_cnt->port_rcv_data,
|
||||
+ (be64_to_cpu(cnt->rx_bytes) >> 2));
|
||||
+ ASSIGN_32BIT_COUNTER(pma_cnt->port_xmit_packets,
|
||||
+ be64_to_cpu(cnt->tx_frames));
|
||||
+ ASSIGN_32BIT_COUNTER(pma_cnt->port_rcv_packets,
|
||||
+ be64_to_cpu(cnt->rx_frames));
|
||||
}
|
||||
|
||||
static int iboe_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
|
||||
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
|
||||
index f804c1faa7ff..d3b54f7b849f 100644
|
||||
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
|
||||
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/* Offset base used to differentiate between CAPTURE and OUTPUT
|
||||
* while mmaping */
|
||||
-#define DST_QUEUE_OFF_BASE (TASK_SIZE / 2)
|
||||
+#define DST_QUEUE_OFF_BASE (1 << 30)
|
||||
|
||||
#define MFC_BANK1_ALLOC_CTX 0
|
||||
#define MFC_BANK2_ALLOC_CTX 1
|
||||
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h
|
||||
index 71ea77576d22..e783ea0e3837 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/dvm/dev.h
|
||||
+++ b/drivers/net/wireless/iwlwifi/dvm/dev.h
|
||||
@@ -670,7 +670,6 @@ struct iwl_priv {
|
||||
unsigned long reload_jiffies;
|
||||
int reload_count;
|
||||
bool ucode_loaded;
|
||||
- bool init_ucode_run; /* Don't run init uCode again */
|
||||
|
||||
u8 plcp_delta_threshold;
|
||||
|
||||
diff --git a/drivers/net/wireless/iwlwifi/dvm/ucode.c b/drivers/net/wireless/iwlwifi/dvm/ucode.c
|
||||
index 0a1cdc5e856b..5ad94a8080b8 100644
|
||||
--- a/drivers/net/wireless/iwlwifi/dvm/ucode.c
|
||||
+++ b/drivers/net/wireless/iwlwifi/dvm/ucode.c
|
||||
@@ -425,9 +425,6 @@ int iwl_run_init_ucode(struct iwl_priv *priv)
|
||||
if (!priv->fw->img[IWL_UCODE_INIT].sec[0].len)
|
||||
return 0;
|
||||
|
||||
- if (priv->init_ucode_run)
|
||||
- return 0;
|
||||
-
|
||||
iwl_init_notification_wait(&priv->notif_wait, &calib_wait,
|
||||
calib_complete, ARRAY_SIZE(calib_complete),
|
||||
iwlagn_wait_calib, priv);
|
||||
@@ -447,8 +444,6 @@ int iwl_run_init_ucode(struct iwl_priv *priv)
|
||||
*/
|
||||
ret = iwl_wait_notification(&priv->notif_wait, &calib_wait,
|
||||
UCODE_CALIB_TIMEOUT);
|
||||
- if (!ret)
|
||||
- priv->init_ucode_run = true;
|
||||
|
||||
goto out;
|
||||
|
||||
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
|
||||
index 1ad39c799c74..bfe812fcce34 100644
|
||||
--- a/drivers/scsi/be2iscsi/be_main.c
|
||||
+++ b/drivers/scsi/be2iscsi/be_main.c
|
||||
@@ -5080,9 +5080,9 @@ free_port:
|
||||
hba_free:
|
||||
if (phba->msix_enabled)
|
||||
pci_disable_msix(phba->pcidev);
|
||||
- iscsi_host_remove(phba->shost);
|
||||
pci_dev_put(phba->pcidev);
|
||||
iscsi_host_free(phba->shost);
|
||||
+ pci_set_drvdata(pcidev, NULL);
|
||||
disable_pci:
|
||||
pci_disable_device(pcidev);
|
||||
return ret;
|
||||
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
|
||||
index e5953c8018c5..9f3168e8e5a8 100644
|
||||
--- a/drivers/scsi/scsi_lib.c
|
||||
+++ b/drivers/scsi/scsi_lib.c
|
||||
@@ -1242,9 +1242,11 @@ int scsi_prep_state_check(struct scsi_device *sdev, struct request *req)
|
||||
"rejecting I/O to dead device\n");
|
||||
ret = BLKPREP_KILL;
|
||||
break;
|
||||
- case SDEV_QUIESCE:
|
||||
case SDEV_BLOCK:
|
||||
case SDEV_CREATED_BLOCK:
|
||||
+ ret = BLKPREP_DEFER;
|
||||
+ break;
|
||||
+ case SDEV_QUIESCE:
|
||||
/*
|
||||
* If the devices is blocked we defer normal commands.
|
||||
*/
|
||||
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
|
||||
index 9559ea749d83..5a3ea20e9cb5 100644
|
||||
--- a/drivers/target/iscsi/iscsi_target.c
|
||||
+++ b/drivers/target/iscsi/iscsi_target.c
|
||||
@@ -1179,7 +1179,7 @@ iscsit_handle_scsi_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
|
||||
* traditional iSCSI block I/O.
|
||||
*/
|
||||
if (iscsit_allocate_iovecs(cmd) < 0) {
|
||||
- return iscsit_add_reject_cmd(cmd,
|
||||
+ return iscsit_reject_cmd(cmd,
|
||||
ISCSI_REASON_BOOKMARK_NO_RESOURCES, buf);
|
||||
}
|
||||
immed_data = cmd->immediate_data;
|
||||
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
|
||||
index 0e57bcb8e3f7..2320e20d5be7 100644
|
||||
--- a/drivers/usb/host/xhci-pci.c
|
||||
+++ b/drivers/usb/host/xhci-pci.c
|
||||
@@ -94,6 +94,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
xhci->quirks |= XHCI_INTEL_HOST;
|
||||
+ xhci->quirks |= XHCI_AVOID_BEI;
|
||||
}
|
||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
|
||||
pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) {
|
||||
@@ -109,7 +110,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
* PPT chipsets.
|
||||
*/
|
||||
xhci->quirks |= XHCI_SPURIOUS_REBOOT;
|
||||
- xhci->quirks |= XHCI_AVOID_BEI;
|
||||
}
|
||||
if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
|
||||
pdev->device == PCI_DEVICE_ID_ASROCK_P67) {
|
||||
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
|
||||
index cf127a080644..4d918d5f945a 100644
|
||||
--- a/drivers/usb/serial/ftdi_sio.c
|
||||
+++ b/drivers/usb/serial/ftdi_sio.c
|
||||
@@ -620,6 +620,7 @@ static struct usb_device_id id_table_combined [] = {
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
+ { USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) },
|
||||
/*
|
||||
* ELV devices:
|
||||
*/
|
||||
@@ -1899,8 +1900,12 @@ static int ftdi_8u2232c_probe(struct usb_serial *serial)
|
||||
{
|
||||
struct usb_device *udev = serial->dev;
|
||||
|
||||
- if ((udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems")) ||
|
||||
- (udev->product && !strcmp(udev->product, "BeagleBone/XDS100V2")))
|
||||
+ if (udev->manufacturer && !strcmp(udev->manufacturer, "CALAO Systems"))
|
||||
+ return ftdi_jtag_probe(serial);
|
||||
+
|
||||
+ if (udev->product &&
|
||||
+ (!strcmp(udev->product, "BeagleBone/XDS100V2") ||
|
||||
+ !strcmp(udev->product, "SNAP Connect E10")))
|
||||
return ftdi_jtag_probe(serial);
|
||||
|
||||
return 0;
|
||||
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
|
||||
index e8d352615297..e906b6aa2424 100644
|
||||
--- a/drivers/usb/serial/ftdi_sio_ids.h
|
||||
+++ b/drivers/usb/serial/ftdi_sio_ids.h
|
||||
@@ -561,6 +561,12 @@
|
||||
*/
|
||||
#define FTDI_NT_ORIONLXM_PID 0x7c90 /* OrionLXm Substation Automation Platform */
|
||||
|
||||
+/*
|
||||
+ * Synapse Wireless product ids (FTDI_VID)
|
||||
+ * http://www.synapse-wireless.com
|
||||
+ */
|
||||
+#define FTDI_SYNAPSE_SS200_PID 0x9090 /* SS200 - SNAP Stick 200 */
|
||||
+
|
||||
|
||||
/********************************/
|
||||
/** third-party VID/PID combos **/
|
||||
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
|
||||
index 5fcc10fa62bd..f4a8577c3e91 100644
|
||||
--- a/fs/cifs/file.c
|
||||
+++ b/fs/cifs/file.c
|
||||
@@ -1789,6 +1789,7 @@ refind_writable:
|
||||
cifsFileInfo_put(inv_file);
|
||||
spin_lock(&cifs_file_list_lock);
|
||||
++refind;
|
||||
+ inv_file = NULL;
|
||||
goto refind_writable;
|
||||
}
|
||||
}
|
||||
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
|
||||
index 46387e49aa46..8cd6474e248f 100644
|
||||
--- a/fs/ocfs2/file.c
|
||||
+++ b/fs/ocfs2/file.c
|
||||
@@ -2372,10 +2372,14 @@ out_dio:
|
||||
/* buffered aio wouldn't have proper lock coverage today */
|
||||
BUG_ON(ret == -EIOCBQUEUED && !(file->f_flags & O_DIRECT));
|
||||
|
||||
+ if (unlikely(written <= 0))
|
||||
+ goto no_sync;
|
||||
+
|
||||
if (((file->f_flags & O_DSYNC) && !direct_io) || IS_SYNC(inode) ||
|
||||
((file->f_flags & O_DIRECT) && !direct_io)) {
|
||||
- ret = filemap_fdatawrite_range(file->f_mapping, *ppos,
|
||||
- *ppos + count - 1);
|
||||
+ ret = filemap_fdatawrite_range(file->f_mapping,
|
||||
+ iocb->ki_pos - written,
|
||||
+ iocb->ki_pos - 1);
|
||||
if (ret < 0)
|
||||
written = ret;
|
||||
|
||||
@@ -2388,10 +2392,12 @@ out_dio:
|
||||
}
|
||||
|
||||
if (!ret)
|
||||
- ret = filemap_fdatawait_range(file->f_mapping, *ppos,
|
||||
- *ppos + count - 1);
|
||||
+ ret = filemap_fdatawait_range(file->f_mapping,
|
||||
+ iocb->ki_pos - written,
|
||||
+ iocb->ki_pos - 1);
|
||||
}
|
||||
|
||||
+no_sync:
|
||||
/*
|
||||
* deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io
|
||||
* function pointer which is called when o_direct io completes so that
|
||||
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
|
||||
index 65fc60a07c47..9f285fb9bab3 100644
|
||||
--- a/fs/proc/task_mmu.c
|
||||
+++ b/fs/proc/task_mmu.c
|
||||
@@ -1110,9 +1110,19 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static int pagemap_open(struct inode *inode, struct file *file)
|
||||
+{
|
||||
+ /* do not disclose physical addresses to unprivileged
|
||||
+ userspace (closes a rowhammer attack vector) */
|
||||
+ if (!capable(CAP_SYS_ADMIN))
|
||||
+ return -EPERM;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
const struct file_operations proc_pagemap_operations = {
|
||||
.llseek = mem_lseek, /* borrow this */
|
||||
.read = pagemap_read,
|
||||
+ .open = pagemap_open,
|
||||
};
|
||||
#endif /* CONFIG_PROC_PAGE_MONITOR */
|
||||
|
||||
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
|
||||
index fa1abeb45b76..49c48dda162d 100644
|
||||
--- a/include/linux/blk_types.h
|
||||
+++ b/include/linux/blk_types.h
|
||||
@@ -170,7 +170,9 @@ enum rq_flag_bits {
|
||||
__REQ_ELVPRIV, /* elevator private data attached */
|
||||
__REQ_FAILED, /* set if the request failed */
|
||||
__REQ_QUIET, /* don't worry about errors */
|
||||
- __REQ_PREEMPT, /* set for "ide_preempt" requests */
|
||||
+ __REQ_PREEMPT, /* set for "ide_preempt" requests and also
|
||||
+ for requests for which the SCSI "quiesce"
|
||||
+ state must be ignored. */
|
||||
__REQ_ALLOCED, /* request came from our alloc pool */
|
||||
__REQ_COPY_USER, /* contains copies of user pages */
|
||||
__REQ_FLUSH_SEQ, /* request for flush sequence */
|
||||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
|
||||
index e9ef6d6b51d5..341551c7b4c8 100644
|
||||
--- a/include/linux/kernel.h
|
||||
+++ b/include/linux/kernel.h
|
||||
@@ -29,6 +29,19 @@
|
||||
#define ULLONG_MAX (~0ULL)
|
||||
#define SIZE_MAX (~(size_t)0)
|
||||
|
||||
+#define U8_MAX ((u8)~0U)
|
||||
+#define S8_MAX ((s8)(U8_MAX>>1))
|
||||
+#define S8_MIN ((s8)(-S8_MAX - 1))
|
||||
+#define U16_MAX ((u16)~0U)
|
||||
+#define S16_MAX ((s16)(U16_MAX>>1))
|
||||
+#define S16_MIN ((s16)(-S16_MAX - 1))
|
||||
+#define U32_MAX ((u32)~0U)
|
||||
+#define S32_MAX ((s32)(U32_MAX>>1))
|
||||
+#define S32_MIN ((s32)(-S32_MAX - 1))
|
||||
+#define U64_MAX ((u64)~0ULL)
|
||||
+#define S64_MAX ((s64)(U64_MAX>>1))
|
||||
+#define S64_MIN ((s64)(-S64_MAX - 1))
|
||||
+
|
||||
#define STACK_MAGIC 0xdeadbeef
|
||||
|
||||
#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
|
||||
diff --git a/ipc/compat.c b/ipc/compat.c
|
||||
index 892f6585dd60..d3b376025e9b 100644
|
||||
--- a/ipc/compat.c
|
||||
+++ b/ipc/compat.c
|
||||
@@ -381,7 +381,7 @@ COMPAT_SYSCALL_DEFINE6(ipc, u32, call, int, first, int, second,
|
||||
uptr = compat_ptr(ipck.msgp);
|
||||
fifth = ipck.msgtyp;
|
||||
}
|
||||
- return do_msgrcv(first, uptr, second, fifth, third,
|
||||
+ return do_msgrcv(first, uptr, second, (s32)fifth, third,
|
||||
compat_do_msg_fill);
|
||||
}
|
||||
case MSGGET:
|
||||
diff --git a/kernel/printk.c b/kernel/printk.c
|
||||
index f7aff4bd5454..fd0154a57d6e 100644
|
||||
--- a/kernel/printk.c
|
||||
+++ b/kernel/printk.c
|
||||
@@ -107,7 +107,7 @@ static struct console *exclusive_console;
|
||||
*/
|
||||
struct console_cmdline
|
||||
{
|
||||
- char name[8]; /* Name of the driver */
|
||||
+ char name[16]; /* Name of the driver */
|
||||
int index; /* Minor dev. to use */
|
||||
char *options; /* Options for the driver */
|
||||
#ifdef CONFIG_A11Y_BRAILLE_CONSOLE
|
||||
@@ -2290,6 +2290,8 @@ void register_console(struct console *newcon)
|
||||
*/
|
||||
for (i = 0; i < MAX_CMDLINECONSOLES && console_cmdline[i].name[0];
|
||||
i++) {
|
||||
+ BUILD_BUG_ON(sizeof(console_cmdline[i].name) !=
|
||||
+ sizeof(newcon->name));
|
||||
if (strcmp(console_cmdline[i].name, newcon->name) != 0)
|
||||
continue;
|
||||
if (newcon->index >= 0 &&
|
||||
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
|
||||
index 1ad92b46753e..2298237db142 100644
|
||||
--- a/mm/memory_hotplug.c
|
||||
+++ b/mm/memory_hotplug.c
|
||||
@@ -1039,6 +1039,10 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
|
||||
return NULL;
|
||||
|
||||
arch_refresh_nodedata(nid, pgdat);
|
||||
+ } else {
|
||||
+ /* Reset the nr_zones and classzone_idx to 0 before reuse */
|
||||
+ pgdat->nr_zones = 0;
|
||||
+ pgdat->classzone_idx = 0;
|
||||
}
|
||||
|
||||
/* we can use NODE_DATA(nid) from here */
|
||||
@@ -1802,15 +1806,6 @@ void try_offline_node(int nid)
|
||||
if (is_vmalloc_addr(zone->wait_table))
|
||||
vfree(zone->wait_table);
|
||||
}
|
||||
-
|
||||
- /*
|
||||
- * Since there is no way to guarentee the address of pgdat/zone is not
|
||||
- * on stack of any kernel threads or used by other kernel objects
|
||||
- * without reference counting or other symchronizing method, do not
|
||||
- * reset node_data and free pgdat here. Just reset it to 0 and reuse
|
||||
- * the memory when the node is online again.
|
||||
- */
|
||||
- memset(pgdat, 0, sizeof(*pgdat));
|
||||
}
|
||||
EXPORT_SYMBOL(try_offline_node);
|
||||
|
||||
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
|
||||
index 73cbc5dc150b..b034f79deb0e 100644
|
||||
--- a/mm/page-writeback.c
|
||||
+++ b/mm/page-writeback.c
|
||||
@@ -793,8 +793,11 @@ static void bdi_update_write_bandwidth(struct backing_dev_info *bdi,
|
||||
* bw * elapsed + write_bandwidth * (period - elapsed)
|
||||
* write_bandwidth = ---------------------------------------------------
|
||||
* period
|
||||
+ *
|
||||
+ * @written may have decreased due to account_page_redirty().
|
||||
+ * Avoid underflowing @bw calculation.
|
||||
*/
|
||||
- bw = written - bdi->written_stamp;
|
||||
+ bw = written - min(written, bdi->written_stamp);
|
||||
bw *= HZ;
|
||||
if (unlikely(elapsed > period)) {
|
||||
do_div(bw, elapsed);
|
||||
@@ -858,7 +861,7 @@ static void global_update_bandwidth(unsigned long thresh,
|
||||
unsigned long now)
|
||||
{
|
||||
static DEFINE_SPINLOCK(dirty_lock);
|
||||
- static unsigned long update_time;
|
||||
+ static unsigned long update_time = INITIAL_JIFFIES;
|
||||
|
||||
/*
|
||||
* check locklessly first to optimize away locking for the most time
|
||||
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
|
||||
index 913dc4f49b10..92b5e1f7d3b0 100644
|
||||
--- a/net/ipv4/tcp_output.c
|
||||
+++ b/net/ipv4/tcp_output.c
|
||||
@@ -2909,6 +2909,7 @@ static int tcp_send_syn_data(struct sock *sk, struct sk_buff *syn)
|
||||
goto fallback;
|
||||
syn_data->ip_summed = CHECKSUM_PARTIAL;
|
||||
memcpy(syn_data->cb, syn->cb, sizeof(syn->cb));
|
||||
+ skb_shinfo(syn_data)->gso_segs = 1;
|
||||
if (unlikely(memcpy_fromiovecend(skb_put(syn_data, space),
|
||||
fo->data->msg_iov, 0, space))) {
|
||||
kfree_skb(syn_data);
|
||||
diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c
|
||||
index 612a5ddaf93b..799bafc2af39 100644
|
||||
--- a/net/llc/sysctl_net_llc.c
|
||||
+++ b/net/llc/sysctl_net_llc.c
|
||||
@@ -18,28 +18,28 @@ static struct ctl_table llc2_timeout_table[] = {
|
||||
{
|
||||
.procname = "ack",
|
||||
.data = &sysctl_llc2_ack_timeout,
|
||||
- .maxlen = sizeof(long),
|
||||
+ .maxlen = sizeof(sysctl_llc2_ack_timeout),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
{
|
||||
.procname = "busy",
|
||||
.data = &sysctl_llc2_busy_timeout,
|
||||
- .maxlen = sizeof(long),
|
||||
+ .maxlen = sizeof(sysctl_llc2_busy_timeout),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
{
|
||||
.procname = "p",
|
||||
.data = &sysctl_llc2_p_timeout,
|
||||
- .maxlen = sizeof(long),
|
||||
+ .maxlen = sizeof(sysctl_llc2_p_timeout),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
{
|
||||
.procname = "rej",
|
||||
.data = &sysctl_llc2_rej_timeout,
|
||||
- .maxlen = sizeof(long),
|
||||
+ .maxlen = sizeof(sysctl_llc2_rej_timeout),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec_jiffies,
|
||||
},
|
||||
diff --git a/net/netfilter/nfnetlink_queue_core.c b/net/netfilter/nfnetlink_queue_core.c
|
||||
index 2b8199f68785..5497f50af2f0 100644
|
||||
--- a/net/netfilter/nfnetlink_queue_core.c
|
||||
+++ b/net/netfilter/nfnetlink_queue_core.c
|
||||
@@ -228,7 +228,7 @@ nfqnl_flush(struct nfqnl_instance *queue, nfqnl_cmpfn cmpfn, unsigned long data)
|
||||
}
|
||||
|
||||
static int
|
||||
-nfqnl_zcopy(struct sk_buff *to, const struct sk_buff *from, int len, int hlen)
|
||||
+nfqnl_zcopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
|
||||
{
|
||||
int i, j = 0;
|
||||
int plen = 0; /* length of skb->head fragment */
|
||||
diff --git a/net/rds/sysctl.c b/net/rds/sysctl.c
|
||||
index 907214b4c4d0..fc6cbe827856 100644
|
||||
--- a/net/rds/sysctl.c
|
||||
+++ b/net/rds/sysctl.c
|
||||
@@ -71,14 +71,14 @@ static ctl_table rds_sysctl_rds_table[] = {
|
||||
{
|
||||
.procname = "max_unacked_packets",
|
||||
.data = &rds_sysctl_max_unacked_packets,
|
||||
- .maxlen = sizeof(unsigned long),
|
||||
+ .maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{
|
||||
.procname = "max_unacked_bytes",
|
||||
.data = &rds_sysctl_max_unacked_bytes,
|
||||
- .maxlen = sizeof(unsigned long),
|
||||
+ .maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
|
||||
index ff427733c290..464be51025f6 100644
|
||||
--- a/security/selinux/selinuxfs.c
|
||||
+++ b/security/selinux/selinuxfs.c
|
||||
@@ -150,7 +150,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
|
||||
goto out;
|
||||
|
||||
/* No partial writes. */
|
||||
- length = EINVAL;
|
||||
+ length = -EINVAL;
|
||||
if (*ppos != 0)
|
||||
goto out;
|
||||
|
||||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
|
||||
index 4008034b6ebe..a8eb7fe2766e 100644
|
||||
--- a/sound/pci/hda/patch_realtek.c
|
||||
+++ b/sound/pci/hda/patch_realtek.c
|
||||
@@ -266,7 +266,7 @@ static void alc_auto_setup_eapd(struct hda_codec *codec, bool on)
|
||||
{
|
||||
/* We currently only handle front, HP */
|
||||
static hda_nid_t pins[] = {
|
||||
- 0x0f, 0x10, 0x14, 0x15, 0
|
||||
+ 0x0f, 0x10, 0x14, 0x15, 0x17, 0
|
||||
};
|
||||
hda_nid_t *p;
|
||||
for (p = pins; *p; p++)
|
||||
@@ -3363,6 +3363,7 @@ enum {
|
||||
ALC269_FIXUP_QUANTA_MUTE,
|
||||
ALC269_FIXUP_LIFEBOOK,
|
||||
ALC269_FIXUP_LIFEBOOK_EXTMIC,
|
||||
+ ALC269_FIXUP_LIFEBOOK_HP_PIN,
|
||||
ALC269_FIXUP_AMIC,
|
||||
ALC269_FIXUP_DMIC,
|
||||
ALC269VB_FIXUP_AMIC,
|
||||
@@ -3477,6 +3478,13 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
{ }
|
||||
},
|
||||
},
|
||||
+ [ALC269_FIXUP_LIFEBOOK_HP_PIN] = {
|
||||
+ .type = HDA_FIXUP_PINS,
|
||||
+ .v.pins = (const struct hda_pintbl[]) {
|
||||
+ { 0x21, 0x0221102f }, /* HP out */
|
||||
+ { }
|
||||
+ },
|
||||
+ },
|
||||
[ALC269_FIXUP_AMIC] = {
|
||||
.type = HDA_FIXUP_PINS,
|
||||
.v.pins = (const struct hda_pintbl[]) {
|
||||
@@ -3727,6 +3735,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
|
||||
SND_PCI_QUIRK(0x1025, 0x0742, "Acer AO756", ALC271_FIXUP_HP_GATE_MIC_JACK),
|
||||
SND_PCI_QUIRK_VENDOR(0x1025, "Acer Aspire", ALC271_FIXUP_DMIC),
|
||||
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
|
||||
+ SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
|
||||
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
|
||||
SND_PCI_QUIRK(0x17aa, 0x20f2, "Thinkpad SL410/510", ALC269_FIXUP_SKU_IGNORE),
|
||||
SND_PCI_QUIRK(0x17aa, 0x215e, "Thinkpad L512", ALC269_FIXUP_SKU_IGNORE),
|
||||
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
|
||||
index c89a5bf5c00e..c311681bd390 100644
|
||||
--- a/sound/usb/mixer_quirks.c
|
||||
+++ b/sound/usb/mixer_quirks.c
|
||||
@@ -175,6 +175,7 @@ static const struct rc_config {
|
||||
{ USB_ID(0x041e, 0x3040), 2, 2, 6, 6, 2, 0x6e91 }, /* Live! 24-bit */
|
||||
{ USB_ID(0x041e, 0x3042), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 */
|
||||
{ USB_ID(0x041e, 0x30df), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
|
||||
+ { USB_ID(0x041e, 0x3237), 0, 1, 1, 1, 1, 0x000d }, /* Usb X-Fi S51 Pro */
|
||||
{ USB_ID(0x041e, 0x3048), 2, 2, 6, 6, 2, 0x6e91 }, /* Toshiba SB0500 */
|
||||
};
|
||||
|
Loading…
Add table
Reference in a new issue