Linux 5.4.149
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.149 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/include/asm/ftrace.h | 3 arch/arm/include/asm/insn.h | 8 +- arch/arm/include/asm/module.h | 10 ++ arch/arm/kernel/ftrace.c | 46 ++++++++++-- arch/arm/kernel/insn.c | 19 ++--- arch/arm/kernel/module-plts.c | 49 ++++++++++--- arch/arm/mm/init.c | 6 + arch/arm64/kernel/cacheinfo.c | 7 - arch/mips/kernel/cacheinfo.c | 7 - arch/riscv/kernel/cacheinfo.c | 7 - arch/s390/pci/pci_mmio.c | 2 arch/um/drivers/virtio_uml.c | 4 - arch/x86/kernel/cpu/cacheinfo.c | 7 - block/blk-throttle.c | 1 drivers/acpi/pci_mcfg.c | 20 +++++ drivers/dma/Kconfig | 2 drivers/dma/acpi-dma.c | 10 +- drivers/dma/sprd-dma.c | 1 drivers/dma/xilinx/xilinx_dma.c | 2 drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c | 2 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 drivers/net/phy/phy-c45.c | 5 - drivers/net/phy/phy_device.c | 5 - drivers/parisc/dino.c | 18 ++--- drivers/pci/controller/pci-aardvark.c | 71 ++++++++++++++++++-- drivers/pci/ecam.c | 10 ++ drivers/pci/pci-bridge-emul.c | 25 +++---- drivers/pci/pci-bridge-emul.h | 78 +++++++++++----------- drivers/pwm/pwm-img.c | 16 ---- drivers/pwm/pwm-lpc32xx.c | 10 +- drivers/pwm/pwm-rockchip.c | 14 --- drivers/pwm/pwm-stm32-lp.c | 2 drivers/rtc/Kconfig | 1 drivers/staging/rtl8192u/r8192U_core.c | 2 drivers/thermal/samsung/exynos_tmu.c | 1 drivers/tty/vt/vt.c | 31 +++++++- fs/btrfs/volumes.c | 7 + fs/ceph/caps.c | 2 fs/ceph/file.c | 32 ++++----- fs/nilfs2/sysfs.c | 26 +++---- fs/nilfs2/the_nilfs.c | 9 +- include/linux/cacheinfo.h | 18 ----- include/linux/kvm_host.h | 11 --- include/linux/pci-ecam.h | 1 include/linux/thermal.h | 5 - kernel/profile.c | 21 +++-- kernel/sys.c | 7 - lib/Kconfig.debug | 1 net/9p/trans_virtio.c | 4 - net/sctp/input.c | 3 net/sctp/sm_make_chunk.c | 13 ++- security/apparmor/apparmorfs.c | 3 virt/kvm/kvm_main.c | 5 - 54 files changed, 408 insertions(+), 266 deletions(-)
Alex Sverdlin (4):
ARM: 9077/1: PLT: Move struct plt_entries definition to header
ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link()
ARM: 9079/1: ftrace: Add MODULE_PLTS support
ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE
Anand Jain (1):
btrfs: fix lockdep warning while mounting sprout fs
Andy Shevchenko (2):
apparmor: remove duplicate macro list_entry_is_head()
dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
Arnd Bergmann (1):
thermal/core: Fix thermal_cooling_device_register() prototype
Cyrill Gorcunov (1):
prctl: allow to setup brk for et_dyn executables
Dan Carpenter (1):
thermal/drivers/exynos: Fix an error code in exynos_tmu_probe()
David Hildenbrand (1):
s390/pci_mmio: fully validate the VMA before calling follow_pte()
Florian Fainelli (1):
ARM: Qualify enabling of swiotlb_init()
Greg Kroah-Hartman (1):
Linux 5.4.149
Grzegorz Jaszczyk (1):
PCI: pci-bridge-emul: Fix big-endian support
Guenter Roeck (2):
parisc: Move pci_dev_is_behind_card_dino to where it is used drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV
Jeff Layton (2):
ceph: request Fw caps before updating the mtime in ceph_write_iter
ceph: lockdep annotations for try_nonblocking_invalidate
Johannes Berg (2):
um: virtio_uml: fix memory leak on init failures
dmaengine: ioat: depends on !UML
Jongsung Kim (1):
net: stmmac: reset Tx desc base address before restarting Tx
Li Jinlin (1):
blk-throttle: fix UAF by deleteing timer in blk_throtl_exit()
Lukas Bulwahn (1):
Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH
Marcelo Ricardo Leitner (2):
sctp: validate chunk size in __rcv_asconf_lookup
sctp: add param size validation for SCTP_PARAM_SET_PRIMARY
Nanyong Sun (6):
nilfs2: fix memory leak in nilfs_sysfs_create_device_group
nilfs2: fix NULL pointer in nilfs_##name##_attr_release
nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group
nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group
nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group
nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
Nathan Chancellor (1):
staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb()
Pali Rohár (3):
PCI: aardvark: Indicate error in 'val' when config read fails
PCI: pci-bridge-emul: Add PCIe Root Capabilities Register
PCI: aardvark: Fix reporting CRS value
Pavel Skripkin (1):
profiling: fix shift-out-of-bounds bugs
Petr Oros (1):
phy: avoid unnecessary link-up delay in polling mode
Radhey Shyam Pandey (1):
dmaengine: xilinx_dma: Set DMA mask for coherent APIs
Radim Krčmář (1):
KVM: remember position in kvm->vcpus array
Thomas Gleixner (1):
drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION()
Tuan Phan (1):
PCI/ACPI: Add Ampere Altra SOC MCFG quirk
Uwe Kleine-König (4):
pwm: lpc32xx: Don't modify HW state in .probe() after the PWM chip was registered
pwm: img: Don't modify HW state in .remove() callback
pwm: rockchip: Don't modify HW state in .remove() callback
pwm: stm32-lp: Don't modify HW state in .remove() callback
Xie Yongji (1):
9p/trans_virtio: Remove sysfs file on probe failure
Yu-Tung Chang (1):
rtc: rx8010: select REGMAP_I2C
Zhen Lei (1):
nilfs2: use refcount_dec_and_lock() to fix potential UAF
Zou Wei (1):
dmaengine: sprd: Add missing MODULE_DEVICE_TABLE
nick black (1):
console: consume APC, DM, DCS
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 148 +SUBLEVEL = 149 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/include/asm/ftrace.h +3 -0
@@ -16,6 +16,9 @@ extern void __gnu_mcount_nc(void);#ifdef CONFIG_DYNAMIC_FTRACE struct dyn_arch_ftrace { +#ifdef CONFIG_ARM_MODULE_PLTS +struct module *mod; +#endif };static inline unsigned long ftrace_call_adjust (unsigned long addr)
arch/arm/include/asm/insn.h +4 -4
@@ -13,18 +13,18 @@ arm_gen_nop(void) }unsigned long -__arm_gen_branch (unsigned long pc,unsigned long addr,bool link); +__arm_gen_branch (unsigned long pc,unsigned long addr,bool link,bool warn);static inline unsigned long arm_gen_branch (unsigned long pc,unsigned long addr) { -return __arm_gen_branch (pc, addr, false); +return __arm_gen_branch (pc, addr, false, true); }static inline unsigned long -arm_gen_branch_link (unsigned long pc,unsigned long addr) +arm_gen_branch_link (unsigned long pc,unsigned long addr,bool warn) { -return __arm_gen_branch (pc, addr, true); +return __arm_gen_branch (pc, addr, true, warn); }#endif
arch/arm/include/asm/module.h +10 -0
@@ -19,8 +19,18 @@ enum { };#endif +#define PLT_ENT_STRIDE L1_CACHE_BYTES +#define PLT_ENT_COUNT (PLT_ENT_STRIDE / sizeof(u32)) +#define PLT_ENT_SIZE (sizeof(struct plt_entries) / PLT_ENT_COUNT) + +struct plt_entries { +u32 ldr[PLT_ENT_COUNT ]; +u32 lit[PLT_ENT_COUNT ]; +}; +struct mod_plt_sec {struct elf32_shdr *plt; +struct plt_entries *plt_ent;int plt_count; };
arch/arm/kernel/ftrace.c +38 -8
92 lines not on this page · raw message
arch/arm/kernel/insn.c +10 -9
@@ -3,8 +3,9 @@#include <linux/kernel.h> #include <asm/opcodes.h> -static unsigned long -__arm_gen_branch_thumb2 (unsigned long pc,unsigned long addr,bool link) +static unsigned long __arm_gen_branch_thumb2 (unsigned long pc, +unsigned long addr,bool link, +bool warn) {unsigned long s, j1, j2, i1, i2, imm10, imm11;unsigned long first, second;
@@ -12,7 +13,7 @@ __arm_gen_branch_thumb2(unsigned long pc, unsigned long addr, bool link) offset = (long )addr - (long )(pc +4 );if (offset <-16777216 || offset >16777214 ) { -WARN_ON_ONCE (1 ); +WARN_ON_ONCE (warn);return 0 ; }
@@ -33,8 +34,8 @@ __arm_gen_branch_thumb2(unsigned long pc, unsigned long addr, bool link)return __opcode_thumb32_compose (first, second); } -static unsigned long -__arm_gen_branch_arm (unsigned long pc,unsigned long addr,bool link) +static unsigned long __arm_gen_branch_arm (unsigned long pc,unsigned long addr, +bool link,bool warn) {unsigned long opcode =0xea000000 ;long offset;
@@ -44,7 +45,7 @@ __arm_gen_branch_arm(unsigned long pc, unsigned long addr, bool link) offset = (long )addr - (long )(pc +8 );if (unlikely (offset <-33554432 || offset >33554428 )) { -WARN_ON_ONCE (1 ); +WARN_ON_ONCE (warn);return 0 ; }
@@ -54,10 +55,10 @@ __arm_gen_branch_arm(unsigned long pc, unsigned long addr, bool link) }unsigned long -__arm_gen_branch (unsigned long pc,unsigned long addr,bool link) +__arm_gen_branch (unsigned long pc,unsigned long addr,bool link,bool warn) {if (IS_ENABLED (CONFIG_THUMB2_KERNEL )) -return __arm_gen_branch_thumb2 (pc, addr, link); +return __arm_gen_branch_thumb2 (pc, addr, link, warn);else -return __arm_gen_branch_arm (pc, addr, link); +return __arm_gen_branch_arm (pc, addr, link, warn); }
arch/arm/kernel/module-plts.c +38 -11
97 lines not on this page · raw message
arch/arm/mm/init.c +5 -1
@@ -469,7 +469,11 @@ static void __init free_highpages(void)void __init mem_init (void ) {#ifdef CONFIG_ARM_LPAE -swiotlb_init (1 ); +if (swiotlb_force ==SWIOTLB_FORCE || + max_pfn > arm_dma_pfn_limit) +swiotlb_init (1 ); +else + swiotlb_force =SWIOTLB_NO_FORCE ;#endif set_max_mapnr (pfn_to_page (max_pfn) - mem_map);
arch/arm64/kernel/cacheinfo.c +2 -5
@@ -43,7 +43,7 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, this_leaf->type = type; } -static int __init_cache_level (unsigned int cpu) +int init_cache_level (unsigned int cpu) {unsigned int ctype, level, leaves, fw_level;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -78,7 +78,7 @@ static int __init_cache_level(unsigned int cpu)return 0 ; } -static int __populate_cache_leaves (unsigned int cpu) +int populate_cache_leaves (unsigned int cpu) {unsigned int level, idx;enum cache_type type;
@@ -97,6 +97,3 @@ static int __populate_cache_leaves(unsigned int cpu) }return 0 ; } - -DEFINE_SMP_CALL_CACHE_FUNCTION (init_cache_level) -DEFINE_SMP_CALL_CACHE_FUNCTION (populate_cache_leaves)
arch/mips/kernel/cacheinfo.c +2 -5
@@ -17,7 +17,7 @@ do { \ leaf++; \ }while (0 ) -static int __init_cache_level(unsigned int cpu) +int init_cache_level(unsigned int cpu) {struct cpuinfo_mips *c = ¤t_cpu_data;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -69,7 +69,7 @@ static void fill_cpumask_cluster(int cpu, cpumask_t *cpu_map)cpumask_set_cpu (cpu1, cpu_map); } -static int __populate_cache_leaves (unsigned int cpu) +int populate_cache_leaves (unsigned int cpu) {struct cpuinfo_mips *c = ¤t_cpu_data;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -98,6 +98,3 @@ static int __populate_cache_leaves(unsigned int cpu)return 0 ; } - -DEFINE_SMP_CALL_CACHE_FUNCTION (init_cache_level) -DEFINE_SMP_CALL_CACHE_FUNCTION (populate_cache_leaves)
arch/riscv/kernel/cacheinfo.c +2 -5
@@ -16,7 +16,7 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, this_leaf->type = type; } -static int __init_cache_level (unsigned int cpu) +int init_cache_level (unsigned int cpu) {struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);struct device_node *np =of_cpu_device_node_get (cpu);
@@ -58,7 +58,7 @@ static int __init_cache_level(unsigned int cpu)return 0 ; } -static int __populate_cache_leaves (unsigned int cpu) +int populate_cache_leaves (unsigned int cpu) {struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);struct cacheinfo *this_leaf = this_cpu_ci->info_list;
@@ -95,6 +95,3 @@ static int __populate_cache_leaves(unsigned int cpu)return 0 ; } - -DEFINE_SMP_CALL_CACHE_FUNCTION (init_cache_level) -DEFINE_SMP_CALL_CACHE_FUNCTION (populate_cache_leaves)
arch/s390/pci/pci_mmio.c +1 -1
@@ -128,7 +128,7 @@ static long get_pfn(unsigned long user_addr, unsigned long access,down_read (¤t->mm->mmap_sem); ret = -EINVAL ; vma =find_vma (current->mm, user_addr); -if (!vma) +if (!vma || user_addr < vma->vm_start) goto out; ret = -EACCES ;if (!(vma->vm_flags & access))
arch/um/drivers/virtio_uml.c +3 -1
@@ -994,7 +994,7 @@ static int virtio_uml_probe(struct platform_device *pdev) rc =os_connect_socket (pdata->socket_path); }while (rc == -EINTR );if (rc <0 ) -return rc; + goto error_free; vu_dev->sock = rc; rc =vhost_user_init (vu_dev);
@@ -1010,6 +1010,8 @@ static int virtio_uml_probe(struct platform_device *pdev) error_init:os_close_file (vu_dev->sock); +error_free: +kfree (vu_dev);return rc; }
arch/x86/kernel/cpu/cacheinfo.c +2 -5
@@ -985,7 +985,7 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, this_leaf->priv = base->nb; } -static int __init_cache_level (unsigned int cpu) +int init_cache_level (unsigned int cpu) {struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -1014,7 +1014,7 @@ static void get_cache_id(int cpu, struct _cpuid4_info_regs *id4_regs) id4_regs->id = c->apicid >> index_msb; } -static int __populate_cache_leaves (unsigned int cpu) +int populate_cache_leaves (unsigned int cpu) {unsigned int idx, ret;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);
@@ -1033,6 +1033,3 @@ static int __populate_cache_leaves(unsigned int cpu)return 0 ; } - -DEFINE_SMP_CALL_CACHE_FUNCTION (init_cache_level) -DEFINE_SMP_CALL_CACHE_FUNCTION (populate_cache_leaves)
block/blk-throttle.c +1 -0
@@ -2414,6 +2414,7 @@ int blk_throtl_init(struct request_queue *q)void blk_throtl_exit (struct request_queue *q) {BUG_ON (!q->td); +del_timer_sync (&q->td->service_queue.pending_timer);throtl_shutdown_wq (q);blkcg_deactivate_policy (q, &blkcg_policy_throtl);free_percpu (q->td->latency_buckets[READ ]);
drivers/acpi/pci_mcfg.c +20 -0
@@ -142,6 +142,26 @@ static struct mcfg_fixup mcfg_quirks[] = {XGENE_V2_ECAM_MCFG (4 ,0 ),XGENE_V2_ECAM_MCFG (4 ,1 ),XGENE_V2_ECAM_MCFG (4 ,2 ), + +#define ALTRA_ECAM_QUIRK(rev, seg) \ + { "Ampere", "Altra ", rev, seg, MCFG_BUS_ANY, &pci_32b_read_ops } + +ALTRA_ECAM_QUIRK (1 ,0 ), +ALTRA_ECAM_QUIRK (1 ,1 ), +ALTRA_ECAM_QUIRK (1 ,2 ), +ALTRA_ECAM_QUIRK (1 ,3 ), +ALTRA_ECAM_QUIRK (1 ,4 ), +ALTRA_ECAM_QUIRK (1 ,5 ), +ALTRA_ECAM_QUIRK (1 ,6 ), +ALTRA_ECAM_QUIRK (1 ,7 ), +ALTRA_ECAM_QUIRK (1 ,8 ), +ALTRA_ECAM_QUIRK (1 ,9 ), +ALTRA_ECAM_QUIRK (1 ,10 ), +ALTRA_ECAM_QUIRK (1 ,11 ), +ALTRA_ECAM_QUIRK (1 ,12 ), +ALTRA_ECAM_QUIRK (1 ,13 ), +ALTRA_ECAM_QUIRK (1 ,14 ), + ALTRA_ECAM_QUIRK(1, 15), };static char mcfg_oem_id[ACPI_OEM_ID_SIZE ];
drivers/dma/Kconfig +1 -1
@@ -276,7 +276,7 @@ config INTEL_IDMA64 config INTEL_IOATDMA tristate "Intel I/OAT DMA support" - depends on PCI && X86_64 + depends on PCI && X86_64 && !UML select DMA_ENGINE select DMA_ENGINE_RAID select DCA
drivers/dma/acpi-dma.c +7 -3
@@ -70,10 +70,14 @@ static int acpi_dma_parse_resource_group(const struct acpi_csrt_group *grp, si = (const struct acpi_csrt_shared_info *)&grp[1 ]; -/* Match device by MMIO and IRQ */ +/* Match device by MMIO */ if (si->mmio_base_low !=lower_32_bits (mem) || - si->mmio_base_high !=upper_32_bits (mem) || - si->gsi_interrupt != irq) + si->mmio_base_high !=upper_32_bits (mem)) +return 0 ; + +/* Match device by Linux vIRQ */ + ret =acpi_register_gsi (NULL , si->gsi_interrupt, si->interrupt_mode, si->interrupt_polarity); +if (ret != irq)return 0 ; dev_dbg(&adev->dev, "matches with %.4s%04X (rev %u)\n",
drivers/dma/sprd-dma.c +1 -0
@@ -1230,6 +1230,7 @@ static const struct of_device_id sprd_dma_match[] = { { .compatible = "sprd,sc9860-dma", }, {}, }; +MODULE_DEVICE_TABLE (of, sprd_dma_match);static int __maybe_unused sprd_dma_runtime_suspend (struct device *dev) {
drivers/dma/xilinx/xilinx_dma.c +1 -1
@@ -2703,7 +2703,7 @@ static int xilinx_dma_probe(struct platform_device *pdev) xdev->ext_addr = false;/* Set the dma mask bits */ -dma_set_mask (xdev->dev,DMA_BIT_MASK (addr_width)); +dma_set_mask_and_coherent (xdev->dev,DMA_BIT_MASK (addr_width));/* Initialize the DMA engine */ xdev->common.dev = &pdev->dev;
drivers/gpu/drm/nouveau/nvkm/engine/device/ctrl.c +1 -1
@@ -57,7 +57,7 @@ nvkm_control_mthd_pstate_info(struct nvkm_control *ctrl, void *data, u32 size) args->v0.count =0 ; args->v0.ustate_ac =NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE ; args->v0.ustate_dc =NVIF_CONTROL_PSTATE_INFO_V0_USTATE_DISABLE ; - args->v0.pwrsrc = -ENOSYS ; + args->v0.pwrsrc = -ENODEV ; args->v0.pstate =NVIF_CONTROL_PSTATE_INFO_V0_PSTATE_UNKNOWN ; }
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +2 -0
@@ -1987,6 +1987,8 @@ static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan) tx_q->cur_tx =0 ; tx_q->mss =0 ;netdev_tx_reset_queue (netdev_get_tx_queue (priv->dev, chan)); +stmmac_init_tx_chan (priv, priv->ioaddr, priv->plat->dma_cfg, + tx_q->dma_tx_phy, chan);stmmac_start_tx_dma (priv, chan); priv->dev->stats.tx_errors++;
drivers/net/phy/phy-c45.c +3 -2
@@ -239,9 +239,10 @@ int genphy_c45_read_link(struct phy_device *phydev)/* The link state is latched low so that momentary link * drops can be detected. Do not double-read the status -* in polling mode to detect such short link drops. +* in polling mode to detect such short link drops except +* the link was already down. */ -if (!phy_polling_mode (phydev)) { +if (!phy_polling_mode (phydev) || !phydev->link) { val =phy_read_mmd (phydev, devad,MDIO_STAT1 );if (val <0 )return val;
drivers/net/phy/phy_device.c +3 -2
@@ -1766,9 +1766,10 @@ int genphy_update_link(struct phy_device *phydev)/* The link state is latched low so that momentary link * drops can be detected. Do not double-read the status -* in polling mode to detect such short link drops. +* in polling mode to detect such short link drops except +* the link was already down. */ -if (!phy_polling_mode (phydev)) { +if (!phy_polling_mode (phydev) || !phydev->link) { status =phy_read (phydev,MII_BMSR );if (status <0 )return status;
drivers/parisc/dino.c +9 -9
@@ -156,15 +156,6 @@ static inline struct dino_device *DINO_DEV(struct pci_hba_data *hba) return container_of(hba, struct dino_device, hba); } -/* Check if PCI device is behind a Card-mode Dino. */ -static int pci_dev_is_behind_card_dino (struct pci_dev *dev) -{ -struct dino_device *dino_dev; - - dino_dev =DINO_DEV (parisc_walk_tree (dev->bus->bridge)); -return is_card_dino (&dino_dev->hba.dev->id); -} -/* * Dino Configuration Space Accessor Functions */
@@ -447,6 +438,15 @@ static void quirk_cirrus_cardbus(struct pci_dev *dev)DECLARE_PCI_FIXUP_ENABLE (PCI_VENDOR_ID_CIRRUS ,PCI_DEVICE_ID_CIRRUS_6832 , quirk_cirrus_cardbus );#ifdef CONFIG_TULIP +/* Check if PCI device is behind a Card-mode Dino. */ +static int pci_dev_is_behind_card_dino (struct pci_dev *dev) +{ +struct dino_device *dino_dev; + + dino_dev =DINO_DEV (parisc_walk_tree (dev->bus->bridge)); +return is_card_dino (&dino_dev->hba.dev->id); +} +static void pci_fixup_tulip (struct pci_dev *dev) {if (!pci_dev_is_behind_card_dino (dev))
drivers/pci/controller/pci-aardvark.c +66 -5
138 lines not on this page · raw message
drivers/pci/ecam.c +10 -0
@@ -164,4 +164,14 @@ struct pci_ecam_ops pci_32b_ops = { .write = pci_generic_config_write32, } }; + +/* ECAM ops for 32-bit read only (non-compliant) */ +struct pci_ecam_ops pci_32b_read_ops = { + .bus_shift =20 , + .pci_ops = { + .map_bus = pci_ecam_map_bus, + .read = pci_generic_config_read32, + .write = pci_generic_config_write, + } +};#endif
drivers/pci/pci-bridge-emul.c +13 -12
@@ -270,10 +270,10 @@ static const struct pci_bridge_reg_behavior pcie_cap_regs_behavior[] = {int pci_bridge_emul_init (struct pci_bridge_emul *bridge,unsigned int flags) { - bridge->conf.class_revision |=PCI_CLASS_BRIDGE_PCI <<16 ; + bridge->conf.class_revision |=cpu_to_le32 (PCI_CLASS_BRIDGE_PCI <<16 ); bridge->conf.header_type =PCI_HEADER_TYPE_BRIDGE ; bridge->conf.cache_line_size =0x10 ; - bridge->conf.status =PCI_STATUS_CAP_LIST ; + bridge->conf.status =cpu_to_le16 (PCI_STATUS_CAP_LIST ); bridge->pci_regs_behavior =kmemdup (pci_regs_behavior,sizeof (pci_regs_behavior),GFP_KERNEL );
@@ -284,8 +284,9 @@ int pci_bridge_emul_init(struct pci_bridge_emul *bridge, bridge->conf.capabilities_pointer =PCI_CAP_PCIE_START ; bridge->pcie_conf.cap_id =PCI_CAP_ID_EXP ;/* Set PCIe v2, root port, slot support */ - bridge->pcie_conf.cap =PCI_EXP_TYPE_ROOT_PORT <<4 |2 | -PCI_EXP_FLAGS_SLOT ; + bridge->pcie_conf.cap = +cpu_to_le16 (PCI_EXP_TYPE_ROOT_PORT <<4 |2 | +PCI_EXP_FLAGS_SLOT ); bridge->pcie_cap_regs_behavior = kmemdup(pcie_cap_regs_behavior, sizeof(pcie_cap_regs_behavior),
@@ -327,7 +328,7 @@ int pci_bridge_emul_conf_read(struct pci_bridge_emul *bridge, int where,int reg = where & ~3 ;pci_bridge_emul_read_status_t (*read_op)(struct pci_bridge_emul *bridge,int reg,u32 *value); -u32 *cfgspace; +__le32 *cfgspace;const struct pci_bridge_reg_behavior *behavior;if (bridge->has_pcie && reg >=PCI_CAP_PCIE_END ) {
@@ -343,11 +344,11 @@ int pci_bridge_emul_conf_read(struct pci_bridge_emul *bridge, int where,if (bridge->has_pcie && reg >=PCI_CAP_PCIE_START ) { reg -=PCI_CAP_PCIE_START ; read_op = bridge->ops->read_pcie; - cfgspace = (u32 *) &bridge->pcie_conf; + cfgspace = (__le32 *) &bridge->pcie_conf; behavior = bridge->pcie_cap_regs_behavior; }else { read_op = bridge->ops->read_base; - cfgspace = (u32 *) &bridge->conf; + cfgspace = (__le32 *) &bridge->conf; behavior = bridge->pci_regs_behavior; }
@@ -357,7 +358,7 @@ int pci_bridge_emul_conf_read(struct pci_bridge_emul *bridge, int where, ret =PCI_BRIDGE_EMUL_NOT_HANDLED ;if (ret ==PCI_BRIDGE_EMUL_NOT_HANDLED ) - *value = cfgspace[reg /4 ]; + *value =le32_to_cpu (cfgspace[reg /4 ]);/* * Make sure we never return any reserved bit with a value
@@ -387,7 +388,7 @@ int pci_bridge_emul_conf_write(struct pci_bridge_emul *bridge, int where,int mask, ret, old, new, shift;void (*write_op)(struct pci_bridge_emul *bridge,int reg,u32 old,u32 new,u32 mask); -u32 *cfgspace; +__le32 *cfgspace;const struct pci_bridge_reg_behavior *behavior;if (bridge->has_pcie && reg >=PCI_CAP_PCIE_END )
@@ -414,11 +415,11 @@ int pci_bridge_emul_conf_write(struct pci_bridge_emul *bridge, int where,if (bridge->has_pcie && reg >=PCI_CAP_PCIE_START ) { reg -=PCI_CAP_PCIE_START ; write_op = bridge->ops->write_pcie; - cfgspace = (u32 *) &bridge->pcie_conf; + cfgspace = (__le32 *) &bridge->pcie_conf; behavior = bridge->pcie_cap_regs_behavior; }else { write_op = bridge->ops->write_base; - cfgspace = (u32 *) &bridge->conf; + cfgspace = (__le32 *) &bridge->conf; behavior = bridge->pci_regs_behavior; }
@@ -431,7 +432,7 @@ int pci_bridge_emul_conf_write(struct pci_bridge_emul *bridge, int where,/* Clear the W1C bits */ new &= ~((value << shift) & (behavior[reg /4 ].w1c & mask)); - cfgspace[reg /4 ] = new; + cfgspace[reg /4 ] =cpu_to_le32 (new);if (write_op)write_op (bridge, reg, old, new, mask);
drivers/pci/pci-bridge-emul.h +39 -39
104 lines not on this page · raw message
drivers/pwm/pwm-img.c +0 -16
@@ -329,23 +329,7 @@ static int img_pwm_probe(struct platform_device *pdev)static int img_pwm_remove (struct platform_device *pdev) {struct img_pwm_chip *pwm_chip =platform_get_drvdata (pdev); -u32 val; -unsigned int i; -int ret; - - ret =pm_runtime_get_sync (&pdev->dev); -if (ret <0 ) { -pm_runtime_put (&pdev->dev); -return ret; - } - -for (i =0 ; i < pwm_chip->chip.npwm; i++) { - val =img_pwm_readl (pwm_chip,PWM_CTRL_CFG ); - val &= ~BIT (i); -img_pwm_writel (pwm_chip,PWM_CTRL_CFG , val); - } -pm_runtime_put (&pdev->dev);pm_runtime_disable (&pdev->dev);if (!pm_runtime_status_suspended (&pdev->dev))img_pwm_runtime_suspend (&pdev->dev);
drivers/pwm/pwm-lpc32xx.c +5 -5
@@ -120,17 +120,17 @@ static int lpc32xx_pwm_probe(struct platform_device *pdev) lpc32xx->chip.npwm =1 ; lpc32xx->chip.base =-1 ; +/* If PWM is disabled, configure the output to the default value */ + val =readl (lpc32xx->base + (lpc32xx->chip.pwms[0 ].hwpwm <<2 )); + val &= ~PWM_PIN_LEVEL ; +writel (val, lpc32xx->base + (lpc32xx->chip.pwms[0 ].hwpwm <<2 )); + ret =pwmchip_add (&lpc32xx->chip);if (ret <0 ) {dev_err (&pdev->dev,"failed to add PWM chip, error %d\n" , ret);return ret; } -/* When PWM is disable, configure the output to the default value */ - val =readl (lpc32xx->base + (lpc32xx->chip.pwms[0 ].hwpwm <<2 )); - val &= ~PWM_PIN_LEVEL ; -writel (val, lpc32xx->base + (lpc32xx->chip.pwms[0 ].hwpwm <<2 )); -platform_set_drvdata (pdev, lpc32xx);return 0 ;
drivers/pwm/pwm-rockchip.c +0 -14
@@ -383,20 +383,6 @@ static int rockchip_pwm_remove(struct platform_device *pdev) {struct rockchip_pwm_chip *pc =platform_get_drvdata (pdev); -/* -* Disable the PWM clk before unpreparing it if the PWM device is still -* running. This should only happen when the last PWM user left it -* enabled, or when nobody requested a PWM that was previously enabled -* by the bootloader. -* -* FIXME: Maybe the core should disable all PWM devices in -* pwmchip_remove(). In this case we'd only have to call -* clk_unprepare() after pwmchip_remove(). -* -*/ -if (pwm_is_enabled (pc->chip.pwms)) -clk_disable (pc->clk); -clk_unprepare (pc->pclk);clk_unprepare (pc->clk);
drivers/pwm/pwm-stm32-lp.c +0 -2
@@ -225,8 +225,6 @@ static int stm32_pwm_lp_remove(struct platform_device *pdev) {struct stm32_pwm_lp *priv =platform_get_drvdata (pdev); -pwm_disable (&priv->chip.pwms[0 ]); -return pwmchip_remove (&priv->chip); }
drivers/rtc/Kconfig +1 -0
@@ -625,6 +625,7 @@ config RTC_DRV_FM3130 config RTC_DRV_RX8010 tristate "Epson RX8010SJ" + select REGMAP_I2C help If you say yes here you get support for the Epson RX8010SJ RTC chip.
drivers/staging/rtl8192u/r8192U_core.c +1 -1
@@ -4338,7 +4338,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb, bpacket_match_bssid = (type !=IEEE80211_FTYPE_CTL ) && (ether_addr_equal (priv->ieee80211->current_network.bssid, (fc &IEEE80211_FCTL_TODS ) ? hdr->addr1 : (fc &IEEE80211_FCTL_FROMDS ) ? hdr->addr2 : hdr->addr3)) && (!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV); - bpacket_toself = bpacket_match_bssid & + bpacket_toself = bpacket_match_bssid && (ether_addr_equal (praddr, priv->ieee80211->dev->dev_addr));if (WLAN_FC_GET_FRAMETYPE (fc) ==IEEE80211_STYPE_BEACON )
drivers/thermal/samsung/exynos_tmu.c +1 -0
@@ -1070,6 +1070,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) data->sclk =devm_clk_get (&pdev->dev,"tmu_sclk" );if (IS_ERR (data->sclk)) {dev_err (&pdev->dev,"Failed to get sclk\n" ); + ret =PTR_ERR (data->sclk); goto err_clk; }else { ret =clk_prepare_enable (data->sclk);
drivers/tty/vt/vt.c +27 -4
@@ -2070,7 +2070,7 @@ static void restore_cur(struct vc_data *vc)enum { ESnormal, ESesc, ESsquare, ESgetpars, ESfunckey, EShash, ESsetG0, ESsetG1, ESpercent, EScsiignore, ESnonstd, - ESpalette, ESosc }; + ESpalette, ESosc, ESapc, ESpm, ESdcs };/* console_lock is held (except via vc_init()) */ static void reset_terminal (struct vc_data *vc,int do_clear)
@@ -2124,20 +2124,28 @@ static void reset_terminal(struct vc_data *vc, int do_clear)csi_J (vc,2 ); } +/* is this state an ANSI control string? */ +static bool ansi_control_string (unsigned int state) +{ +if (state == ESosc || state == ESapc || state == ESpm || state == ESdcs) +return true; +return false; +} +/* console_lock is held */ static void do_con_trol (struct tty_struct *tty,struct vc_data *vc,int c) {/* * Control characters can be used in the _middle_ -* of an escape sequence. +* of an escape sequence, aside from ANSI control strings. */ -if (vc->vc_state == ESosc && c>=8 && c<=13 )/* ... except for OSC */ +if (ansi_control_string (vc->vc_state) && c >=8 && c <=13 )return ;switch (c) {case 0 :return ;case 7 : -if (vc->vc_state == ESosc) +if (ansi_control_string (vc->vc_state)) vc->vc_state = ESnormal;else if (vc->vc_bell_duration)kd_mksound (vc->vc_bell_pitch, vc->vc_bell_duration);
@@ -2196,6 +2204,12 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)case ']' : vc->vc_state = ESnonstd;return ; +case '_' : + vc->vc_state = ESapc; +return ; +case '^' : + vc->vc_state = ESpm; +return ;case '%' : vc->vc_state = ESpercent;return ;
@@ -2212,6 +2226,9 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c)case 'H' : vc->vc_tab_stop[7 & (vc->vc_x >>5 )] |= (1 << (vc->vc_x &31 ));return ; +case 'P' : + vc->vc_state = ESdcs; +return ;case 'Z' :respond_ID (tty);return ;
@@ -2531,8 +2548,14 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) vc->vc_translate =set_translate (vc->vc_G1_charset, vc); vc->vc_state = ESnormal;return ; +case ESapc: +return ;case ESosc:return ; +case ESpm: +return ; +case ESdcs: +return ;default : vc->vc_state = ESnormal; }
fs/btrfs/volumes.c +4 -3
@@ -742,6 +742,8 @@ static int btrfs_free_stale_devices(const char *path,struct btrfs_device *device, *tmp_device;int ret =0 ; +lockdep_assert_held (&uuid_mutex); +if (path) ret = -ENOENT ;
@@ -1181,11 +1183,12 @@ static struct btrfs_fs_devices *clone_fs_devices(struct btrfs_fs_devices *orig)struct btrfs_device *orig_dev;int ret =0 ; +lockdep_assert_held (&uuid_mutex); + fs_devices =alloc_fs_devices (orig->fsid,NULL );if (IS_ERR (fs_devices))return fs_devices; -mutex_lock (&orig->device_list_mutex); fs_devices->total_devices = orig->total_devices;list_for_each_entry (orig_dev, &orig->devices, dev_list) {
@@ -1217,10 +1220,8 @@ static struct btrfs_fs_devices *clone_fs_devices(struct btrfs_fs_devices *orig) device->fs_devices = fs_devices; fs_devices->num_devices++; } -mutex_unlock (&orig->device_list_mutex);return fs_devices; error: -mutex_unlock (&orig->device_list_mutex);free_fs_devices (fs_devices);return ERR_PTR (ret); }
fs/ceph/caps.c +2 -0
@@ -1775,6 +1775,8 @@ static u64 __mark_caps_flushing(struct inode *inode,* try to invalidate mapping pages without blocking. */ static int try_nonblocking_invalidate (struct inode *inode) + __releases(ci->i_ceph_lock) + __acquires(ci->i_ceph_lock) {struct ceph_inode_info *ci =ceph_inode (inode);u32 invalidating_gen = ci->i_rdcache_gen;
fs/ceph/file.c +17 -15
@@ -1469,32 +1469,26 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from) goto out; } - err =file_remove_privs (file); -if (err) +down_read (&osdc->lock); + map_flags = osdc->osdmap->flags; + pool_flags =ceph_pg_pool_flags (osdc->osdmap, ci->i_layout.pool_id); +up_read (&osdc->lock); +if ((map_flags &CEPH_OSDMAP_FULL ) || + (pool_flags &CEPH_POOL_FLAG_FULL )) { + err = -ENOSPC ; goto out; + } - err =file_update_time (file); + err =file_remove_privs (file);if (err) goto out; -inode_inc_iversion_raw (inode); -if (ci->i_inline_version !=CEPH_INLINE_NONE ) { err =ceph_uninline_data (file,NULL );if (err <0 ) goto out; } -down_read (&osdc->lock); - map_flags = osdc->osdmap->flags; - pool_flags =ceph_pg_pool_flags (osdc->osdmap, ci->i_layout.pool_id); -up_read (&osdc->lock); -if ((map_flags &CEPH_OSDMAP_FULL ) || - (pool_flags &CEPH_POOL_FLAG_FULL )) { - err = -ENOSPC ; - goto out; - } -dout ("aio_write %p %llx.%llx %llu~%zd getting caps. i_size %llu\n" , inode,ceph_vinop (inode), pos, count,i_size_read (inode));if (fi->fmode &CEPH_FILE_MODE_LAZY )
@@ -1507,6 +1501,12 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from)if (err <0 ) goto out; + err =file_update_time (file); +if (err) + goto out_caps; + +inode_inc_iversion_raw (inode); +dout ("aio_write %p %llx.%llx %llu~%zd got cap refs on %s\n" , inode,ceph_vinop (inode), pos, count,ceph_cap_string (got));
@@ -1590,6 +1590,8 @@ static ssize_t ceph_write_iter(struct kiocb *iocb, struct iov_iter *from) } goto out_unlocked; +out_caps: +ceph_put_cap_refs (ci, got); out:if (direct_lock)ceph_end_io_direct (inode);
fs/nilfs2/sysfs.c +11 -15
@@ -64,11 +64,9 @@ static const struct sysfs_ops nilfs_##name##_attr_ops = { \#define NILFS_DEV_INT_GROUP_TYPE (name, parent_name) \ static void nilfs_##name##_attr_release(struct kobject *kobj) \ { \ - struct nilfs_sysfs_##parent_name##_subgroups *subgroups; \ - struct the_nilfs *nilfs = container_of(kobj->parent, \ - struct the_nilfs, \ - ns_##parent_name##_kobj); \ - subgroups = nilfs->ns_##parent_name##_subgroups; \ + struct nilfs_sysfs_##parent_name##_subgroups *subgroups = container_of(kobj, \ + struct nilfs_sysfs_##parent_name##_subgroups, \ + sg_##name##_kobj); \ complete(&subgroups->sg_##name##_kobj_unregister); \ } \ static struct kobj_type nilfs_##name##_ktype = { \
@@ -94,12 +92,12 @@ static int nilfs_sysfs_create_##name##_group(struct the_nilfs *nilfs) \ err = kobject_init_and_add(kobj, &nilfs_##name##_ktype, parent, \ #name); \ if (err) \ - return err; \ - return 0; \ + kobject_put(kobj); \ + return err; \ } \ static void nilfs_sysfs_delete_##name##_group(struct the_nilfs *nilfs) \ { \ - kobject_del(&nilfs->ns_##parent_name##_subgroups->sg_##name##_kobj); \ + kobject_put(&nilfs->ns_##parent_name##_subgroups->sg_##name##_kobj); \ }/************************************************************************
@@ -210,14 +208,14 @@ int nilfs_sysfs_create_snapshot_group(struct nilfs_root *root) }if (err) -return err; +kobject_put (&root->snapshot_kobj); -return 0 ; +return err; }void nilfs_sysfs_delete_snapshot_group (struct nilfs_root *root) { -kobject_del (&root->snapshot_kobj); +kobject_put (&root->snapshot_kobj); }/************************************************************************
@@ -1000,7 +998,7 @@ int nilfs_sysfs_create_device_group(struct super_block *sb) err =kobject_init_and_add (&nilfs->ns_dev_kobj, &nilfs_dev_ktype,NULL ,"%s" , sb->s_id);if (err) - goto free_dev_subgroups; + goto cleanup_dev_kobject; err =nilfs_sysfs_create_mounted_snapshots_group (nilfs);if (err)
@@ -1037,9 +1035,7 @@ int nilfs_sysfs_create_device_group(struct super_block *sb)nilfs_sysfs_delete_mounted_snapshots_group (nilfs); cleanup_dev_kobject: -kobject_del (&nilfs->ns_dev_kobj); - -free_dev_subgroups: +kobject_put (&nilfs->ns_dev_kobj);kfree (nilfs->ns_dev_subgroups); failed_create_device_group:
fs/nilfs2/the_nilfs.c +4 -5
@@ -797,14 +797,13 @@ nilfs_find_or_create_root(struct the_nilfs *nilfs, __u64 cno)void nilfs_put_root (struct nilfs_root *root) { -if (refcount_dec_and_test (&root->count)) { -struct the_nilfs *nilfs = root->nilfs; +struct the_nilfs *nilfs = root->nilfs; -nilfs_sysfs_delete_snapshot_group (root); - -spin_lock (&nilfs->ns_cptree_lock); +if (refcount_dec_and_lock (&root->count, &nilfs->ns_cptree_lock)) {rb_erase (&root->rb_node, &nilfs->ns_cptree);spin_unlock (&nilfs->ns_cptree_lock); + +nilfs_sysfs_delete_snapshot_group (root);iput (root->ifile);kfree (root);
include/linux/cacheinfo.h +0 -18
@@ -78,24 +78,6 @@ struct cpu_cacheinfo {bool cpu_map_populated; }; -/* -* Helpers to make sure "func" is executed on the cpu whose cache -* attributes are being detected -*/ -#define DEFINE_SMP_CALL_CACHE_FUNCTION (func) \ -static inline void _##func(void *ret) \ -{ \ - int cpu = smp_processor_id(); \ - *(int *)ret = __##func(cpu); \ -} \ - \ -int func(unsigned int cpu) \ -{ \ - int ret; \ - smp_call_function_single(cpu, _##func, &ret, true); \ - return ret; \ -} -struct cpu_cacheinfo *get_cpu_cacheinfo (unsigned int cpu);int init_cache_level (unsigned int cpu);int populate_cache_leaves (unsigned int cpu);
include/linux/kvm_host.h +3 -8
@@ -266,7 +266,8 @@ struct kvm_vcpu {struct preempt_notifier preempt_notifier;#endif int cpu; -int vcpu_id; +int vcpu_id;/* id given by userspace at creation */ +int vcpu_idx;/* index in kvm->vcpus array */ int srcu_idx;int mode;u64 requests;
@@ -571,13 +572,7 @@ static inline struct kvm_vcpu *kvm_get_vcpu_by_id(struct kvm *kvm, int id)static inline int kvm_vcpu_get_idx (struct kvm_vcpu *vcpu) { -struct kvm_vcpu *tmp; -int idx; - -kvm_for_each_vcpu (idx, tmp, vcpu->kvm) -if (tmp == vcpu) -return idx; -BUG (); +return vcpu->vcpu_idx; }#define kvm_for_each_memslot (memslot, slots) \
include/linux/pci-ecam.h +1 -0
@@ -51,6 +51,7 @@ extern struct pci_ecam_ops pci_generic_ecam_ops;#if defined(CONFIG_ACPI ) && defined(CONFIG_PCI_QUIRKS )extern struct pci_ecam_ops pci_32b_ops;/* 32-bit accesses only */ +extern struct pci_ecam_ops pci_32b_read_ops;/* 32-bit read only */ extern struct pci_ecam_ops hisi_pcie_ops;/* HiSilicon */ extern struct pci_ecam_ops thunder_pem_ecam_ops;/* Cavium ThunderX 1.x & 2.x */ extern struct pci_ecam_ops pci_thunder_ecam_ops;/* Cavium ThunderX 1.x */
include/linux/thermal.h +3 -2
@@ -501,12 +501,13 @@ static inline void thermal_zone_device_update(struct thermal_zone_device *tz,static inline void thermal_zone_set_trips (struct thermal_zone_device *tz) { }static inline struct thermal_cooling_device * -thermal_cooling_device_register (char *type,void *devdata, +thermal_cooling_device_register (const char *type,void *devdata,const struct thermal_cooling_device_ops *ops) {return ERR_PTR (-ENODEV ); }static inline struct thermal_cooling_device *thermal_of_cooling_device_register (struct device_node *np, -char *type,void *devdata,const struct thermal_cooling_device_ops *ops) +const char *type,void *devdata, +const struct thermal_cooling_device_ops *ops) {return ERR_PTR (-ENODEV ); }static inline struct thermal_cooling_device * devm_thermal_of_cooling_device_register(struct device *dev,
kernel/profile.c +11 -10
@@ -41,7 +41,8 @@ struct profile_hit {#define NR_PROFILE_GRP (NR_PROFILE_HIT/PROFILE_GRPSZ)static atomic_t *prof_buffer; -static unsigned long prof_len, prof_shift; +static unsigned long prof_len; +static unsigned short int prof_shift;int prof_on__read_mostly ;EXPORT_SYMBOL_GPL (prof_on);
@@ -67,8 +68,8 @@ int profile_setup(char *str)if (str[strlen (sleepstr)] ==',' ) str +=strlen (sleepstr) +1 ;if (get_option (&str, &par)) - prof_shift = par; -pr_info ("kernel sleep profiling enabled (shift: %ld)\n" , + prof_shift =clamp (par,0 ,BITS_PER_LONG -1 ); +pr_info ("kernel sleep profiling enabled (shift: %u)\n" , prof_shift);#else pr_warn ("kernel sleep profiling requires CONFIG_SCHEDSTATS\n" );
@@ -78,21 +79,21 @@ int profile_setup(char *str)if (str[strlen (schedstr)] ==',' ) str +=strlen (schedstr) +1 ;if (get_option (&str, &par)) - prof_shift = par; -pr_info ("kernel schedule profiling enabled (shift: %ld)\n" , + prof_shift =clamp (par,0 ,BITS_PER_LONG -1 ); +pr_info ("kernel schedule profiling enabled (shift: %u)\n" , prof_shift); }else if (!strncmp (str, kvmstr,strlen (kvmstr))) { prof_on =KVM_PROFILING ;if (str[strlen (kvmstr)] ==',' ) str +=strlen (kvmstr) +1 ;if (get_option (&str, &par)) - prof_shift = par; -pr_info ("kernel KVM profiling enabled (shift: %ld)\n" , + prof_shift =clamp (par,0 ,BITS_PER_LONG -1 ); +pr_info ("kernel KVM profiling enabled (shift: %u)\n" , prof_shift); }else if (get_option (&str, &par)) { - prof_shift = par; + prof_shift =clamp (par,0 ,BITS_PER_LONG -1 ); prof_on =CPU_PROFILING ; -pr_info ("kernel profiling enabled (shift: %ld)\n" , +pr_info ("kernel profiling enabled (shift: %u)\n" , prof_shift); }return 1 ;
@@ -468,7 +469,7 @@ read_profile(struct file *file, char __user *buf, size_t count, loff_t *ppos)unsigned long p = *ppos;ssize_t read;char *pnt; -unsigned int sample_step =1 << prof_shift; +unsigned long sample_step =1UL << prof_shift;profile_flip_buffers ();if (p >= (prof_len+1 )*sizeof (unsigned int ))
kernel/sys.c +0 -7
@@ -1927,13 +1927,6 @@ static int validate_prctl_map_addr(struct prctl_mm_map *prctl_map) error = -EINVAL ; -/* -* @brk should be after @end_data in traditional maps. -*/ -if (prctl_map->start_brk <= prctl_map->end_data || - prctl_map->brk <= prctl_map->end_data) - goto out; -/* * Neither we should allow to override limits if they set. */
lib/Kconfig.debug +0 -1
@@ -868,7 +868,6 @@ config HARDLOCKUP_DETECTOR depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_ARCH select LOCKUP_DETECTOR select HARDLOCKUP_DETECTOR_PERF if HAVE_HARDLOCKUP_DETECTOR_PERF - select HARDLOCKUP_DETECTOR_ARCH if HAVE_HARDLOCKUP_DETECTOR_ARCH help Say Y here to enable the kernel to act as a watchdog to detect hard lockups.
net/9p/trans_virtio.c +3 -1
@@ -605,7 +605,7 @@ static int p9_virtio_probe(struct virtio_device *vdev) chan->vc_wq =kmalloc (sizeof (wait_queue_head_t),GFP_KERNEL );if (!chan->vc_wq) { err = -ENOMEM ; - goto out_free_tag; + goto out_remove_file; }init_waitqueue_head (chan->vc_wq); chan->ring_bufs_avail =1 ;
@@ -623,6 +623,8 @@ static int p9_virtio_probe(struct virtio_device *vdev)return 0 ; +out_remove_file: +sysfs_remove_file (&vdev->dev.kobj, &dev_attr_mount_tag.attr); out_free_tag:kfree (tag); out_free_vq:
net/sctp/input.c +3 -0
@@ -1168,6 +1168,9 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(union sctp_addr_param *param;union sctp_addr paddr; +if (ntohs (ch->length) <sizeof (*asconf) +sizeof (struct sctp_paramhdr )) +return NULL ; +/* Skip over the ADDIP header and find the Address parameter */ param = (union sctp_addr_param *)(asconf +1 );
net/sctp/sm_make_chunk.c +10 -3
@@ -2157,9 +2157,16 @@ static enum sctp_ierror sctp_verify_param(struct net *net,break ;case SCTP_PARAM_SET_PRIMARY : -if (ep->asconf_enable) -break ; - goto unhandled; +if (!ep->asconf_enable) + goto unhandled; + +if (ntohs (param.p->length) <sizeof (struct sctp_addip_param ) + +sizeof (struct sctp_paramhdr )) { +sctp_process_inv_paramlength (asoc, param.p, + chunk, err_chunk); + retval =SCTP_IERROR_ABORT ; + } +break ;case SCTP_PARAM_HOST_NAME_ADDRESS :/* Tell the peer, we won't support this param. */
security/apparmor/apparmorfs.c +0 -3
@@ -1960,9 +1960,6 @@ int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name,return error; } - -#define list_entry_is_head (pos, head, member) (&pos->member == (head)) -/** * __next_ns - find the next namespace to list * @root: root namespace to stop search at (NOT NULL)
virt/kvm/kvm_main.c +3 -2
@@ -2864,7 +2864,8 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id) goto unlock_vcpu_destroy; } -BUG_ON (kvm->vcpus[atomic_read (&kvm->online_vcpus)]); + vcpu->vcpu_idx =atomic_read (&kvm->online_vcpus); +BUG_ON (kvm->vcpus[vcpu->vcpu_idx]);/* Now it's all set up, let userspace reach it */ kvm_get_kvm (kvm);
@@ -2874,7 +2875,7 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id) goto unlock_vcpu_destroy; } - kvm->vcpus[atomic_read (&kvm->online_vcpus)] = vcpu; + kvm->vcpus[vcpu->vcpu_idx] = vcpu;/* * Pairs with smp_rmb() in kvm_get_vcpu. Write kvm->vcpus