Linux 4.9.9
Greg KH
maintainerI'm announcing the release of the 4.9.9 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm64/crypto/aes-modes.S | 88 +++++++++----------- arch/powerpc/include/asm/cpu_has_feature.h | 2 arch/powerpc/include/asm/mmu.h | 2 arch/powerpc/kernel/eeh_driver.c | 2 arch/powerpc/kernel/prom_init.c | 3 arch/powerpc/mm/pgtable-radix.c | 4 arch/x86/events/intel/uncore.c | 44 ---------- arch/x86/kernel/apic/io_apic.c | 2 arch/x86/kernel/hpet.c | 1 arch/x86/kvm/x86.c | 1 arch/x86/platform/efi/efi_64.c | 16 +++ arch/xtensa/kernel/setup.c | 2 crypto/algapi.c | 1 drivers/ata/libata-core.c | 6 - drivers/ata/sata_mv.c | 3 drivers/base/memory.c | 12 +- drivers/bcma/bcma_private.h | 3 drivers/bcma/driver_chipcommon.c | 11 -- drivers/bcma/driver_mips.c | 3 drivers/dma/cppi41.c | 56 +++++++++--- drivers/firmware/efi/libstub/fdt.c | 14 --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 drivers/gpu/drm/i915/intel_lrc.c | 50 +++++++---- drivers/gpu/drm/nouveau/dispnv04/hw.c | 3 drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c | 2 drivers/hid/hid-cp2112.c | 28 ++---- drivers/hid/hid-ids.h | 3 drivers/hid/hid-lg.c | 2 drivers/hid/usbhid/hid-quirks.c | 1 drivers/hid/wacom_wac.c | 28 +++--- drivers/iio/adc/palmas_gpadc.c | 4 drivers/iio/health/afe4403.c | 4 drivers/iio/health/afe4404.c | 4 drivers/iio/health/max30100.c | 2 drivers/iio/humidity/dht11.c | 6 - drivers/infiniband/hw/cxgb4/qp.c | 5 - drivers/mmc/host/sdhci.c | 3 drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 2 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 - drivers/pci/pcie/aspm.c | 19 ++-- drivers/pinctrl/intel/pinctrl-baytrail.c | 15 ++- drivers/pinctrl/intel/pinctrl-merrifield.c | 3 drivers/regulator/axp20x-regulator.c | 2 drivers/staging/greybus/timesync_platform.c | 6 + drivers/usb/core/quirks.c | 4 drivers/usb/gadget/function/f_fs.c | 13 ++ drivers/usb/musb/musb_core.c | 15 --- drivers/usb/musb/musb_core.h | 1 drivers/usb/serial/option.c | 1 drivers/usb/serial/pl2303.c | 1 drivers/usb/serial/pl2303.h | 1 drivers/usb/serial/qcserial.c | 1 drivers/vhost/vhost.c | 10 -- drivers/virtio/virtio_ring.c | 7 - fs/cifs/readdir.c | 1 fs/dax.c | 5 + fs/ext4/super.c | 9 ++ fs/iomap.c | 3 fs/nfsd/nfs4layouts.c | 5 - fs/nfsd/nfs4state.c | 19 +--- fs/nfsd/state.h | 4 include/linux/irq.h | 17 +++ include/linux/memory_hotplug.h | 3 include/linux/percpu-refcount.h | 4 kernel/cgroup.c | 13 +- kernel/events/core.c | 69 ++++++++++----- kernel/irq/irqdomain.c | 44 ++++++---- kernel/trace/trace_hwlat.c | 8 + mm/filemap.c | 5 + mm/memory_hotplug.c | 28 ++++-- mm/zswap.c | 30 ++++++ net/can/bcm.c | 23 +++-- net/sunrpc/auth_gss/gss_rpc_xdr.c | 2 74 files changed, 506 insertions(+), 321 deletions(-)
Alastair Bridgewater (1):
drm/nouveau/disp/gt215: Fix HDA ELD handling (thus, HDMI audio) on gt215
Aleksander Morgado (1):
USB: serial: qcserial: add Dell DW5570 QDL
Alex Deucher (1):
drm/amdgpu/si: fix crash on headless asics
Alexander Stein (1):
pinctrl: baytrail: Add missing spinlock usage in byt_gpio_irq_handler
Alison Schofield (3):
iio: adc: palmas_gpadc: retrieve a valid iio_dev in suspend/resume
iio: health: afe4404: retrieve a valid iio_dev in suspend/resume
iio: health: afe4403: retrieve a valid iio_dev in suspend/resume
Andy Shevchenko (2):
pinctrl: baytrail: Debounce register is one per community
pinctrl: intel: merrifield: Add missed check in mrfld_config_set()
Ard Biesheuvel (2):
efi/fdt: Avoid FDT manipulation after ExitBootServices()
crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes
Ardinartsev Nikita (1):
HID: hid-lg: Fix immediate disconnection of Logitech Rumblepad 2
Arvind Yadav (1):
ata: sata_mv:- Handle return value of devm_ioremap.
Bjorn Helgaas (1):
PCI/ASPM: Handle PCI-to-PCIe bridges as roots of PCIe hierarchies
Bjørn Mork (1):
USB: serial: option: add device ID for HP lt2523 (Novatel E371)
Chris Wilson (1):
drm/i915/execlists: Reset RING registers upon resume
Colin Ian King (1):
HID: usbhid: Quirk a AMI virtual mouse and keyboard with ALWAYS_POLL
Damien Le Moal (1):
libata: Fix ATA request sense
Dan Streetman (1):
zswap: disable changing params if init fails
Darren Stevens (1):
powerpc: Add missing error check to prom_find_boot_cpu()
Douglas Miller (1):
percpu-refcount: fix reference leak during percpu-atomic transition
Eryu Guan (1):
ext4: validate s_first_meta_bg at mount time
Gabriel Krisman Bertazi (1):
mmc: sdhci: Ignore unexpected CARD_INT interrupts
Gavin Shan (1):
powerpc/eeh: Fix wrong flag passed to eeh_unfreeze_pe()
Greg Kroah-Hartman (1):
Linux 4.9.9
Halil Pasic (1):
vhost: fix initialization for vq->is_le
Ilia Mirkin (1):
drm/nouveau/nv1a,nv1f/disp: fix memory clock rate retrieval
J. Bruce Fields (1):
svcrpc: fix oops in absence of krb5 module
Jason Gerecke (1):
HID: wacom: Fix poor prox handling in 'wacom_pl_irq'
Jiri Kosina (1):
x86/efi: Always map the first physical page into the EFI pagetables
Johan Hovold (2):
HID: cp2112: fix sleep-while-atomic
HID: cp2112: fix gpio-callback error handling
Johannes Berg (1):
iwlwifi: mvm: avoid crash on restart w/o reserved queues
John Brooks (1):
iio: dht11: Use usleep_range instead of msleep for start signal
Jürg Billeter (1):
iwlwifi: fix double hyphen in MODULE_FIRMWARE for 8000
Kinglong Mee (1):
NFSD: Fix a null reference case in find_or_create_lock_stateid()
Lukáš Lalinský (1):
USB: Add quirk for WORLDE easykey.25 MIDI keyboard
Marc Zyngier (1):
irqdomain: Avoid activating interrupts more than once
Marcel J.E. Mol (1):
USB: serial: pl2303: add ATEN device ID
Matt Ranostay (1):
iio: health: max30100: fixed parenthesis around FIFO count check
Max Filippov (1):
xtensa: fix noMMU build on cores with MMU
Michael Ellerman (1):
powerpc: Fix build failure with clang due to BUILD_BUG_ON()
Michael S. Tsirkin (1):
Revert "vring: Force use of DMA API for ARM-based systems with legacy devices"
Michal Hocko (2):
mm, fs: check for fatal signals in do_generic_file_read()
fs: break out of iomap_file_buffered_write on fatal signals
Oliver Hartkopp (1):
can: bcm: fix hrtimer/tasklet termination in bcm op removal
Peter Zijlstra (2):
perf/core: Fix use-after-free bug
perf/core: Fix PERF_RECORD_MMAP2 prot/flags for anonymous memory
Rabin Vincent (1):
cifs: initialize file_info_lock
Radim Krčmář (1):
KVM: x86: do not save guest-unsupported XSAVE state
Rafał Miłecki (1):
Revert "bcma: init serial console directly from ChipCommon code"
Rask Ingemann Lambertsen (1):
regulator: axp20x: AXP806: Fix dcdcb being set instead of dcdce
Reza Arbab (1):
powerpc/mm: Use the correct pointer when setting a 2MB pte
Rui Miguel Silva (1):
staging: greybus: timesync: validate platform state callback
Salvatore Benedetto (1):
crypto: api - Clear CRYPTO_ALG_DEAD bit before registering an alg
Steve Wise (1):
iw_cxgb4: set correct FetchBurstMax for QPs
Steven Rostedt (VMware) (1):
tracing: Fix hwlat kthread migration
Tejun Heo (2):
libata: apply MAX_SEC_1024 to all CX1-JB*-HP devices
cgroup: don't online subsystems before cgroup_name/path() are operational
Thomas Gleixner (2):
perf/x86/intel/uncore: Clean up hotplug conversion fallout x86/irq: Make irq activate operations symmetric
Tony Lindgren (3):
dmaengine: cppi41: Fix runtime PM timeouts with USB mass storage
dmaengine: cppi41: Fix oops in cppi41_runtime_resume
usb: musb: Fix host mode error -71 regression
Toshi Kani (2):
mm/memory_hotplug.c: check start_pfn in test_pages_in_a_zone() base/memory, hotplug: fix a kernel oops in show_valid_zones()
Vincent Pelletier (1):
usb: gadget: f_fs: Assorted buffer overflow checks.
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 8 +SUBLEVEL = 9 EXTRAVERSION = NAME = Roaring Lionus
arch/arm64/crypto/aes-modes.S +42 -46
167 lines not on this page · raw message
arch/powerpc/include/asm/cpu_has_feature.h +2 -0
@@ -23,7 +23,9 @@ static __always_inline bool cpu_has_feature(unsigned long feature) {int i; +#ifndef __clang__/* clang can't cope with this */ BUILD_BUG_ON (!__builtin_constant_p (feature)); +#endif #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG if (!static_key_initialized) {
arch/powerpc/include/asm/mmu.h +2 -0
@@ -160,7 +160,9 @@ static __always_inline bool mmu_has_feature(unsigned long feature) {int i; +#ifndef __clang__/* clang can't cope with this */ BUILD_BUG_ON (!__builtin_constant_p (feature)); +#endif #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG if (!static_key_initialized) {
arch/powerpc/kernel/eeh_driver.c +1 -1
@@ -545,7 +545,7 @@ static void *eeh_pe_detach_dev(void *data, void *userdata)static void *__eeh_clear_pe_frozen_state (void *data,void *flag) {struct eeh_pe *pe = (struct eeh_pe *)data; -bool *clear_sw_state = flag; +bool clear_sw_state = *(bool *)flag;int i, rc =1 ;for (i =0 ; rc && i <3 ; i++)
arch/powerpc/kernel/prom_init.c +3 -0
@@ -2747,6 +2747,9 @@ static void __init prom_find_boot_cpu(void) cpu_pkg =call_prom ("instance-to-package" ,1 ,1 , prom_cpu); +if (!PHANDLE_VALID (cpu_pkg)) +return ; +prom_getprop (cpu_pkg,"reg" , &rval,sizeof (rval)); prom.cpu =be32_to_cpu (rval);
arch/powerpc/mm/pgtable-radix.c +2 -2
@@ -65,7 +65,7 @@ int radix__map_kernel_page(unsigned long ea, unsigned long pa,if (!pmdp)return -ENOMEM ;if (map_page_size ==PMD_SIZE ) { - ptep = (pte_t *)pudp; + ptep =pmdp_ptep (pmdp); goto set_the_pte; } ptep =pte_alloc_kernel (pmdp, ea);
@@ -90,7 +90,7 @@ int radix__map_kernel_page(unsigned long ea, unsigned long pa, } pmdp =pmd_offset (pudp, ea);if (map_page_size ==PMD_SIZE ) { - ptep = (pte_t *)pudp; + ptep =pmdp_ptep (pmdp); goto set_the_pte; }if (!pmd_present (*pmdp)) {
arch/x86/events/intel/uncore.c +4 -40
82 lines not on this page · raw message
arch/x86/kernel/apic/io_apic.c +2 -0
@@ -2118,6 +2118,7 @@ static inline void __init check_timer(void)if (idx !=-1 &&irq_trigger (idx))unmask_ioapic_irq (irq_get_chip_data (0 )); } +irq_domain_deactivate_irq (irq_data);irq_domain_activate_irq (irq_data);if (timer_irq_works ()) {if (disable_timer_pin_1 >0 )
@@ -2139,6 +2140,7 @@ static inline void __init check_timer(void)* legacy devices should be connected to IO APIC #0 */ replace_pin_at_irq_node (data, node, apic1, pin1, apic2, pin2); +irq_domain_deactivate_irq (irq_data);irq_domain_activate_irq (irq_data); legacy_pic->unmask (0 );if (timer_irq_works ()) {
arch/x86/kernel/hpet.c +1 -0
@@ -352,6 +352,7 @@ static int hpet_resume(struct clock_event_device *evt, int timer) }else {struct hpet_dev *hdev =EVT_TO_HPET_DEV (evt); +irq_domain_deactivate_irq (irq_get_irq_data (hdev->irq));irq_domain_activate_irq (irq_get_irq_data (hdev->irq));disable_irq (hdev->irq);irq_set_affinity (hdev->irq,cpumask_of (hdev->cpu));
arch/x86/kvm/x86.c +1 -0
@@ -3148,6 +3148,7 @@ static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)memcpy (dest, xsave,XSAVE_HDR_OFFSET );/* Set XSTATE_BV */ + xstate_bv &= vcpu->arch.guest_supported_xcr0 |XFEATURE_MASK_FPSSE ; *(u64 *)(dest +XSAVE_HDR_OFFSET ) = xstate_bv;/*
arch/x86/platform/efi/efi_64.c +16 -0
@@ -269,6 +269,22 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) efi_scratch.use_pgd = true;/* +* Certain firmware versions are way too sentimential and still believe +* they are exclusive and unquestionable owners of the first physical page, +* even though they explicitly mark it as EFI_CONVENTIONAL_MEMORY +* (but then write-access it later during SetVirtualAddressMap()). +* +* Create a 1:1 mapping for this page, to avoid triple faults during early +* boot with such firmware. We are free to hand this page to the BIOS, +* as trim_bios_range() will reserve the first page and isolate it away +* from memory allocators anyway. +*/ +if (kernel_map_pages_in_pgd (pgd,0x0 ,0x0 ,1 , _PAGE_RW)) { +pr_err ("Failed to create 1:1 mapping for the first page!\n" ); +return 1 ; + } + +/* * When making calls to the firmware everything needs to be 1:1 * mapped and addressable with 32-bit pointers. Map the kernel * text and allocate a new stack because we can't rely on the
arch/xtensa/kernel/setup.c +1 -1
@@ -540,7 +540,7 @@ subsys_initcall(topology_init);void cpu_reset (void ) { -#if XCHAL_HAVE_PTP_MMU +#if XCHAL_HAVE_PTP_MMU &&IS_ENABLED (CONFIG_MMU )local_irq_disable ();/* * We have full MMU: all autoload ways, ways 7, 8 and 9 of DTLB must
crypto/algapi.c +1 -0
@@ -356,6 +356,7 @@ int crypto_register_alg(struct crypto_alg *alg)struct crypto_larval *larval;int err; + alg->cra_flags &= ~CRYPTO_ALG_DEAD ; err =crypto_check_alg (alg);if (err)return err;
drivers/ata/libata-core.c +4 -2
@@ -1695,6 +1695,8 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,if (qc->err_mask & ~AC_ERR_OTHER ) qc->err_mask &= ~AC_ERR_OTHER ; + }else if (qc->tf.command ==ATA_CMD_REQ_SENSE_DATA ) { + qc->result_tf.command |=ATA_SENSE ; }/* finish up */
@@ -4316,10 +4318,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "ST380013AS", "3.20", ATA_HORKAGE_MAX_SEC_1024 },/* -* Device times out with higher max sects. +* These devices time out with higher max sects. * https://bugzilla.kernel.org/show_bug.cgi?id=121671 */ - { "LITEON CX1-JB256-HP", NULL, ATA_HORKAGE_MAX_SEC_1024 }, + { "LITEON CX1-JB*-HP", NULL, ATA_HORKAGE_MAX_SEC_1024 },/* Devices we expect to fail diagnostics */
drivers/ata/sata_mv.c +3 -0
@@ -4132,6 +4132,9 @@ static int mv_platform_probe(struct platform_device *pdev) host->iomap =NULL ; hpriv->base =devm_ioremap (&pdev->dev, res->start,resource_size (res)); +if (!hpriv->base) +return -ENOMEM ; + hpriv->base -=SATAHC0_REG_BASE ; hpriv->clk =clk_get (&pdev->dev,NULL );
drivers/base/memory.c +6 -6
@@ -391,33 +391,33 @@ static ssize_t show_valid_zones(struct device *dev, {struct memory_block *mem =to_memory_block (dev);unsigned long start_pfn, end_pfn; +unsigned long valid_start, valid_end, valid_pages;unsigned long nr_pages =PAGES_PER_SECTION * sections_per_block; -struct page *first_page;struct zone *zone;int zone_shift =0 ; start_pfn =section_nr_to_pfn (mem->start_section_nr); end_pfn = start_pfn + nr_pages; - first_page =pfn_to_page (start_pfn);/* The block contains more than one zone can not be offlined. */ -if (!test_pages_in_a_zone (start_pfn, end_pfn)) +if (!test_pages_in_a_zone (start_pfn, end_pfn, &valid_start, &valid_end))return sprintf (buf,"none\n" ); - zone =page_zone (first_page); + zone =page_zone (pfn_to_page (valid_start)); + valid_pages = valid_end - valid_start;/* MMOP_ONLINE_KEEP */ sprintf (buf,"%s" , zone->name);/* MMOP_ONLINE_KERNEL */ -zone_can_shift (start_pfn, nr_pages,ZONE_NORMAL , &zone_shift); +zone_can_shift (valid_start, valid_pages,ZONE_NORMAL , &zone_shift);if (zone_shift) {strcat (buf," " );strcat (buf, (zone + zone_shift)->name); }/* MMOP_ONLINE_MOVABLE */ -zone_can_shift (start_pfn, nr_pages,ZONE_MOVABLE , &zone_shift); +zone_can_shift (valid_start, valid_pages,ZONE_MOVABLE , &zone_shift);if (zone_shift) {strcat (buf," " );strcat (buf, (zone + zone_shift)->name);
drivers/bcma/bcma_private.h +3 -0
@@ -45,6 +45,9 @@ int bcma_sprom_get(struct bcma_bus *bus);void bcma_core_chipcommon_early_init (struct bcma_drv_cc *cc);void bcma_core_chipcommon_init (struct bcma_drv_cc *cc);void bcma_chipco_bcm4331_ext_pa_lines_ctl (struct bcma_drv_cc *cc,bool enable); +#ifdef CONFIG_BCMA_DRIVER_MIPS +void bcma_chipco_serial_init (struct bcma_drv_cc *cc); +#endif /* CONFIG_BCMA_DRIVER_MIPS */ /* driver_chipcommon_b.c */ int bcma_core_chipcommon_b_init (struct bcma_drv_cc_b *ccb);
drivers/bcma/driver_chipcommon.c +3 -8
@@ -15,8 +15,6 @@#include <linux/platform_device.h> #include <linux/bcma/bcma.h> -static void bcma_chipco_serial_init (struct bcma_drv_cc *cc); -static inline u32 bcma_cc_write32_masked (struct bcma_drv_cc *cc,u16 offset,u32 mask,u32 value) {
@@ -186,9 +184,6 @@ void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc)if (cc->capabilities &BCMA_CC_CAP_PMU )bcma_pmu_early_init (cc); -if (IS_BUILTIN (CONFIG_BCM47XX ) && bus->hosttype ==BCMA_HOSTTYPE_SOC ) -bcma_chipco_serial_init (cc); -if (bus->hosttype ==BCMA_HOSTTYPE_SOC )bcma_core_chipcommon_flash_detect (cc);
@@ -378,9 +373,9 @@ u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value)return res; } -static void bcma_chipco_serial_init (struct bcma_drv_cc *cc) +#ifdef CONFIG_BCMA_DRIVER_MIPS +void bcma_chipco_serial_init (struct bcma_drv_cc *cc) { -#if IS_BUILTIN (CONFIG_BCM47XX )unsigned int irq;u32 baud_base;u32 i;
@@ -422,5 +417,5 @@ static void bcma_chipco_serial_init(struct bcma_drv_cc *cc) ports[i].baud_base = baud_base; ports[i].reg_shift = 0; } -#endif /* CONFIG_BCM47XX */ } +#endif /* CONFIG_BCMA_DRIVER_MIPS */
drivers/bcma/driver_mips.c +3 -0
@@ -278,9 +278,12 @@ static void bcma_core_mips_nvram_init(struct bcma_drv_mips *mcore)void bcma_core_mips_early_init (struct bcma_drv_mips *mcore) { +struct bcma_bus *bus = mcore->core->bus; +if (mcore->early_setup_done)return ; +bcma_chipco_serial_init (&bus->drv_cc);bcma_core_mips_nvram_init (mcore); mcore->early_setup_done = true;
drivers/dma/cppi41.c +41 -15
117 lines not on this page · raw message
drivers/firmware/efi/libstub/fdt.c +3 -11
@@ -187,6 +187,7 @@ static efi_status_t update_fdt_memmap(void *fdt, struct efi_boot_memmap *map)struct exit_boot_struct {efi_memory_desc_t *runtime_map;int *runtime_entry_count; +void *new_fdt_addr; }; static efi_status_t exit_boot_func(efi_system_table_t *sys_table_arg,
@@ -202,7 +203,7 @@ static efi_status_t exit_boot_func(efi_system_table_t *sys_table_arg,efi_get_virtmap (*map->map, *map->map_size, *map->desc_size, p->runtime_map, p->runtime_entry_count); -return EFI_SUCCESS ; +return update_fdt_memmap (p->new_fdt_addr, map); }/*
@@ -300,22 +301,13 @@ efi_status_t allocate_new_fdt_and_exit_boot(efi_system_table_t *sys_table, priv.runtime_map = runtime_map; priv.runtime_entry_count = &runtime_entry_count; + priv.new_fdt_addr = (void *)*new_fdt_addr; status =efi_exit_boot_services (sys_table, handle, &map, &priv, exit_boot_func);if (status ==EFI_SUCCESS ) {efi_set_virtual_address_map_t *svam; - status =update_fdt_memmap ((void *)*new_fdt_addr, &map); -if (status !=EFI_SUCCESS ) { -/* -* The kernel won't get far without the memory map, but -* may still be able to print something meaningful so -* return success here. -*/ -return EFI_SUCCESS ; - } -/* Install the new virtual address map */ svam = sys_table->runtime->set_virtual_address_map; status = svam(runtime_entry_count * desc_size, desc_size,
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +3 -1
@@ -227,6 +227,9 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev) }WREG32 (HDP_REG_COHERENCY_FLUSH_CNTL ,0 ); +if (adev->mode_info.num_crtc) +amdgpu_display_set_vga_render_state (adev, false); +gmc_v6_0_mc_stop (adev, &save);if (gmc_v6_0_wait_for_idle ((void *)adev)) {
@@ -256,7 +259,6 @@ static void gmc_v6_0_mc_program(struct amdgpu_device *adev)dev_warn (adev->dev,"Wait for MC idle timedout !\n" ); }gmc_v6_0_mc_resume (adev, &save); -amdgpu_display_set_vga_render_state (adev, false); }static int gmc_v6_0_mc_init (struct amdgpu_device *adev)
drivers/gpu/drm/i915/intel_lrc.c +31 -19
61 lines not on this page · raw message
drivers/gpu/drm/nouveau/dispnv04/hw.c +2 -1
@@ -222,6 +222,7 @@ nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype)uint32_t mpllP;pci_read_config_dword (pci_get_bus_and_slot (0 ,3 ),0x6c , &mpllP); + mpllP = (mpllP >>8 ) &0xf ;if (!mpllP) mpllP =4 ;
@@ -232,7 +233,7 @@ nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype)uint32_t clock;pci_read_config_dword (pci_get_bus_and_slot (0 ,5 ),0x4c , &clock); -return clock; +return clock /1000 ; } ret =nouveau_hw_get_pllvals (dev, plltype, &pllvals);
drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c +1 -1
@@ -59,7 +59,7 @@ gt215_hda_eld(NV50_DISP_MTHD_V1) ); }for (i =0 ; i < size; i++) -nvkm_wr32 (device,0x61c440 + soff, (i <<8 ) | args->v0.data[0 ]); +nvkm_wr32 (device,0x61c440 + soff, (i <<8 ) | args->v0.data[i]);for (; i <0x60 ; i++)nvkm_wr32 (device,0x61c440 + soff, (i <<8 ));nvkm_mask (device,0x61c448 + soff,0x80000003 ,0x80000003 );
drivers/hid/hid-cp2112.c +12 -16
@@ -167,7 +167,7 @@ struct cp2112_device {atomic_t xfer_avail;struct gpio_chip gc;u8 *in_out_buffer; -spinlock_t lock; +struct mutex lock; };static int gpio_push_pull =0xFF ;
@@ -179,10 +179,9 @@ static int cp2112_gpio_direction_input(struct gpio_chip *chip, unsigned offset)struct cp2112_device *dev =gpiochip_get_data (chip);struct hid_device *hdev = dev->hdev;u8 *buf = dev->in_out_buffer; -unsigned long flags;int ret; -spin_lock_irqsave (&dev->lock, flags); +mutex_lock (&dev->lock); ret = hid_hw_raw_request(hdev, CP2112_GPIO_CONFIG, buf, CP2112_GPIO_CONFIG_LENGTH, HID_FEATURE_REPORT,
@@ -206,8 +205,8 @@ static int cp2112_gpio_direction_input(struct gpio_chip *chip, unsigned offset) ret =0 ; exit: -spin_unlock_irqrestore (&dev->lock, flags); -return ret <=0 ? ret : -EIO ; +mutex_unlock (&dev->lock); +return ret <0 ? ret : -EIO ; }static void cp2112_gpio_set (struct gpio_chip *chip,unsigned offset,int value)
@@ -215,10 +214,9 @@ static void cp2112_gpio_set(struct gpio_chip *chip, unsigned offset, int value)struct cp2112_device *dev =gpiochip_get_data (chip);struct hid_device *hdev = dev->hdev;u8 *buf = dev->in_out_buffer; -unsigned long flags;int ret; -spin_lock_irqsave (&dev->lock, flags); +mutex_lock (&dev->lock); buf[0 ] =CP2112_GPIO_SET ; buf[1 ] = value ?0xff :0 ;
@@ -230,7 +228,7 @@ static void cp2112_gpio_set(struct gpio_chip *chip, unsigned offset, int value)if (ret <0 )hid_err (hdev,"error setting GPIO values: %d\n" , ret); -spin_unlock_irqrestore (&dev->lock, flags); +mutex_unlock (&dev->lock); }static int cp2112_gpio_get (struct gpio_chip *chip,unsigned offset)
@@ -238,10 +236,9 @@ static int cp2112_gpio_get(struct gpio_chip *chip, unsigned offset)struct cp2112_device *dev =gpiochip_get_data (chip);struct hid_device *hdev = dev->hdev;u8 *buf = dev->in_out_buffer; -unsigned long flags;int ret; -spin_lock_irqsave (&dev->lock, flags); +mutex_lock (&dev->lock); ret = hid_hw_raw_request(hdev, CP2112_GPIO_GET, buf, CP2112_GPIO_GET_LENGTH, HID_FEATURE_REPORT,
@@ -255,7 +252,7 @@ static int cp2112_gpio_get(struct gpio_chip *chip, unsigned offset) ret = (buf[1 ] >> offset) &1 ; exit: -spin_unlock_irqrestore (&dev->lock, flags); +mutex_unlock (&dev->lock);return ret; }
@@ -266,10 +263,9 @@ static int cp2112_gpio_direction_output(struct gpio_chip *chip,struct cp2112_device *dev =gpiochip_get_data (chip);struct hid_device *hdev = dev->hdev;u8 *buf = dev->in_out_buffer; -unsigned long flags;int ret; -spin_lock_irqsave (&dev->lock, flags); +mutex_lock (&dev->lock); ret = hid_hw_raw_request(hdev, CP2112_GPIO_CONFIG, buf, CP2112_GPIO_CONFIG_LENGTH, HID_FEATURE_REPORT,
@@ -290,7 +286,7 @@ static int cp2112_gpio_direction_output(struct gpio_chip *chip, goto fail; } -spin_unlock_irqrestore (&dev->lock, flags); +mutex_unlock (&dev->lock);/* * Set gpio value when output direction is already set,
@@ -301,7 +297,7 @@ static int cp2112_gpio_direction_output(struct gpio_chip *chip,return 0 ; fail: -spin_unlock_irqrestore (&dev->lock, flags); +mutex_unlock (&dev->lock);return ret <0 ? ret : -EIO ; }
@@ -1057,7 +1053,7 @@ static int cp2112_probe(struct hid_device *hdev, const struct hid_device_id *id)if (!dev->in_out_buffer)return -ENOMEM ; -spin_lock_init (&dev->lock); +mutex_init (&dev->lock); ret =hid_parse (hdev);if (ret) {
drivers/hid/hid-ids.h +3 -0
@@ -76,6 +76,9 @@#define USB_VENDOR_ID_ALPS_JP 0x044E#define HID_DEVICE_ID_ALPS_U1_DUAL 0x120B +#define USB_VENDOR_ID_AMI 0x046b +#define USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE 0xff10 +#define USB_VENDOR_ID_ANTON 0x1130#define USB_DEVICE_ID_ANTON_TOUCH_PAD 0x3101
drivers/hid/hid-lg.c +1 -1
@@ -872,7 +872,7 @@ static const struct hid_device_id lg_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WINGMAN_FFG), .driver_data = LG_NOGET | LG_FF4 }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), - .driver_data = LG_FF2 }, + .driver_data = LG_NOGET | LG_FF2 }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FLIGHT_SYSTEM_G940), .driver_data = LG_FF3 }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACENAVIGATOR),
drivers/hid/usbhid/hid-quirks.c +1 -0
@@ -57,6 +57,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS, HID_QUIRK_NOGET }, { USB_VENDOR_ID_AKAI, USB_DEVICE_ID_AKAI_MPKMINI2, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX, HID_QUIRK_NO_INIT_REPORTS }, + { USB_VENDOR_ID_AMI, USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE, HID_QUIRK_ALWAYS_POLL }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
drivers/hid/wacom_wac.c +15 -13
@@ -164,19 +164,21 @@ static int wacom_pl_irq(struct wacom_wac *wacom) wacom->id[0 ] =STYLUS_DEVICE_ID ; } - pressure = (signed char )((data[7 ] <<1 ) | ((data[4 ] >>2 ) &1 )); -if (features->pressure_max >255 ) - pressure = (pressure <<1 ) | ((data[4 ] >>6 ) &1 ); - pressure += (features->pressure_max +1 ) /2 ; - -input_report_abs (input,ABS_X , data[3 ] | (data[2 ] <<7 ) | ((data[1 ] &0x03 ) <<14 )); -input_report_abs (input,ABS_Y , data[6 ] | (data[5 ] <<7 ) | ((data[4 ] &0x03 ) <<14 )); -input_report_abs (input,ABS_PRESSURE , pressure); - -input_report_key (input,BTN_TOUCH , data[4 ] &0x08 ); -input_report_key (input,BTN_STYLUS , data[4 ] &0x10 ); -/* Only allow the stylus2 button to be reported for the pen tool. */ -input_report_key (input,BTN_STYLUS2 , (wacom->tool[0 ] ==BTN_TOOL_PEN ) && (data[4 ] &0x20 )); +if (prox) { + pressure = (signed char )((data[7 ] <<1 ) | ((data[4 ] >>2 ) &1 )); +if (features->pressure_max >255 ) + pressure = (pressure <<1 ) | ((data[4 ] >>6 ) &1 ); + pressure += (features->pressure_max +1 ) /2 ; + +input_report_abs (input,ABS_X , data[3 ] | (data[2 ] <<7 ) | ((data[1 ] &0x03 ) <<14 )); +input_report_abs (input,ABS_Y , data[6 ] | (data[5 ] <<7 ) | ((data[4 ] &0x03 ) <<14 )); +input_report_abs (input,ABS_PRESSURE , pressure); + +input_report_key (input,BTN_TOUCH , data[4 ] &0x08 ); +input_report_key (input,BTN_STYLUS , data[4 ] &0x10 ); +/* Only allow the stylus2 button to be reported for the pen tool. */ +input_report_key (input,BTN_STYLUS2 , (wacom->tool[0 ] ==BTN_TOOL_PEN ) && (data[4 ] &0x20 )); + }if (!prox) wacom->id[0 ] =0 ;
drivers/iio/adc/palmas_gpadc.c +2 -2
@@ -775,7 +775,7 @@ static int palmas_adc_wakeup_reset(struct palmas_gpadc *adc)static int palmas_gpadc_suspend (struct device *dev) { -struct iio_dev *indio_dev =dev_to_iio_dev (dev); +struct iio_dev *indio_dev =dev_get_drvdata (dev);struct palmas_gpadc *adc =iio_priv (indio_dev);int wakeup = adc->wakeup1_enable || adc->wakeup2_enable;int ret;
@@ -798,7 +798,7 @@ static int palmas_gpadc_suspend(struct device *dev)static int palmas_gpadc_resume (struct device *dev) { -struct iio_dev *indio_dev =dev_to_iio_dev (dev); +struct iio_dev *indio_dev =dev_get_drvdata (dev);struct palmas_gpadc *adc =iio_priv (indio_dev);int wakeup = adc->wakeup1_enable || adc->wakeup2_enable;int ret;
drivers/iio/health/afe4403.c +2 -2
@@ -422,7 +422,7 @@ MODULE_DEVICE_TABLE(of, afe4403_of_match);static int __maybe_unused afe4403_suspend (struct device *dev) { -struct iio_dev *indio_dev =dev_to_iio_dev (dev); +struct iio_dev *indio_dev =spi_get_drvdata (to_spi_device (dev));struct afe4403_data *afe =iio_priv (indio_dev);int ret;
@@ -443,7 +443,7 @@ static int __maybe_unused afe4403_suspend(struct device *dev)static int __maybe_unused afe4403_resume (struct device *dev) { -struct iio_dev *indio_dev =dev_to_iio_dev (dev); +struct iio_dev *indio_dev =spi_get_drvdata (to_spi_device (dev));struct afe4403_data *afe =iio_priv (indio_dev);int ret;
drivers/iio/health/afe4404.c +2 -2
@@ -428,7 +428,7 @@ MODULE_DEVICE_TABLE(of, afe4404_of_match);static int __maybe_unused afe4404_suspend (struct device *dev) { -struct iio_dev *indio_dev =dev_to_iio_dev (dev); +struct iio_dev *indio_dev =i2c_get_clientdata (to_i2c_client (dev));struct afe4404_data *afe =iio_priv (indio_dev);int ret;
@@ -449,7 +449,7 @@ static int __maybe_unused afe4404_suspend(struct device *dev)static int __maybe_unused afe4404_resume (struct device *dev) { -struct iio_dev *indio_dev =dev_to_iio_dev (dev); +struct iio_dev *indio_dev =i2c_get_clientdata (to_i2c_client (dev));struct afe4404_data *afe =iio_priv (indio_dev);int ret;
drivers/iio/health/max30100.c +1 -1
@@ -238,7 +238,7 @@ static irqreturn_t max30100_interrupt_handler(int irq, void *private)mutex_lock (&data->lock); -while (cnt || (cnt =max30100_fifo_count (data) >0 )) { +while (cnt || (cnt =max30100_fifo_count (data)) >0 ) { ret =max30100_read_measurement (data);if (ret)break ;
drivers/iio/humidity/dht11.c +4 -2
@@ -71,7 +71,8 @@* a) select an implementation using busy loop polling on those systems * b) use the checksum to do some probabilistic decoding */ -#define DHT11_START_TRANSMISSION 18/* ms */ +#define DHT11_START_TRANSMISSION_MIN 18000/* us */ +#define DHT11_START_TRANSMISSION_MAX 20000/* us */ #define DHT11_MIN_TIMERES 34000/* ns */ #define DHT11_THRESHOLD 49000/* ns */ #define DHT11_AMBIG_LOW 23000/* ns */
@@ -228,7 +229,8 @@ static int dht11_read_raw(struct iio_dev *iio_dev, ret =gpio_direction_output (dht11->gpio,0 );if (ret) goto err; -msleep (DHT11_START_TRANSMISSION ); +usleep_range (DHT11_START_TRANSMISSION_MIN , +DHT11_START_TRANSMISSION_MAX ); ret =gpio_direction_input (dht11->gpio);if (ret) goto err;
drivers/infiniband/hw/cxgb4/qp.c +3 -2
@@ -321,7 +321,8 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,FW_RI_RES_WR_DCAEN_V (0 ) |FW_RI_RES_WR_DCACPU_V (0 ) |FW_RI_RES_WR_FBMIN_V (2 ) | -FW_RI_RES_WR_FBMAX_V (2 ) | + (t4_sq_onchip (&wq->sq) ?FW_RI_RES_WR_FBMAX_V (2 ) : +FW_RI_RES_WR_FBMAX_V (3 )) |FW_RI_RES_WR_CIDXFTHRESHO_V (0 ) |FW_RI_RES_WR_CIDXFTHRESH_V (0 ) | FW_RI_RES_WR_EQSIZE_V(eqsize));
@@ -345,7 +346,7 @@ static int create_qp(struct c4iw_rdev *rdev, struct t4_wq *wq,FW_RI_RES_WR_DCAEN_V (0 ) |FW_RI_RES_WR_DCACPU_V (0 ) |FW_RI_RES_WR_FBMIN_V (2 ) | -FW_RI_RES_WR_FBMAX_V (2 ) | +FW_RI_RES_WR_FBMAX_V (3 ) |FW_RI_RES_WR_CIDXFTHRESHO_V (0 ) |FW_RI_RES_WR_CIDXFTHRESH_V (0 ) | FW_RI_RES_WR_EQSIZE_V(eqsize));
drivers/mmc/host/sdhci.c +2 -1
@@ -2719,7 +2719,8 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)if (intmask &SDHCI_INT_RETUNE )mmc_retune_needed (host->mmc); -if (intmask &SDHCI_INT_CARD_INT ) { +if ((intmask &SDHCI_INT_CARD_INT ) && + (host->ier &SDHCI_INT_CARD_INT )) {sdhci_enable_sdio_irq_nolock (host, false); host->thread_isr |=SDHCI_INT_CARD_INT ; result =IRQ_WAKE_THREAD ;
drivers/net/wireless/intel/iwlwifi/iwl-8000.c +1 -1
@@ -91,7 +91,7 @@#define IWL8000_FW_PRE "iwlwifi-8000C-"#define IWL8000_MODULE_FIRMWARE (api) \ - IWL8000_FW_PRE "-" __stringify(api) ".ucode" + IWL8000_FW_PRE __stringify(api) ".ucode"#define IWL8265_FW_PRE "iwlwifi-8265-"#define IWL8265_MODULE_FIRMWARE (api) \
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +4 -3
@@ -1144,9 +1144,10 @@ static void iwl_mvm_realloc_queues_after_restart(struct iwl_mvm *mvm, .frame_limit = IWL_FRAME_LIMIT, }; -/* Make sure reserved queue is still marked as such (or allocated) */ - mvm->queue_info[mvm_sta->reserved_queue].status = -IWL_MVM_QUEUE_RESERVED ; +/* Make sure reserved queue is still marked as such (if allocated) */ +if (mvm_sta->reserved_queue !=IEEE80211_INVAL_HW_QUEUE ) + mvm->queue_info[mvm_sta->reserved_queue].status = +IWL_MVM_QUEUE_RESERVED ;for (i =0 ; i <=IWL_MAX_TID_COUNT ; i++) {struct iwl_mvm_tid_data *tid_data = &mvm_sta->tid_data[i];
drivers/pci/pcie/aspm.c +13 -6
@@ -518,25 +518,32 @@ static struct pcie_link_state *alloc_pcie_link_state(struct pci_dev *pdev) link =kzalloc (sizeof (*link),GFP_KERNEL );if (!link)return NULL ; +INIT_LIST_HEAD (&link->sibling);INIT_LIST_HEAD (&link->children);INIT_LIST_HEAD (&link->link); link->pdev = pdev; -if (pci_pcie_type (pdev) !=PCI_EXP_TYPE_ROOT_PORT ) { + +/* +* Root Ports and PCI/PCI-X to PCIe Bridges are roots of PCIe +* hierarchies. +*/ +if (pci_pcie_type (pdev) ==PCI_EXP_TYPE_ROOT_PORT || +pci_pcie_type (pdev) ==PCI_EXP_TYPE_PCIE_BRIDGE ) { + link->root = link; + }else {struct pcie_link_state *parent; + parent = pdev->bus->parent->self->link_state;if (!parent) {kfree (link);return NULL ; } + link->parent = parent; + link->root = link->parent->root;list_add (&link->link, &parent->children); } -/* Setup a pointer to the root port link */ -if (!link->parent) - link->root = link; -else - link->root = link->parent->root;list_add (&link->sibling, &link_list); pdev->link_state = link;
drivers/pinctrl/intel/pinctrl-baytrail.c +12 -3
@@ -731,16 +731,23 @@ static void __iomem *byt_gpio_reg(struct byt_gpio *vg, unsigned int offset, int reg) {struct byt_community *comm =byt_get_community (vg, offset); -u32 reg_offset =0 ; +u32 reg_offset;if (!comm)return NULL ; offset -= comm->pin_base; -if (reg ==BYT_INT_STAT_REG ) +switch (reg) { +case BYT_INT_STAT_REG : reg_offset = (offset /32 ) *4 ; -else +break ; +case BYT_DEBOUNCE_REG : + reg_offset =0 ; +break ; +default : reg_offset = comm->pad_map[offset] *16 ; +break ; + }return comm->reg_base + reg_offset + reg; }
@@ -1612,7 +1619,9 @@ static void byt_gpio_irq_handler(struct irq_desc *desc)continue ; } +raw_spin_lock (&vg->lock); pending =readl (reg); +raw_spin_unlock (&vg->lock);for_each_set_bit (pin, &pending,32 ) { virq =irq_find_mapping (vg->chip.irqdomain, base + pin);generic_handle_irq (virq);
drivers/pinctrl/intel/pinctrl-merrifield.c +3 -0
@@ -794,6 +794,9 @@ static int mrfld_config_set(struct pinctrl_dev *pctldev, unsigned int pin,unsigned int i;int ret; +if (!mrfld_buf_available (mp, pin)) +return -ENOTSUPP ; +for (i =0 ; i < nconfigs; i++) {switch (pinconf_to_config_param (configs[i])) {case PIN_CONFIG_BIAS_DISABLE :
drivers/regulator/axp20x-regulator.c +1 -1
@@ -272,7 +272,7 @@ static const struct regulator_desc axp806_regulators[] = { 64, AXP806_DCDCD_V_CTRL, 0x3f, AXP806_PWR_OUT_CTRL1, BIT(3)),AXP_DESC (AXP806 ,DCDCE ,"dcdce" ,"vine" ,1100 ,3400 ,100 , -AXP806_DCDCB_V_CTRL ,0x1f ,AXP806_PWR_OUT_CTRL1 ,BIT (4 )), +AXP806_DCDCE_V_CTRL ,0x1f ,AXP806_PWR_OUT_CTRL1 ,BIT (4 )),AXP_DESC (AXP806 ,ALDO1 ,"aldo1" ,"aldoin" ,700 ,3300 ,100 ,AXP806_ALDO1_V_CTRL ,0x1f ,AXP806_PWR_OUT_CTRL1 ,BIT (5 )), AXP_DESC(AXP806, ALDO2, "aldo2", "aldoin", 700, 3400, 100,
drivers/staging/greybus/timesync_platform.c +6 -0
@@ -45,12 +45,18 @@ u32 gb_timesync_platform_get_clock_rate(void)int gb_timesync_platform_lock_bus (struct gb_timesync_svc *pdata) { +if (!arche_platform_change_state_cb) +return 0 ; +return arche_platform_change_state_cb (ARCHE_PLATFORM_STATE_TIME_SYNC , pdata); }void gb_timesync_platform_unlock_bus (void ) { +if (!arche_platform_change_state_cb) +return ; +arche_platform_change_state_cb (ARCHE_PLATFORM_STATE_ACTIVE ,NULL ); }
drivers/usb/core/quirks.c +4 -0
@@ -37,6 +37,10 @@ static const struct usb_device_id usb_quirk_list[] = {/* CBM - Flash disk */ { USB_DEVICE(0x0204, 0x6025), .driver_info = USB_QUIRK_RESET_RESUME }, + /* WORLDE easy key (easykey.25) MIDI controller */ + { USB_DEVICE(0x0218, 0x0401), .driver_info = + USB_QUIRK_CONFIG_INTF_STRINGS }, + /* HP 5300/5370C scanner */ { USB_DEVICE(0x03f0, 0x0701), .driver_info = USB_QUIRK_STRING_FETCH_255 },
drivers/usb/gadget/function/f_fs.c +12 -1
@@ -2269,6 +2269,8 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,if (len <sizeof (*d) || h->interface >= ffs->interfaces_count)return -EINVAL ; length =le32_to_cpu (d->dwSize); +if (len < length) +return -EINVAL ; type =le32_to_cpu (d->dwPropertyDataType);if (type <USB_EXT_PROP_UNICODE || type >USB_EXT_PROP_UNICODE_MULTI ) {
@@ -2277,6 +2279,11 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,return -EINVAL ; } pnl =le16_to_cpu (d->wPropertyNameLength); +if (length <14 + pnl) { +pr_vdebug ("invalid os descriptor length: %d pnl:%d (descriptor %d)\n" , + length, pnl, type); +return -EINVAL ; + } pdl =le32_to_cpu (*(u32 *)((u8 *)data +10 + pnl));if (length !=14 + pnl + pdl) { pr_vdebug("invalid os descriptor length: %d pnl:%d pdl:%d (descriptor %d)\n",
@@ -2363,6 +2370,9 @@ static int __ffs_data_got_descs(struct ffs_data *ffs, } }if (flags & (1 << i)) { +if (len <4 ) { + goto error; + } os_descs_count =get_unaligned_le32 (data); data +=4 ; len -=4 ;
@@ -2435,7 +2445,8 @@ static int __ffs_data_got_strings(struct ffs_data *ffs,ENTER (); -if (unlikely (get_unaligned_le32 (data) !=FUNCTIONFS_STRINGS_MAGIC || +if (unlikely (len <16 || +get_unaligned_le32 (data) !=FUNCTIONFS_STRINGS_MAGIC ||get_unaligned_le32 (data +4 ) != len)) goto error; str_count =get_unaligned_le32 (data +8 );
drivers/usb/musb/musb_core.c +2 -13
@@ -578,11 +578,11 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, | MUSB_PORT_STAT_RESUME; musb->rh_timer = jiffies +msecs_to_jiffies (USB_RESUME_TIMEOUT ); - musb->need_finish_resume =1 ; - musb->xceiv->otg->state =OTG_STATE_A_HOST ; musb->is_active =1 ;musb_host_resume_root_hub (musb); +schedule_delayed_work (&musb->finish_resume_work, +msecs_to_jiffies (USB_RESUME_TIMEOUT ));break ;case OTG_STATE_B_WAIT_ACON : musb->xceiv->otg->state =OTG_STATE_B_PERIPHERAL ;
@@ -2691,11 +2691,6 @@ static int musb_resume(struct device *dev) mask =MUSB_DEVCTL_BDEVICE |MUSB_DEVCTL_FSDEV |MUSB_DEVCTL_LSDEV ;if ((devctl & mask) != (musb->context.devctl & mask)) musb->port1_status =0 ; -if (musb->need_finish_resume) { - musb->need_finish_resume =0 ; -schedule_delayed_work (&musb->finish_resume_work, -msecs_to_jiffies (USB_RESUME_TIMEOUT )); - }/* * The USB HUB code expects the device to be in RPM_ACTIVE once it came
@@ -2747,12 +2742,6 @@ static int musb_runtime_resume(struct device *dev)musb_restore_context (musb); -if (musb->need_finish_resume) { - musb->need_finish_resume =0 ; -schedule_delayed_work (&musb->finish_resume_work, -msecs_to_jiffies (USB_RESUME_TIMEOUT )); - } -spin_lock_irqsave (&musb->lock, flags); error =musb_run_resume_work (musb);if (error)
drivers/usb/musb/musb_core.h +0 -1
@@ -410,7 +410,6 @@ struct musb {/* is_suspended means USB B_PERIPHERAL suspend */ unsigned is_suspended:1; - unsigned need_finish_resume :1;/* may_wakeup means remote wakeup is enabled */ unsigned may_wakeup:1;
drivers/usb/serial/option.c +1 -0
@@ -2007,6 +2007,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD200, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) }, + { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */ { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/usb/serial/pl2303.c +1 -0
@@ -49,6 +49,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, + { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID2) }, { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) }, { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) }, { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID_UCSGT) },
drivers/usb/serial/pl2303.h +1 -0
@@ -27,6 +27,7 @@#define ATEN_VENDOR_ID 0x0557#define ATEN_VENDOR_ID2 0x0547#define ATEN_PRODUCT_ID 0x2008 +#define ATEN_PRODUCT_ID2 0x2118#define IODATA_VENDOR_ID 0x04bb#define IODATA_PRODUCT_ID 0x0a03
drivers/usb/serial/qcserial.c +1 -0
@@ -124,6 +124,7 @@ static const struct usb_device_id id_table[] = { {USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */ {USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */ {USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */ + {USB_DEVICE(0x413c, 0x81a6)}, /* Dell DW5570 QDL (MC8805) */ {USB_DEVICE(0x1199, 0x68a4)}, /* Sierra Wireless QDL */ {USB_DEVICE(0x1199, 0x68a5)}, /* Sierra Wireless Modem */ {USB_DEVICE(0x1199, 0x68a8)}, /* Sierra Wireless QDL */
drivers/vhost/vhost.c +4 -6
@@ -130,14 +130,14 @@ static long vhost_get_vring_endian(struct vhost_virtqueue *vq, u32 idx,static void vhost_init_is_le (struct vhost_virtqueue *vq) { -if (vhost_has_feature (vq,VIRTIO_F_VERSION_1 )) - vq->is_le = true; + vq->is_le =vhost_has_feature (vq,VIRTIO_F_VERSION_1 ) + ||virtio_legacy_is_little_endian (); }#endif /* CONFIG_VHOST_CROSS_ENDIAN_LEGACY */ static void vhost_reset_is_le (struct vhost_virtqueue *vq) { - vq->is_le =virtio_legacy_is_little_endian (); +vhost_init_is_le (vq); }struct vhost_flush_struct {
@@ -1713,10 +1713,8 @@ int vhost_vq_init_access(struct vhost_virtqueue *vq)int r;bool is_le = vq->is_le; -if (!vq->private_data) { -vhost_reset_is_le (vq); +if (!vq->private_data)return 0 ; - }vhost_init_is_le (vq);
drivers/virtio/virtio_ring.c +0 -7
@@ -159,13 +159,6 @@ static bool vring_use_dma_api(struct virtio_device *vdev)if (xen_domain ())return true; -/* -* On ARM-based machines, the DMA ops will do the right thing, -* so always use them with legacy devices. -*/ -if (IS_ENABLED (CONFIG_ARM ) ||IS_ENABLED (CONFIG_ARM64 )) -return !virtio_has_feature (vdev,VIRTIO_F_VERSION_1 ); -return false; }
fs/cifs/readdir.c +1 -0
@@ -285,6 +285,7 @@ initiate_cifs_search(const unsigned int xid, struct file *file) rc = -ENOMEM ; goto error_exit; } +spin_lock_init (&cifsFile->file_info_lock); file->private_data = cifsFile; cifsFile->tlink =cifs_get_tlink (tlink); tcon =tlink_tcon (tlink);
fs/dax.c +5 -0
@@ -1270,6 +1270,11 @@ iomap_dax_actor(struct inode *inode, loff_t pos, loff_t length, void *data,struct blk_dax_ctl dax = {0 };ssize_t map_len; +if (fatal_signal_pending (current)) { + ret = -EINTR ; +break ; + } + dax.sector = iomap->blkno + (((pos &PAGE_MASK ) - iomap->offset) >>9 ); dax.size = (length + offset +PAGE_SIZE -1 ) &PAGE_MASK ;
fs/ext4/super.c +9 -0
@@ -3827,6 +3827,15 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) (EXT4_MAX_BLOCK_FILE_PHYS / EXT4_BLOCKS_PER_GROUP(sb))); db_count = (sbi->s_groups_count +EXT4_DESC_PER_BLOCK (sb) -1 ) /EXT4_DESC_PER_BLOCK (sb); +if (ext4_has_feature_meta_bg (sb)) { +if (le32_to_cpu (es->s_first_meta_bg) >= db_count) { +ext4_msg (sb,KERN_WARNING , +"first meta block group too large: %u " +"(group descriptor block count %u)" , +le32_to_cpu (es->s_first_meta_bg), db_count); + goto failed_mount; + } + } sbi->s_group_desc =ext4_kvmalloc (db_count *sizeof (struct buffer_head *),GFP_KERNEL );
fs/iomap.c +3 -0
@@ -113,6 +113,9 @@ iomap_write_begin(struct inode *inode, loff_t pos, unsigned len, unsigned flags,BUG_ON (pos + len > iomap->offset + iomap->length); +if (fatal_signal_pending (current)) +return -EINTR ; + page =grab_cache_page_write_begin (inode->i_mapping, index, flags);if (!page)return -ENOMEM ;
fs/nfsd/nfs4layouts.c +3 -2
@@ -223,10 +223,11 @@ nfsd4_alloc_layout_stateid(struct nfsd4_compound_state *cstate,struct nfs4_layout_stateid *ls;struct nfs4_stid *stp; - stp =nfs4_alloc_stid (cstate->clp, nfs4_layout_stateid_cache); + stp =nfs4_alloc_stid (cstate->clp, nfs4_layout_stateid_cache, + nfsd4_free_layout_stateid);if (!stp)return NULL ; - stp->sc_free = nfsd4_free_layout_stateid; +get_nfs4_file (fp); stp->sc_file = fp;
fs/nfsd/nfs4state.c +8 -11
@@ -633,8 +633,8 @@ find_or_hash_clnt_odstate(struct nfs4_file *fp, struct nfs4_clnt_odstate *new)return co; } -struct nfs4_stid *nfs4_alloc_stid (struct nfs4_client *cl, -struct kmem_cache *slab) +struct nfs4_stid *nfs4_alloc_stid (struct nfs4_client *cl,struct kmem_cache *slab, +void (*sc_free)(struct nfs4_stid *)) {struct nfs4_stid *stid;int new_id;
@@ -650,6 +650,8 @@ struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl,idr_preload_end ();if (new_id <0 ) goto out_free; + + stid->sc_free = sc_free; stid->sc_client = cl; stid->sc_stateid.si_opaque.so_id = new_id; stid->sc_stateid.si_opaque.so_clid = cl->cl_clientid;
@@ -675,15 +677,12 @@ struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl,static struct nfs4_ol_stateid *nfs4_alloc_open_stateid (struct nfs4_client *clp) {struct nfs4_stid *stid; -struct nfs4_ol_stateid *stp; - stid =nfs4_alloc_stid (clp, stateid_slab); + stid =nfs4_alloc_stid (clp, stateid_slab, nfs4_free_ol_stateid);if (!stid)return NULL ; - stp =openlockstateid (stid); - stp->st_stid.sc_free = nfs4_free_ol_stateid; -return stp; +return openlockstateid (stid); }static void nfs4_free_deleg (struct nfs4_stid *stid)
@@ -781,11 +780,10 @@ alloc_init_deleg(struct nfs4_client *clp, struct svc_fh *current_fh, goto out_dec;if (delegation_blocked (¤t_fh->fh_handle)) goto out_dec; - dp =delegstateid (nfs4_alloc_stid (clp, deleg_slab)); + dp =delegstateid (nfs4_alloc_stid (clp, deleg_slab, nfs4_free_deleg));if (dp ==NULL ) goto out_dec; - dp->dl_stid.sc_free = nfs4_free_deleg;/* * delegation seqid's are never incremented. The 4.1 special * meaning of seqid 0 isn't meaningful, really, but let's avoid
@@ -5580,7 +5578,6 @@ init_lock_stateid(struct nfs4_ol_stateid *stp, struct nfs4_lockowner *lo, stp->st_stateowner =nfs4_get_stateowner (&lo->lo_owner);get_nfs4_file (fp); stp->st_stid.sc_file = fp; - stp->st_stid.sc_free = nfs4_free_lock_stateid; stp->st_access_bmap =0 ; stp->st_deny_bmap = open_stp->st_deny_bmap; stp->st_openstp = open_stp;
@@ -5623,7 +5620,7 @@ find_or_create_lock_stateid(struct nfs4_lockowner *lo, struct nfs4_file *fi, lst =find_lock_stateid (lo, fi);if (lst ==NULL ) {spin_unlock (&clp->cl_lock); - ns =nfs4_alloc_stid (clp, stateid_slab); + ns =nfs4_alloc_stid (clp, stateid_slab, nfs4_free_lock_stateid);if (ns ==NULL )return NULL ;
fs/nfsd/state.h +2 -2
@@ -603,8 +603,8 @@ extern __be32 nfs4_preprocess_stateid_op(struct svc_rqst *rqstp,__be32 nfsd4_lookup_stateid (struct nfsd4_compound_state *cstate,stateid_t *stateid,unsigned char typemask,struct nfs4_stid **s,struct nfsd_net *nn); -struct nfs4_stid *nfs4_alloc_stid (struct nfs4_client *cl, -struct kmem_cache *slab); +struct nfs4_stid *nfs4_alloc_stid (struct nfs4_client *cl,struct kmem_cache *slab, +void (*sc_free)(struct nfs4_stid *));void nfs4_unhash_stid (struct nfs4_stid *s);void nfs4_put_stid (struct nfs4_stid *s);void nfs4_inc_and_copy_stateid (stateid_t *dst,struct nfs4_stid *stid);
include/linux/irq.h +17 -0
@@ -184,6 +184,7 @@ struct irq_data {* * IRQD_TRIGGER_MASK - Mask for the trigger type bits * IRQD_SETAFFINITY_PENDING - Affinity setting is pending +* IRQD_ACTIVATED - Interrupt has already been activated * IRQD_NO_BALANCING - Balancing disabled for this IRQ * IRQD_PER_CPU - Interrupt is per cpu * IRQD_AFFINITY_SET - Interrupt affinity was set
@@ -202,6 +203,7 @@ struct irq_data {enum {IRQD_TRIGGER_MASK =0xf ,IRQD_SETAFFINITY_PENDING = (1 <<8 ), +IRQD_ACTIVATED = (1 <<9 ),IRQD_NO_BALANCING = (1 <<10 ),IRQD_PER_CPU = (1 <<11 ),IRQD_AFFINITY_SET = (1 <<12 ),
@@ -312,6 +314,21 @@ static inline bool irqd_affinity_is_managed(struct irq_data *d)return __irqd_to_state (d) &IRQD_AFFINITY_MANAGED ; } +static inline bool irqd_is_activated (struct irq_data *d) +{ +return __irqd_to_state (d) &IRQD_ACTIVATED ; +} + +static inline void irqd_set_activated (struct irq_data *d) +{ +__irqd_to_state (d) |=IRQD_ACTIVATED ; +} + +static inline void irqd_clr_activated (struct irq_data *d) +{ +__irqd_to_state (d) &= ~IRQD_ACTIVATED ; +} +#undef __irqd_to_statestatic inline irq_hw_number_t irqd_to_hwirq (struct irq_data *d)
include/linux/memory_hotplug.h +2 -1
@@ -85,7 +85,8 @@ extern int zone_grow_waitqueues(struct zone *zone, unsigned long nr_pages);extern int add_one_highpage (struct page *page,int pfn,int bad_ppro);/* VM interface that may be used by firmware interface */ extern int online_pages (unsigned long ,unsigned long ,int ); -extern int test_pages_in_a_zone (unsigned long ,unsigned long ); +extern int test_pages_in_a_zone (unsigned long start_pfn,unsigned long end_pfn, +unsigned long *valid_start,unsigned long *valid_end);extern void __offline_isolated_pages (unsigned long ,unsigned long );typedef void (*online_page_callback_t )(struct page *page);
include/linux/percpu-refcount.h +2 -2
@@ -204,7 +204,7 @@ static inline void percpu_ref_get(struct percpu_ref *ref)static inline bool percpu_ref_tryget (struct percpu_ref *ref) {unsigned long __percpu *percpu_count; -int ret; +bool ret;rcu_read_lock_sched ();
@@ -238,7 +238,7 @@ static inline bool percpu_ref_tryget(struct percpu_ref *ref)static inline bool percpu_ref_tryget_live (struct percpu_ref *ref) {unsigned long __percpu *percpu_count; -int ret = false; +bool ret = false;rcu_read_lock_sched ();
kernel/cgroup.c +5 -8
@@ -5219,6 +5219,11 @@ static struct cgroup_subsys_state *css_create(struct cgroup *cgrp,return ERR_PTR (err); } +/* +* The returned cgroup is fully initialized including its control mask, but +* it isn't associated with its kernfs_node and doesn't have the control +* mask applied. +*/ static struct cgroup *cgroup_create (struct cgroup *parent) {struct cgroup_root *root = parent->root;
@@ -5283,11 +5288,6 @@ static struct cgroup *cgroup_create(struct cgroup *parent)cgroup_propagate_control (cgrp); -/* @cgrp doesn't have dir yet so the following will only create csses */ - ret =cgroup_apply_control_enable (cgrp); -if (ret) - goto out_destroy; -return cgrp; out_cancel_ref:
@@ -5295,9 +5295,6 @@ static struct cgroup *cgroup_create(struct cgroup *parent) out_free_cgrp:kfree (cgrp);return ERR_PTR (ret); -out_destroy: -cgroup_destroy_locked (cgrp); -return ERR_PTR (ret); } static int cgroup_mkdir(struct kernfs_node *parent_kn, const char *name,
kernel/events/core.c +46 -23
107 lines not on this page · raw message
kernel/irq/irqdomain.c +30 -14
62 lines not on this page · raw message
kernel/trace/trace_hwlat.c +5 -3
@@ -266,7 +266,7 @@ static int get_sample(void)static struct cpumask save_cpumask;static bool disable_migrate; -static void move_to_next_cpu (void ) +static void move_to_next_cpu (bool initmask) {static struct cpumask *current_mask;int next_cpu;
@@ -275,7 +275,7 @@ static void move_to_next_cpu(void)return ;/* Just pick the first CPU on first iteration */ -if (!current_mask) { +if (initmask) { current_mask = &save_cpumask;get_online_cpus ();cpumask_and (current_mask, cpu_online_mask, tracing_buffer_mask);
@@ -330,10 +330,12 @@ static void move_to_next_cpu(void)static int kthread_fn (void *data) {u64 interval; +bool initmask = true;while (!kthread_should_stop ()) { -move_to_next_cpu (); +move_to_next_cpu (initmask); + initmask = false;local_irq_disable ();get_sample ();
mm/filemap.c +5 -0
@@ -1703,6 +1703,11 @@ static ssize_t do_generic_file_read(struct file *filp, loff_t *ppos,cond_resched (); find_page: +if (fatal_signal_pending (current)) { + error = -EINTR ; + goto out; + } + page =find_get_page (mapping, index);if (!page) { page_cache_sync_readahead(mapping,
mm/memory_hotplug.c +21 -7
@@ -1483,17 +1483,20 @@ bool is_mem_section_removable(unsigned long start_pfn, unsigned long nr_pages) }/* -* Confirm all pages in a range [start, end) is belongs to the same zone. +* Confirm all pages in a range [start, end) belong to the same zone. +* When true, return its valid [start, end). */ -int test_pages_in_a_zone (unsigned long start_pfn,unsigned long end_pfn) +int test_pages_in_a_zone (unsigned long start_pfn,unsigned long end_pfn, +unsigned long *valid_start,unsigned long *valid_end) {unsigned long pfn, sec_end_pfn; +unsigned long start, end;struct zone *zone =NULL ;struct page *page;int i; -for (pfn = start_pfn, sec_end_pfn =SECTION_ALIGN_UP (start_pfn); +for (pfn = start_pfn, sec_end_pfn =SECTION_ALIGN_UP (start_pfn +1 ); pfn < end_pfn; - pfn = sec_end_pfn +1 , sec_end_pfn +=PAGES_PER_SECTION ) { + pfn = sec_end_pfn, sec_end_pfn +=PAGES_PER_SECTION ) {/* Make sure the memory section is present first */ if (!present_section_nr (pfn_to_section_nr (pfn)))continue ;
@@ -1509,10 +1512,20 @@ int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn) page =pfn_to_page (pfn + i);if (zone &&page_zone (page) != zone)return 0 ; +if (!zone) + start = pfn + i; zone =page_zone (page); + end = pfn +MAX_ORDER_NR_PAGES ; } } -return 1 ; + +if (zone) { + *valid_start = start; + *valid_end = end; +return 1 ; + }else { +return 0 ; + } }/*
@@ -1859,6 +1872,7 @@ static int __ref __offline_pages(unsigned long start_pfn,long offlined_pages;int ret, drain, retry_max, node;unsigned long flags; +unsigned long valid_start, valid_end;struct zone *zone;struct memory_notify arg;
@@ -1869,10 +1883,10 @@ static int __ref __offline_pages(unsigned long start_pfn,return -EINVAL ;/* This makes hotplug much easier...and readable. we assume this for now. .*/ -if (!test_pages_in_a_zone (start_pfn, end_pfn)) +if (!test_pages_in_a_zone (start_pfn, end_pfn, &valid_start, &valid_end))return -EINVAL ; - zone =page_zone (pfn_to_page (start_pfn)); + zone =page_zone (pfn_to_page (valid_start)); node =zone_to_nid (zone); nr_pages = end_pfn - start_pfn;
mm/zswap.c +29 -1
@@ -78,7 +78,13 @@ static u64 zswap_duplicate_entry;/* Enable/disable zswap (disabled by default) */ static bool zswap_enabled; -module_param_named (enabled, zswap_enabled, bool,0644 ); +static int zswap_enabled_param_set (const char *, +const struct kernel_param *); +static struct kernel_param_ops zswap_enabled_param_ops = { + .set = zswap_enabled_param_set, + .get = param_get_bool, +}; +module_param_cb (enabled, &zswap_enabled_param_ops, &zswap_enabled,0644 );/* Crypto compressor to use */ #define ZSWAP_COMPRESSOR_DEFAULT "lzo"
@@ -176,6 +182,9 @@ static atomic_t zswap_pools_count = ATOMIC_INIT(0);/* used by param callback function */ static bool zswap_init_started; +/* fatal error during init */ +static bool zswap_init_failed; +/********************************* * helpers and fwd declarations **********************************/
@@ -706,6 +715,11 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp,char *s =strstrip ((char *)val);int ret; +if (zswap_init_failed) { +pr_err ("can't set param, initialization failed\n" ); +return -ENODEV ; + } +/* no change required */ if (!strcmp (s, *(char **)kp->arg))return 0 ;
@@ -785,6 +799,17 @@ static int zswap_zpool_param_set(const char *val,return __zswap_param_set (val, kp,NULL , zswap_compressor); } +static int zswap_enabled_param_set (const char *val, +const struct kernel_param *kp) +{ +if (zswap_init_failed) { +pr_err ("can't enable, initialization failed\n" ); +return -ENODEV ; + } + +return param_set_bool (val, kp); +} +/********************************* * writeback code **********************************/
@@ -1271,6 +1296,9 @@ static int __init init_zswap(void) dstmem_fail:zswap_entry_cache_destroy (); cache_fail: +/* if built-in, we aren't unloaded on failure; don't allow use */ + zswap_init_failed = true; + zswap_enabled = false;return -ENOMEM ; }/* must be late so crypto has time to come up */
net/can/bcm.c +16 -7
@@ -734,14 +734,23 @@ static struct bcm_op *bcm_find_op(struct list_head *ops,static void bcm_remove_op (struct bcm_op *op) { -hrtimer_cancel (&op->timer); -hrtimer_cancel (&op->thrtimer); - -if (op->tsklet.func) -tasklet_kill (&op->tsklet); +if (op->tsklet.func) { +while (test_bit (TASKLET_STATE_SCHED , &op->tsklet.state) || +test_bit (TASKLET_STATE_RUN , &op->tsklet.state) || +hrtimer_active (&op->timer)) { +hrtimer_cancel (&op->timer); +tasklet_kill (&op->tsklet); + } + } -if (op->thrtsklet.func) -tasklet_kill (&op->thrtsklet); +if (op->thrtsklet.func) { +while (test_bit (TASKLET_STATE_SCHED , &op->thrtsklet.state) || +test_bit (TASKLET_STATE_RUN , &op->thrtsklet.state) || +hrtimer_active (&op->thrtimer)) { +hrtimer_cancel (&op->thrtimer); +tasklet_kill (&op->thrtsklet); + } + }if ((op->frames) && (op->frames != &op->sframe))kfree (op->frames);
net/sunrpc/auth_gss/gss_rpc_xdr.c +1 -1
@@ -260,7 +260,7 @@ static int gssx_dec_option_array(struct xdr_stream *xdr,if (!oa->data)return -ENOMEM ; - creds =kmalloc (sizeof (struct svc_cred ),GFP_KERNEL ); + creds =kzalloc (sizeof (struct svc_cred ),GFP_KERNEL );if (!creds) {kfree (oa->data);return -ENOMEM ;