Skip to content
This repository has been archived by the owner on Mar 17, 2019. It is now read-only.

Commit

Permalink
Merge tag 'v3.18.118' into XOS-8.1
Browse files Browse the repository at this point in the history
This is the 3.18.118 stable release

* tag 'v3.18.118': (86 commits)
  Linux 3.18.118
  jfs: Fix inconsistency between memory allocation and ea_buf->max_size
  ring_buffer: tracing: Inherit the tracing setting to next ring buffer
  scsi: qla2xxx: Return error when TMF returns
  scsi: qla2xxx: Fix ISP recovery on unload
  scsi: sg: fix minor memory leak in error path
  crypto: padlock-aes - Fix Nano workaround data corruption
  virtio_balloon: fix another race between migration and ballooning
  can: ems_usb: Fix memory leak on ems_usb_disconnect()
  squashfs: more metadata hardenings
  squashfs: more metadata hardening
  net: dsa: Do not suspend/resume closed slave_dev
  inet: frag: enforce memory limits earlier
  ipv4: remove BUG_ON() from fib_compute_spec_dst
  tcp: add one more quick ack after after ECN events
  tcp: refactor tcp_ecn_check_ce to remove sk type cast
  tcp: do not aggressively quick ack after ECN events
  tcp: add max_quickacks param to tcp_incr_quickack and tcp_enter_quickack_mode
  tcp: do not force quickack when receiving out-of-order packets
  xen-netfront: wait xenbus state change when load module manually
  ...

Signed-off-by: Harsh Shandilya <[email protected]>
  • Loading branch information
Harsh Shandilya committed Aug 10, 2018
2 parents 6dede41 + 830f967 commit e8269c0
Show file tree
Hide file tree
Showing 79 changed files with 362 additions and 144 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION = 3
PATCHLEVEL = 18
SUBLEVEL = 117
SUBLEVEL = 118
EXTRAVERSION =
NAME = Diseased Newt

Expand Down
10 changes: 6 additions & 4 deletions arch/microblaze/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ $(obj)/linux.bin.gz: $(obj)/linux.bin FORCE
quiet_cmd_cp = CP $< $@$2
cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)

quiet_cmd_strip = STRIP $@
quiet_cmd_strip = STRIP $< $@$2
cmd_strip = $(STRIP) -K microblaze_start -K _end -K __log_buf \
-K _fdt_start vmlinux -o $@
-K _fdt_start $< -o $@$2

UIMAGE_LOADADDR = $(CONFIG_KERNEL_BASE_ADDR)
UIMAGE_IN = $@
UIMAGE_OUT = $@.ub

$(obj)/simpleImage.%: vmlinux FORCE
$(call if_changed,cp,.unstrip)
$(call if_changed,objcopy)
$(call if_changed,uimage)
$(call if_changed,strip)
@echo 'Kernel: $@ is ready' ' (#'`cat .version`')'
$(call if_changed,strip,.strip)
@echo 'Kernel: $(UIMAGE_OUT) is ready' ' (#'`cat .version`')'


clean-files += simpleImage.*.unstrip linux.bin.ub
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/head_8xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ start_here:
tovirt(r6,r6)
lis r5, abatron_pteptrs@h
ori r5, r5, abatron_pteptrs@l
stw r5, 0xf0(r0) /* Must match your Abatron config file */
stw r5, 0xf0(0) /* Must match your Abatron config file */
tophys(r5,r5)
stw r6, 0(r5)

Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/kernel/pci_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/bootmem.h>
#include <linux/syscalls.h>
#include <linux/irq.h>
#include <linux/list.h>
#include <linux/of.h>
Expand Down
6 changes: 4 additions & 2 deletions arch/powerpc/platforms/chrp/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <asm/sections.h>
#include <asm/time.h>

#include <platforms/chrp/chrp.h>

extern spinlock_t rtc_lock;

#define NVRAM_AS0 0x74
Expand Down Expand Up @@ -62,15 +64,15 @@ long __init chrp_time_init(void)
return 0;
}

int chrp_cmos_clock_read(int addr)
static int chrp_cmos_clock_read(int addr)
{
if (nvram_as1 != 0)
outb(addr>>8, nvram_as1);
outb(addr, nvram_as0);
return (inb(nvram_data));
}

void chrp_cmos_clock_write(unsigned long val, int addr)
static void chrp_cmos_clock_write(unsigned long val, int addr)
{
if (nvram_as1 != 0)
outb(addr>>8, nvram_as1);
Expand Down
5 changes: 5 additions & 0 deletions arch/powerpc/platforms/embedded6xx/hlwd-pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
*/
#define HW_BROADWAY_ICR 0x00
#define HW_BROADWAY_IMR 0x04
#define HW_STARLET_ICR 0x08
#define HW_STARLET_IMR 0x0c


/*
Expand Down Expand Up @@ -74,6 +76,9 @@ static void hlwd_pic_unmask(struct irq_data *d)
void __iomem *io_base = irq_data_get_irq_chip_data(d);

setbits32(io_base + HW_BROADWAY_IMR, 1 << irq);

/* Make sure the ARM (aka. Starlet) doesn't handle this interrupt. */
clrbits32(io_base + HW_STARLET_IMR, 1 << irq);
}


Expand Down
4 changes: 3 additions & 1 deletion arch/powerpc/platforms/powermac/bootx_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ void __init bootx_init(unsigned long r3, unsigned long r4)
boot_infos_t *bi = (boot_infos_t *) r4;
unsigned long hdr;
unsigned long space;
unsigned long ptr, x;
unsigned long ptr;
char *model;
unsigned long offset = reloc_offset();

Expand Down Expand Up @@ -561,6 +561,8 @@ void __init bootx_init(unsigned long r3, unsigned long r4)
* MMU switched OFF, so this should not be useful anymore.
*/
if (bi->version < 4) {
unsigned long x __maybe_unused;

bootx_printf("Touching pages...\n");

/*
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/platforms/powermac/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ static int pmac_late_init(void)
}
machine_late_initcall(powermac, pmac_late_init);

void note_bootable_part(dev_t dev, int part, int goodness);
/*
* This is __init_refok because we check for "initializing" before
* touching any of the __init sensitive things and "initializing"
Expand Down
6 changes: 4 additions & 2 deletions arch/s390/include/asm/cpu_mf.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ struct hws_basic_entry {

struct hws_diag_entry {
unsigned int def:16; /* 0-15 Data Entry Format */
unsigned int R:14; /* 16-19 and 20-30 reserved */
unsigned int R:15; /* 16-19 and 20-30 reserved */
unsigned int I:1; /* 31 entry valid or invalid */
u8 data[]; /* Machine-dependent sample data */
} __packed;
Expand All @@ -134,7 +134,9 @@ struct hws_trailer_entry {
unsigned int f:1; /* 0 - Block Full Indicator */
unsigned int a:1; /* 1 - Alert request control */
unsigned int t:1; /* 2 - Timestamp format */
unsigned long long:61; /* 3 - 63: Reserved */
unsigned int :29; /* 3 - 31: Reserved */
unsigned int bsdes:16; /* 32-47: size of basic SDE */
unsigned int dsdes:16; /* 48-63: size of diagnostic SDE */
};
unsigned long long flags; /* 0 - 63: All indicators */
};
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/perf_event_intel_uncore.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void uncore_perf_event_update(struct intel_uncore_box *box, struct perf_event *e
u64 prev_count, new_count, delta;
int shift;

if (event->hw.idx >= UNCORE_PMC_IDX_FIXED)
if (event->hw.idx == UNCORE_PMC_IDX_FIXED)
shift = 64 - uncore_fixed_ctr_bits(box);
else
shift = 64 - uncore_perf_ctr_bits(box);
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/perf_event_intel_uncore_nhmex.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static void nhmex_uncore_msr_enable_event(struct intel_uncore_box *box, struct p
{
struct hw_perf_event *hwc = &event->hw;

if (hwc->idx >= UNCORE_PMC_IDX_FIXED)
if (hwc->idx == UNCORE_PMC_IDX_FIXED)
wrmsrl(hwc->config_base, NHMEX_PMON_CTL_EN_BIT0);
else if (box->pmu->type->event_mask & NHMEX_PMON_CTL_EN_BIT0)
wrmsrl(hwc->config_base, hwc->config | NHMEX_PMON_CTL_EN_BIT22);
Expand Down
1 change: 1 addition & 0 deletions crypto/authenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
CRYPTO_TFM_RES_MASK);

out:
memzero_explicit(&keys, sizeof(keys));
return err;

badkey:
Expand Down
1 change: 1 addition & 0 deletions crypto/authencesn.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ static int crypto_authenc_esn_setkey(struct crypto_aead *authenc_esn, const u8 *
CRYPTO_TFM_RES_MASK);

out:
memzero_explicit(&keys, sizeof(keys));
return err;

badkey:
Expand Down
4 changes: 3 additions & 1 deletion drivers/acpi/pci_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,11 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm,
}

control = OSC_PCI_EXPRESS_CAPABILITY_CONTROL
| OSC_PCI_EXPRESS_NATIVE_HP_CONTROL
| OSC_PCI_EXPRESS_PME_CONTROL;

if (IS_ENABLED(CONFIG_HOTPLUG_PCI_PCIE))
control |= OSC_PCI_EXPRESS_NATIVE_HP_CONTROL;

if (pci_aer_available()) {
if (aer_acpi_firmware_first())
dev_info(&device->dev,
Expand Down
12 changes: 8 additions & 4 deletions drivers/ata/libata-eh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2173,12 +2173,16 @@ static void ata_eh_link_autopsy(struct ata_link *link)
if (qc->err_mask & ~AC_ERR_OTHER)
qc->err_mask &= ~AC_ERR_OTHER;

/* SENSE_VALID trumps dev/unknown error and revalidation */
/*
* SENSE_VALID trumps dev/unknown error and revalidation. Upper
* layers will determine whether the command is worth retrying
* based on the sense data and device class/type. Otherwise,
* determine directly if the command is worth retrying using its
* error mask and flags.
*/
if (qc->flags & ATA_QCFLAG_SENSE_VALID)
qc->err_mask &= ~(AC_ERR_DEV | AC_ERR_OTHER);

/* determine whether the command is worth retrying */
if (ata_eh_worth_retry(qc))
else if (ata_eh_worth_retry(qc))
qc->flags |= ATA_QCFLAG_RETRY;

/* accumulate error info */
Expand Down
10 changes: 9 additions & 1 deletion drivers/char/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,14 +1417,22 @@ static int
write_pool(struct entropy_store *r, const char __user *buffer, size_t count)
{
size_t bytes;
__u32 buf[16];
__u32 t, buf[16];
const char __user *p = buffer;

while (count > 0) {
int b, i = 0;

bytes = min(count, sizeof(buf));
if (copy_from_user(&buf, p, bytes))
return -EFAULT;

for (b = bytes ; b > 0 ; b -= sizeof(__u32), i++) {
if (!arch_get_random_int(&t))
break;
buf[i] ^= t;
}

count -= bytes;
p += bytes;

Expand Down
8 changes: 6 additions & 2 deletions drivers/crypto/padlock-aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,16 @@ static inline void padlock_xcrypt_ecb(const u8 *input, u8 *output, void *key,
return;
}

count -= initial;

if (initial)
asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
: "+S"(input), "+D"(output)
: "d"(control_word), "b"(key), "c"(initial));

asm volatile (".byte 0xf3,0x0f,0xa7,0xc8" /* rep xcryptecb */
: "+S"(input), "+D"(output)
: "d"(control_word), "b"(key), "c"(count - initial));
: "d"(control_word), "b"(key), "c"(count));
}

static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
Expand All @@ -284,14 +286,16 @@ static inline u8 *padlock_xcrypt_cbc(const u8 *input, u8 *output, void *key,
if (count < cbc_fetch_blocks)
return cbc_crypt(input, output, key, iv, control_word, count);

count -= initial;

if (initial)
asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */
: "+S" (input), "+D" (output), "+a" (iv)
: "d" (control_word), "b" (key), "c" (initial));

asm volatile (".byte 0xf3,0x0f,0xa7,0xd0" /* rep xcryptcbc */
: "+S" (input), "+D" (output), "+a" (iv)
: "d" (control_word), "b" (key), "c" (count-initial));
: "d" (control_word), "b" (key), "c" (count));
return iv;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/gma500/psb_intel_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ extern int intelfb_remove(struct drm_device *dev,
extern bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode);
extern int psb_intel_lvds_mode_valid(struct drm_connector *connector,
extern enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode);
extern int psb_intel_lvds_set_property(struct drm_connector *connector,
struct drm_property *property,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/gma500/psb_intel_lvds.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static void psb_intel_lvds_restore(struct drm_connector *connector)
}
}

int psb_intel_lvds_mode_valid(struct drm_connector *connector,
enum drm_mode_status psb_intel_lvds_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct drm_psb_private *dev_priv = connector->dev->dev_private;
Expand Down
10 changes: 5 additions & 5 deletions drivers/gpu/drm/radeon/radeon_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ static int radeon_lvds_get_modes(struct drm_connector *connector)
return ret;
}

static int radeon_lvds_mode_valid(struct drm_connector *connector,
static enum drm_mode_status radeon_lvds_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct drm_encoder *encoder = radeon_best_single_encoder(connector);
Expand Down Expand Up @@ -994,7 +994,7 @@ static int radeon_vga_get_modes(struct drm_connector *connector)
return ret;
}

static int radeon_vga_mode_valid(struct drm_connector *connector,
static enum drm_mode_status radeon_vga_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct drm_device *dev = connector->dev;
Expand Down Expand Up @@ -1133,7 +1133,7 @@ static int radeon_tv_get_modes(struct drm_connector *connector)
return 1;
}

static int radeon_tv_mode_valid(struct drm_connector *connector,
static enum drm_mode_status radeon_tv_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
if ((mode->hdisplay > 1024) || (mode->vdisplay > 768))
Expand Down Expand Up @@ -1464,7 +1464,7 @@ static void radeon_dvi_force(struct drm_connector *connector)
radeon_connector->use_digital = true;
}

static int radeon_dvi_mode_valid(struct drm_connector *connector,
static enum drm_mode_status radeon_dvi_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct drm_device *dev = connector->dev;
Expand Down Expand Up @@ -1761,7 +1761,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
return ret;
}

static int radeon_dp_mode_valid(struct drm_connector *connector,
static enum drm_mode_status radeon_dp_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
struct drm_device *dev = connector->dev;
Expand Down
8 changes: 8 additions & 0 deletions drivers/hid/i2c-hid/i2c-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,14 @@ static int i2c_hid_probe(struct i2c_client *client,
pm_runtime_set_active(&client->dev);
pm_runtime_enable(&client->dev);

/* Make sure there is something at this address */
ret = i2c_smbus_read_byte(client);
if (ret < 0) {
dev_dbg(&client->dev, "nothing at this address: %d\n", ret);
ret = -ENXIO;
goto err_pm;
}

ret = i2c_hid_fetch_hid_descriptor(ihid);
if (ret < 0)
goto err_pm;
Expand Down
11 changes: 7 additions & 4 deletions drivers/infiniband/core/mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,8 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
mad_reg_req->oui, 3)) {
method = &(*vendor_table)->vendor_class[
vclass]->method_table[i];
BUG_ON(!*method);
if (!*method)
goto error3;
goto check_in_use;
}
}
Expand All @@ -1476,10 +1477,12 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
vclass]->oui[i])) {
method = &(*vendor_table)->vendor_class[
vclass]->method_table[i];
BUG_ON(*method);
/* Allocate method table for this OUI */
if ((ret = allocate_method_table(method)))
goto error3;
if (!*method) {
ret = allocate_method_table(method);
if (ret)
goto error3;
}
memcpy((*vendor_table)->vendor_class[vclass]->oui[i],
mad_reg_req->oui, 3);
goto check_in_use;
Expand Down
6 changes: 5 additions & 1 deletion drivers/infiniband/core/ucma.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static struct ucma_multicast* ucma_alloc_multicast(struct ucma_context *ctx)
return NULL;

mutex_lock(&mut);
mc->id = idr_alloc(&multicast_idr, mc, 0, 0, GFP_KERNEL);
mc->id = idr_alloc(&multicast_idr, NULL, 0, 0, GFP_KERNEL);
mutex_unlock(&mut);
if (mc->id < 0)
goto error;
Expand Down Expand Up @@ -1262,6 +1262,10 @@ static ssize_t ucma_process_join(struct ucma_file *file,
goto err3;
}

mutex_lock(&mut);
idr_replace(&multicast_idr, mc, mc->id);
mutex_unlock(&mut);

mutex_unlock(&file->mut);
ucma_put_ctx(ctx);
return 0;
Expand Down
Loading

0 comments on commit e8269c0

Please sign in to comment.