Merge tag 'v3.10.63' into update
This is the 3.10.63 stable release
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 10
|
||||
SUBLEVEL = 62
|
||||
SUBLEVEL = 63
|
||||
EXTRAVERSION =
|
||||
NAME = TOSSUG Baby Fish
|
||||
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
/*
|
||||
* sched_clock.c: support for extending counters to full 64-bit ns counter
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/syscore_ops.h>
|
||||
#include <linux/timer.h>
|
||||
|
||||
#include <asm/sched_clock.h>
|
||||
|
||||
struct clock_data {
|
||||
u64 epoch_ns;
|
||||
u32 epoch_cyc;
|
||||
u32 epoch_cyc_copy;
|
||||
unsigned long rate;
|
||||
u32 mult;
|
||||
u32 shift;
|
||||
bool suspended;
|
||||
bool needs_suspend;
|
||||
};
|
||||
|
||||
static void sched_clock_poll(unsigned long wrap_ticks);
|
||||
static DEFINE_TIMER(sched_clock_timer, sched_clock_poll, 0, 0);
|
||||
static int irqtime = -1;
|
||||
|
||||
core_param(irqtime, irqtime, int, 0400);
|
||||
|
||||
static struct clock_data cd = {
|
||||
.mult = NSEC_PER_SEC / HZ,
|
||||
};
|
||||
|
||||
static u32 __read_mostly sched_clock_mask = 0xffffffff;
|
||||
|
||||
static u32 notrace jiffy_sched_clock_read(void)
|
||||
{
|
||||
return (u32)(jiffies - INITIAL_JIFFIES);
|
||||
}
|
||||
|
||||
static u32 __read_mostly (*read_sched_clock)(void) = jiffy_sched_clock_read;
|
||||
|
||||
static inline u64 notrace cyc_to_ns(u64 cyc, u32 mult, u32 shift)
|
||||
{
|
||||
return (cyc * mult) >> shift;
|
||||
}
|
||||
|
||||
static unsigned long long notrace sched_clock_32(void)
|
||||
{
|
||||
u64 epoch_ns;
|
||||
u32 epoch_cyc;
|
||||
u32 cyc;
|
||||
|
||||
if (cd.suspended)
|
||||
return cd.epoch_ns;
|
||||
|
||||
/*
|
||||
* Load the epoch_cyc and epoch_ns atomically. We do this by
|
||||
* ensuring that we always write epoch_cyc, epoch_ns and
|
||||
* epoch_cyc_copy in strict order, and read them in strict order.
|
||||
* If epoch_cyc and epoch_cyc_copy are not equal, then we're in
|
||||
* the middle of an update, and we should repeat the load.
|
||||
*/
|
||||
do {
|
||||
epoch_cyc = cd.epoch_cyc;
|
||||
smp_rmb();
|
||||
epoch_ns = cd.epoch_ns;
|
||||
smp_rmb();
|
||||
} while (epoch_cyc != cd.epoch_cyc_copy);
|
||||
|
||||
cyc = read_sched_clock();
|
||||
cyc = (cyc - epoch_cyc) & sched_clock_mask;
|
||||
return epoch_ns + cyc_to_ns(cyc, cd.mult, cd.shift);
|
||||
}
|
||||
|
||||
/*
|
||||
* Atomically update the sched_clock epoch.
|
||||
*/
|
||||
static void notrace update_sched_clock(void)
|
||||
{
|
||||
unsigned long flags;
|
||||
u32 cyc;
|
||||
u64 ns;
|
||||
|
||||
cyc = read_sched_clock();
|
||||
ns = cd.epoch_ns +
|
||||
cyc_to_ns((cyc - cd.epoch_cyc) & sched_clock_mask,
|
||||
cd.mult, cd.shift);
|
||||
/*
|
||||
* Write epoch_cyc and epoch_ns in a way that the update is
|
||||
* detectable in cyc_to_fixed_sched_clock().
|
||||
*/
|
||||
raw_local_irq_save(flags);
|
||||
cd.epoch_cyc_copy = cyc;
|
||||
smp_wmb();
|
||||
cd.epoch_ns = ns;
|
||||
smp_wmb();
|
||||
cd.epoch_cyc = cyc;
|
||||
raw_local_irq_restore(flags);
|
||||
}
|
||||
|
||||
static void sched_clock_poll(unsigned long wrap_ticks)
|
||||
{
|
||||
mod_timer(&sched_clock_timer, round_jiffies(jiffies + wrap_ticks));
|
||||
update_sched_clock();
|
||||
}
|
||||
|
||||
void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate)
|
||||
{
|
||||
unsigned long r, w;
|
||||
u64 res, wrap;
|
||||
char r_unit;
|
||||
|
||||
if (cd.rate > rate)
|
||||
return;
|
||||
|
||||
BUG_ON(bits > 32);
|
||||
WARN_ON(!irqs_disabled());
|
||||
read_sched_clock = read;
|
||||
sched_clock_mask = (1 << bits) - 1;
|
||||
cd.rate = rate;
|
||||
|
||||
/* calculate the mult/shift to convert counter ticks to ns. */
|
||||
clocks_calc_mult_shift(&cd.mult, &cd.shift, rate, NSEC_PER_SEC, 0);
|
||||
|
||||
r = rate;
|
||||
if (r >= 4000000) {
|
||||
r /= 1000000;
|
||||
r_unit = 'M';
|
||||
} else if (r >= 1000) {
|
||||
r /= 1000;
|
||||
r_unit = 'k';
|
||||
} else
|
||||
r_unit = ' ';
|
||||
|
||||
/* calculate how many ns until we wrap */
|
||||
wrap = cyc_to_ns((1ULL << bits) - 1, cd.mult, cd.shift);
|
||||
do_div(wrap, NSEC_PER_MSEC);
|
||||
w = wrap;
|
||||
|
||||
/* calculate the ns resolution of this counter */
|
||||
res = cyc_to_ns(1ULL, cd.mult, cd.shift);
|
||||
pr_info("sched_clock: %u bits at %lu%cHz, resolution %lluns, wraps every %lums\n",
|
||||
bits, r, r_unit, res, w);
|
||||
|
||||
/*
|
||||
* Start the timer to keep sched_clock() properly updated and
|
||||
* sets the initial epoch.
|
||||
*/
|
||||
sched_clock_timer.data = msecs_to_jiffies(w - (w / 10));
|
||||
update_sched_clock();
|
||||
|
||||
/*
|
||||
* Ensure that sched_clock() starts off at 0ns
|
||||
*/
|
||||
cd.epoch_ns = 0;
|
||||
|
||||
/* Enable IRQ time accounting if we have a fast enough sched_clock */
|
||||
if (irqtime > 0 || (irqtime == -1 && rate >= 1000000))
|
||||
enable_sched_clock_irqtime();
|
||||
|
||||
pr_debug("Registered %pF as sched_clock source\n", read);
|
||||
}
|
||||
|
||||
unsigned long long __read_mostly (*sched_clock_func)(void) = sched_clock_32;
|
||||
|
||||
unsigned long long notrace sched_clock(void)
|
||||
{
|
||||
return sched_clock_func();
|
||||
}
|
||||
|
||||
void __init sched_clock_postinit(void)
|
||||
{
|
||||
/*
|
||||
* If no sched_clock function has been provided at that point,
|
||||
* make it the final one one.
|
||||
*/
|
||||
if (read_sched_clock == jiffy_sched_clock_read)
|
||||
setup_sched_clock(jiffy_sched_clock_read, 32, HZ);
|
||||
|
||||
sched_clock_poll(sched_clock_timer.data);
|
||||
}
|
||||
|
||||
static int sched_clock_suspend(void)
|
||||
{
|
||||
sched_clock_poll(sched_clock_timer.data);
|
||||
cd.suspended = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sched_clock_resume(void)
|
||||
{
|
||||
cd.epoch_cyc = read_sched_clock();
|
||||
cd.epoch_cyc_copy = cd.epoch_cyc;
|
||||
cd.suspended = false;
|
||||
}
|
||||
|
||||
static struct syscore_ops sched_clock_ops = {
|
||||
.suspend = sched_clock_suspend,
|
||||
.resume = sched_clock_resume,
|
||||
};
|
||||
|
||||
static int __init sched_clock_syscore_init(void)
|
||||
{
|
||||
register_syscore_ops(&sched_clock_ops);
|
||||
return 0;
|
||||
}
|
||||
device_initcall(sched_clock_syscore_init);
|
||||
@@ -30,8 +30,8 @@
|
||||
V_FUNCTION_BEGIN(__kernel_getcpu)
|
||||
.cfi_startproc
|
||||
mfspr r5,SPRN_USPRG3
|
||||
cmpdi cr0,r3,0
|
||||
cmpdi cr1,r4,0
|
||||
cmpwi cr0,r3,0
|
||||
cmpwi cr1,r4,0
|
||||
clrlwi r6,r5,16
|
||||
rlwinm r7,r5,16,31-15,31-0
|
||||
beq cr0,1f
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
#define EXIT_REASON_EOI_INDUCED 45
|
||||
#define EXIT_REASON_EPT_VIOLATION 48
|
||||
#define EXIT_REASON_EPT_MISCONFIG 49
|
||||
#define EXIT_REASON_INVEPT 50
|
||||
#define EXIT_REASON_PREEMPTION_TIMER 52
|
||||
#define EXIT_REASON_WBINVD 54
|
||||
#define EXIT_REASON_XSETBV 55
|
||||
|
||||
@@ -6242,6 +6242,12 @@ static int handle_vmptrst(struct kvm_vcpu *vcpu)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int handle_invept(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
|
||||
@@ -6286,6 +6292,7 @@ static int (*const kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = {
|
||||
[EXIT_REASON_PAUSE_INSTRUCTION] = handle_pause,
|
||||
[EXIT_REASON_MWAIT_INSTRUCTION] = handle_invalid_op,
|
||||
[EXIT_REASON_MONITOR_INSTRUCTION] = handle_invalid_op,
|
||||
[EXIT_REASON_INVEPT] = handle_invept,
|
||||
};
|
||||
|
||||
static const int kvm_vmx_max_exit_handlers =
|
||||
@@ -6512,6 +6519,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:
|
||||
/*
|
||||
* VMX instructions trap unconditionally. This allows L1 to
|
||||
* emulate them for its L2 guest, i.e., allows 3-level nesting!
|
||||
|
||||
@@ -320,6 +320,9 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(INTEL, 0x8c87), board_ahci }, /* 9 Series RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x8c8e), board_ahci }, /* 9 Series RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x8c8f), board_ahci }, /* 9 Series RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x9d03), board_ahci }, /* Sunrise Point-LP AHCI */
|
||||
{ PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */
|
||||
{ PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H RAID */
|
||||
{ PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */
|
||||
@@ -491,6 +494,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
|
||||
* enabled. https://bugzilla.kernel.org/show_bug.cgi?id=60731
|
||||
*/
|
||||
{ PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_nomsi },
|
||||
{ PCI_VDEVICE(SAMSUNG, 0xa800), board_ahci_nomsi },
|
||||
|
||||
/* Enmotus */
|
||||
{ PCI_DEVICE(0x1c44, 0x8000), board_ahci },
|
||||
|
||||
@@ -1501,7 +1501,7 @@ static int sata_fsl_probe(struct platform_device *ofdev)
|
||||
host_priv->csr_base = csr_base;
|
||||
|
||||
irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
|
||||
if (irq < 0) {
|
||||
if (!irq) {
|
||||
dev_err(&ofdev->dev, "invalid irq from platform\n");
|
||||
goto error_exit_with_cleanup;
|
||||
}
|
||||
|
||||
@@ -1097,6 +1097,17 @@ bool intel_lvds_init(struct drm_device *dev)
|
||||
int pipe;
|
||||
u8 pin;
|
||||
|
||||
/*
|
||||
* Unlock registers and just leave them unlocked. Do this before
|
||||
* checking quirk lists to avoid bogus WARNINGs.
|
||||
*/
|
||||
if (HAS_PCH_SPLIT(dev)) {
|
||||
I915_WRITE(PCH_PP_CONTROL,
|
||||
I915_READ(PCH_PP_CONTROL) | PANEL_UNLOCK_REGS);
|
||||
} else {
|
||||
I915_WRITE(PP_CONTROL,
|
||||
I915_READ(PP_CONTROL) | PANEL_UNLOCK_REGS);
|
||||
}
|
||||
if (!intel_lvds_supported(dev))
|
||||
return false;
|
||||
|
||||
@@ -1280,17 +1291,6 @@ out:
|
||||
DRM_DEBUG_KMS("detected %s-link lvds configuration\n",
|
||||
lvds_encoder->is_dual_link ? "dual" : "single");
|
||||
|
||||
/*
|
||||
* Unlock registers and just
|
||||
* leave them unlocked
|
||||
*/
|
||||
if (HAS_PCH_SPLIT(dev)) {
|
||||
I915_WRITE(PCH_PP_CONTROL,
|
||||
I915_READ(PCH_PP_CONTROL) | PANEL_UNLOCK_REGS);
|
||||
} else {
|
||||
I915_WRITE(PP_CONTROL,
|
||||
I915_READ(PP_CONTROL) | PANEL_UNLOCK_REGS);
|
||||
}
|
||||
lvds_connector->lid_notifier.notifier_call = intel_lid_notify;
|
||||
if (acpi_lid_notifier_register(&lvds_connector->lid_notifier)) {
|
||||
DRM_DEBUG_KMS("lid notifier registration failed\n");
|
||||
|
||||
@@ -666,6 +666,8 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
|
||||
|
||||
/* Get associated drm_crtc: */
|
||||
drmcrtc = &rdev->mode_info.crtcs[crtc]->base;
|
||||
if (!drmcrtc)
|
||||
return -EINVAL;
|
||||
|
||||
/* Helper routine in DRM core does all the work: */
|
||||
return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,
|
||||
|
||||
@@ -414,11 +414,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop)
|
||||
if (dev->cmd_err & DAVINCI_I2C_STR_NACK) {
|
||||
if (msg->flags & I2C_M_IGNORE_NAK)
|
||||
return msg->len;
|
||||
if (stop) {
|
||||
w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG);
|
||||
w |= DAVINCI_I2C_MDR_STP;
|
||||
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w);
|
||||
}
|
||||
w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG);
|
||||
w |= DAVINCI_I2C_MDR_STP;
|
||||
davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w);
|
||||
return -EREMOTEIO;
|
||||
}
|
||||
return -EIO;
|
||||
|
||||
@@ -928,14 +928,12 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
|
||||
if (stat & OMAP_I2C_STAT_NACK) {
|
||||
err |= OMAP_I2C_STAT_NACK;
|
||||
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK);
|
||||
break;
|
||||
}
|
||||
|
||||
if (stat & OMAP_I2C_STAT_AL) {
|
||||
dev_err(dev->dev, "Arbitration lost\n");
|
||||
err |= OMAP_I2C_STAT_AL;
|
||||
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -960,11 +958,13 @@ omap_i2c_isr_thread(int this_irq, void *dev_id)
|
||||
if (dev->fifo_size)
|
||||
num_bytes = dev->buf_len;
|
||||
|
||||
omap_i2c_receive_data(dev, num_bytes, true);
|
||||
|
||||
if (dev->errata & I2C_OMAP_ERRATA_I207)
|
||||
if (dev->errata & I2C_OMAP_ERRATA_I207) {
|
||||
i2c_omap_errata_i207(dev, stat);
|
||||
num_bytes = (omap_i2c_read_reg(dev,
|
||||
OMAP_I2C_BUFSTAT_REG) >> 8) & 0x3F;
|
||||
}
|
||||
|
||||
omap_i2c_receive_data(dev, num_bytes, true);
|
||||
omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2139,7 +2139,7 @@ static int smiapp_set_selection(struct v4l2_subdev *subdev,
|
||||
ret = smiapp_set_compose(subdev, fh, sel);
|
||||
break;
|
||||
default:
|
||||
BUG();
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
mutex_unlock(&sensor->mutex);
|
||||
|
||||
@@ -8392,7 +8392,8 @@ static int tg3_init_rings(struct tg3 *tp)
|
||||
if (tnapi->rx_rcb)
|
||||
memset(tnapi->rx_rcb, 0, TG3_RX_RCB_RING_BYTES(tp));
|
||||
|
||||
if (tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
|
||||
if (tnapi->prodring.rx_std &&
|
||||
tg3_rx_prodring_alloc(tp, &tnapi->prodring)) {
|
||||
tg3_free_rings(tp);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -1584,6 +1584,8 @@ void igb_power_up_link(struct igb_adapter *adapter)
|
||||
igb_power_up_phy_copper(&adapter->hw);
|
||||
else
|
||||
igb_power_up_serdes_link_82575(&adapter->hw);
|
||||
|
||||
igb_setup_link(&adapter->hw);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
/* Various constants */
|
||||
|
||||
/* Coalescing */
|
||||
#define MVNETA_TXDONE_COAL_PKTS 16
|
||||
#define MVNETA_TXDONE_COAL_PKTS 1
|
||||
#define MVNETA_RX_COAL_PKTS 32
|
||||
#define MVNETA_RX_COAL_USEC 100
|
||||
|
||||
|
||||
@@ -1207,7 +1207,7 @@ static int qp_alloc_res(struct mlx4_dev *dev, int slave, int op, int cmd,
|
||||
|
||||
switch (op) {
|
||||
case RES_OP_RESERVE:
|
||||
count = get_param_l(&in_param);
|
||||
count = get_param_l(&in_param) & 0xffffff;
|
||||
align = get_param_h(&in_param);
|
||||
err = __mlx4_qp_reserve_range(dev, count, align, &base);
|
||||
if (err)
|
||||
|
||||
@@ -459,9 +459,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev,
|
||||
len = skb_frag_size(frag);
|
||||
offset = frag->page_offset;
|
||||
|
||||
/* Data must not cross a page boundary. */
|
||||
BUG_ON(len + offset > PAGE_SIZE<<compound_order(page));
|
||||
|
||||
/* Skip unused frames from start of page */
|
||||
page += offset >> PAGE_SHIFT;
|
||||
offset &= ~PAGE_MASK;
|
||||
@@ -469,8 +466,6 @@ static void xennet_make_frags(struct sk_buff *skb, struct net_device *dev,
|
||||
while (len > 0) {
|
||||
unsigned long bytes;
|
||||
|
||||
BUG_ON(offset >= PAGE_SIZE);
|
||||
|
||||
bytes = PAGE_SIZE - offset;
|
||||
if (bytes > len)
|
||||
bytes = len;
|
||||
|
||||
@@ -1493,6 +1493,7 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type,
|
||||
sb->s_blocksize - offset : towrite;
|
||||
|
||||
tmp_bh.b_state = 0;
|
||||
tmp_bh.b_size = sb->s_blocksize;
|
||||
err = ext2_get_block(inode, blk, &tmp_bh, 1);
|
||||
if (err < 0)
|
||||
goto out;
|
||||
|
||||
+3
-1
@@ -244,8 +244,10 @@ int __frontswap_store(struct page *page)
|
||||
the (older) page from frontswap
|
||||
*/
|
||||
inc_frontswap_failed_stores();
|
||||
if (dup)
|
||||
if (dup) {
|
||||
__frontswap_clear(sis, offset);
|
||||
frontswap_ops->invalidate_page(type, offset);
|
||||
}
|
||||
}
|
||||
if (frontswap_writethrough_enabled)
|
||||
/* report failure so swap also writes to swap device */
|
||||
|
||||
+12
-12
@@ -839,20 +839,20 @@ copy_one_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
|
||||
if (!pte_file(pte)) {
|
||||
swp_entry_t entry = pte_to_swp_entry(pte);
|
||||
|
||||
if (swap_duplicate(entry) < 0)
|
||||
return entry.val;
|
||||
if (likely(!non_swap_entry(entry))) {
|
||||
if (swap_duplicate(entry) < 0)
|
||||
return entry.val;
|
||||
|
||||
/* make sure dst_mm is on swapoff's mmlist. */
|
||||
if (unlikely(list_empty(&dst_mm->mmlist))) {
|
||||
spin_lock(&mmlist_lock);
|
||||
if (list_empty(&dst_mm->mmlist))
|
||||
list_add(&dst_mm->mmlist,
|
||||
&src_mm->mmlist);
|
||||
spin_unlock(&mmlist_lock);
|
||||
}
|
||||
if (likely(!non_swap_entry(entry)))
|
||||
/* make sure dst_mm is on swapoff's mmlist. */
|
||||
if (unlikely(list_empty(&dst_mm->mmlist))) {
|
||||
spin_lock(&mmlist_lock);
|
||||
if (list_empty(&dst_mm->mmlist))
|
||||
list_add(&dst_mm->mmlist,
|
||||
&src_mm->mmlist);
|
||||
spin_unlock(&mmlist_lock);
|
||||
}
|
||||
rss[MM_SWAPENTS]++;
|
||||
else if (is_migration_entry(entry)) {
|
||||
} else if (is_migration_entry(entry)) {
|
||||
page = migration_entry_to_page(entry);
|
||||
|
||||
if (PageAnon(page))
|
||||
|
||||
@@ -1329,6 +1329,7 @@ static int do_setlink(const struct sk_buff *skb,
|
||||
goto errout;
|
||||
}
|
||||
if (!netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN)) {
|
||||
put_net(net);
|
||||
err = -EPERM;
|
||||
goto errout;
|
||||
}
|
||||
|
||||
+2
-2
@@ -512,11 +512,11 @@ static int ip6gre_rcv(struct sk_buff *skb)
|
||||
|
||||
skb->protocol = gre_proto;
|
||||
/* WCCP version 1 and 2 protocol decoding.
|
||||
* - Change protocol to IP
|
||||
* - Change protocol to IPv6
|
||||
* - When dealing with WCCPv2, Skip extra 4 bytes in GRE header
|
||||
*/
|
||||
if (flags == 0 && gre_proto == htons(ETH_P_WCCP)) {
|
||||
skb->protocol = htons(ETH_P_IP);
|
||||
skb->protocol = htons(ETH_P_IPV6);
|
||||
if ((*(h + offset) & 0xF0) != 0x40)
|
||||
offset += 4;
|
||||
}
|
||||
|
||||
+2
-2
@@ -413,12 +413,12 @@ int sctp_packet_transmit(struct sctp_packet *packet)
|
||||
sk = chunk->skb->sk;
|
||||
|
||||
/* Allocate the new skb. */
|
||||
nskb = alloc_skb(packet->size + LL_MAX_HEADER, GFP_ATOMIC);
|
||||
nskb = alloc_skb(packet->size + MAX_HEADER, GFP_ATOMIC);
|
||||
if (!nskb)
|
||||
goto nomem;
|
||||
|
||||
/* Make sure the outbound skb has enough header room reserved. */
|
||||
skb_reserve(nskb, packet->overhead + LL_MAX_HEADER);
|
||||
skb_reserve(nskb, packet->overhead + MAX_HEADER);
|
||||
|
||||
/* Set the owning socket so that we know where to get the
|
||||
* destination IP address.
|
||||
|
||||
@@ -364,6 +364,8 @@ static void snd_usbmidi_error_timer(unsigned long data)
|
||||
if (in && in->error_resubmit) {
|
||||
in->error_resubmit = 0;
|
||||
for (j = 0; j < INPUT_URBS; ++j) {
|
||||
if (atomic_read(&in->urbs[j]->use_count))
|
||||
continue;
|
||||
in->urbs[j]->dev = umidi->dev;
|
||||
snd_usbmidi_submit_urb(in->urbs[j], GFP_ATOMIC);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user