Linux 4.19.208
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.208 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.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/arm64/kernel/cacheinfo.c | 7 --- arch/mips/kernel/cacheinfo.c | 7 --- arch/riscv/kernel/cacheinfo.c | 7 --- arch/s390/net/bpf_jit_comp.c | 50 +++++++++++----------- arch/x86/kernel/cpu/cacheinfo.c | 7 --- block/blk-throttle.c | 1 drivers/crypto/talitos.c | 2 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/parisc/dino.c | 18 +++---- 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/thermal/samsung/exynos_tmu.c | 1 fs/ceph/caps.c | 2 fs/nilfs2/sysfs.c | 26 ++++------- fs/nilfs2/the_nilfs.c | 9 +-- include/linux/cacheinfo.h | 18 ------- include/linux/kvm_host.h | 11 +--- kernel/profile.c | 21 ++++----- kernel/rcu/tree_exp.h | 2 kernel/sys.c | 7 --- kernel/trace/trace_kprobe.c | 3 - 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 +- 34 files changed, 116 insertions(+), 173 deletions(-)
Andy Shevchenko (2):
apparmor: remove duplicate macro list_entry_is_head()
dmaengine: acpi: Avoid comparison GSI with Linux vIRQ
Christophe Leroy (1):
crypto: talitos - fix max key size for sha384 and sha512
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()
Greg Kroah-Hartman (1):
Linux 4.19.208
Guenter Roeck (2):
parisc: Move pci_dev_is_behind_card_dino to where it is used drm/nouveau/nvkm: Replace -ENOSYS with -ENODEV
Ilya Leoshkevich (1):
s390/bpf: Fix optimizing out zero-extensions
Jeff Layton (1):
ceph: lockdep annotations for try_nonblocking_invalidate
Johannes Berg (1):
dmaengine: ioat: depends on !UML
Li Huafei (1):
tracing/kprobe: Fix kprobe_on_func_entry() modification
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
Neeraj Upadhyay (1):
rcu: Fix missed wakeup of exp_wq waiters
Pavel Skripkin (1):
profiling: fix shift-out-of-bounds bugs
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()
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
Zhen Lei (1):
nilfs2: use refcount_dec_and_lock() to fix potential UAF
Zou Wei (1):
dmaengine: sprd: Add missing MODULE_DEVICE_TABLE
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 207 +SUBLEVEL = 208 EXTRAVERSION = NAME = "People's Front"
arch/arm64/kernel/cacheinfo.c +2 -5
@@ -45,7 +45,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);
@@ -80,7 +80,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;
@@ -99,6 +99,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
@@ -28,7 +28,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);
@@ -80,7 +80,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);
@@ -109,6 +109,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
@@ -31,7 +31,7 @@ static void ci_leaf_init(struct cacheinfo *this_leaf, | CACHE_WRITE_ALLOCATE; } -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);
@@ -67,7 +67,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;
@@ -99,6 +99,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/net/bpf_jit_comp.c +26 -24
92 lines not on this page · raw message
arch/x86/kernel/cpu/cacheinfo.c +2 -5
@@ -956,7 +956,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);
@@ -985,7 +985,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);
@@ -1004,6 +1004,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
@@ -2437,6 +2437,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/crypto/talitos.c +1 -1
@@ -853,7 +853,7 @@ static void talitos_unregister_rng(struct device *dev)* HMAC_SNOOP_NO_AFEA (HSNA) instead of type IPSEC_ESP */ #define TALITOS_CRA_PRIORITY_AEAD_HSNA (TALITOS_CRA_PRIORITY - 1) -#ifdef CONFIG_CRYPTO_DEV_TALITOS_SEC2 +#ifdef CONFIG_CRYPTO_DEV_TALITOS2 #define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA512_BLOCK_SIZE)#else #define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA256_BLOCK_SIZE)
drivers/dma/Kconfig +1 -1
@@ -266,7 +266,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
@@ -72,10 +72,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
@@ -1016,6 +1016,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
@@ -2674,7 +2674,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/parisc/dino.c +9 -9
@@ -160,15 +160,6 @@ struct dino_device (struct dino_device *)__pdata; }) -/* 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 */
@@ -452,6 +443,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/pwm/pwm-img.c +0 -16
@@ -332,23 +332,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
@@ -124,17 +124,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
@@ -392,20 +392,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
@@ -224,8 +224,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/thermal/samsung/exynos_tmu.c +1 -0
@@ -1084,6 +1084,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);
fs/ceph/caps.c +2 -0
@@ -1774,6 +1774,8 @@ static int __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/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
@@ -76,24 +76,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
@@ -248,7 +248,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;
@@ -551,13 +552,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) \
kernel/profile.c +11 -10
@@ -40,7 +40,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);
@@ -66,8 +67,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" );
@@ -77,21 +78,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 ;
@@ -467,7 +468,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/rcu/tree_exp.h +1 -1
@@ -613,7 +613,7 @@ static void rcu_exp_wait_wake(struct rcu_state *rsp, unsigned long s)spin_unlock (&rnp->exp_lock); }smp_mb ();/* All above changes before wakeup. */ -wake_up_all (&rnp->exp_wq[rcu_seq_ctr (rsp->expedited_sequence) &0x3 ]); +wake_up_all (&rnp->exp_wq[rcu_seq_ctr (s) &0x3 ]); }trace_rcu_exp_grace_period (rsp->name, s,TPS ("endwake" ));mutex_unlock (&rsp->exp_wake_mutex);
kernel/sys.c +0 -7
@@ -1931,13 +1931,6 @@ static int validate_prctl_map(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. */
kernel/trace/trace_kprobe.c +2 -1
@@ -836,8 +836,9 @@ static int create_trace_kprobe(int argc, char **argv)pr_info ("Failed to parse either an address or a symbol.\n" );return ret; } +/* Defer the ENOENT case until register kprobe */ if (offset && is_return && - !kprobe_on_func_entry (NULL , symbol, offset)) { +kprobe_on_func_entry (NULL , symbol, offset) == -EINVAL ) {pr_info ("Given offset is not valid for return probe.\n" );return -EINVAL ; }
lib/Kconfig.debug +0 -1
@@ -853,7 +853,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
@@ -620,7 +620,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 ;
@@ -638,6 +638,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
@@ -1125,6 +1125,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
@@ -2172,9 +2172,16 @@ static enum sctp_ierror sctp_verify_param(struct net *net,break ;case SCTP_PARAM_SET_PRIMARY : -if (net->sctp.addip_enable) -break ; - goto fallthrough; +if (!net->sctp.addip_enable) + goto fallthrough; + +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
@@ -2751,7 +2751,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);
@@ -2761,7 +2762,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