Linux 4.4.35
Greg KH
maintainerI'm announcing the release of the 4.4.35 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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 | 7 - arch/x86/kernel/cpu/amd.c | 6 - arch/x86/kvm/x86.c | 16 +++ arch/x86/purgatory/Makefile | 1 drivers/base/power/main.c | 8 - drivers/clk/mmp/clk-of-mmp2.c | 2 drivers/clk/mmp/clk-of-pxa168.c | 2 drivers/clk/mmp/clk-of-pxa910.c | 4 drivers/crypto/caam/caamalg.c | 9 ++ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 20 ++++ drivers/i2c/Kconfig | 1 drivers/i2c/muxes/Kconfig | 1 drivers/infiniband/core/cm.c | 126 ++++++++++++++++++++++++---- drivers/infiniband/core/umem.c | 2 drivers/infiniband/core/uverbs_main.c | 7 - drivers/infiniband/hw/mlx4/ah.c | 5 - drivers/infiniband/hw/mlx4/cq.c | 5 - drivers/infiniband/hw/mlx5/cq.c | 3 drivers/infiniband/hw/mlx5/main.c | 7 + drivers/mfd/intel-lpss.c | 3 drivers/mfd/mfd-core.c | 2 drivers/net/wireless/iwlwifi/pcie/drv.c | 79 ++++++++++------- drivers/rtc/rtc-omap.c | 6 - drivers/uwb/lc-rc.c | 16 ++- drivers/uwb/pal.c | 2 fs/ext4/ext4.h | 1 fs/ext4/super.c | 17 +++ fs/fuse/file.c | 6 + kernel/power/suspend_test.c | 4 net/can/bcm.c | 32 +++++-- net/netfilter/nft_dynset.c | 6 - scripts/gcc-x86_64-has-stack-protector.sh | 2 34 files changed, 309 insertions(+), 102 deletions(-)
Anders K. Pedersen (1):
netfilter: nft_dynset: fix element timeout for HZ != 1000
Azhar Shaikh (1):
mfd: intel-lpss: Do not put device in reset state on suspend
Borislav Petkov (1):
kbuild: Steal gcc's pie from the very beginning
Brian Norris (1):
PM / sleep: don't suspend parent when async child suspend_{noirq, late} fails
Daniel Jurgens (2):
IB/mlx4: Check gid_index return value IB/mlx5: Use cache line size to select CQE stride
Eli Cohen (1):
IB/mlx5: Fix fatal error dispatching
Greg Kroah-Hartman (1):
Linux 4.4.35
Ignacio Alvarado (1):
KVM: Disable irq while unregistering user notifier
Johan Hovold (3):
mfd: core: Fix device reference leak in mfd_clone_cell
uwb: fix device reference leaks
PM / sleep: fix device reference leak in test_suspend
Linus Walleij (1):
i2c: mux: fix up dependencies
Lokesh Vutla (1):
rtc: omap: Fix selecting external osc
Luca Coelho (1):
iwlwifi: pcie: fix SPLC structure parsing
Mario Kleiner (1):
drm/amdgpu: Attach exclusive fence to prime exported bo's. (v5)
Mark Bloch (2):
IB/core: Avoid unsigned int overflow in sg_alloc_table IB/cm: Mark stale CM id's whenever the mad agent was unregistered
Matan Barak (1):
IB/mlx4: Fix create CQ error flow
Miklos Szeredi (1):
fuse: fix fuse_write_end() if zero bytes were copied
Oliver Hartkopp (1):
can: bcm: fix warning in bcm_connect/proc_register
Paolo Bonzini (1):
KVM: x86: fix missed SRCU usage in kvm_lapic_set_vapic_addr
Sebastian Andrzej Siewior (3):
kbuild: add -fno-PIE
scripts/has-stack-protector: add -fno-PIE
x86/kexec: add -fno-PIE
Sven Ebenfeld (1):
crypto: caam - do not register AES-XTS mode on LP units
Tariq Toukan (1):
IB/uverbs: Fix leak of XRC target QPs
Theodore Ts'o (1):
ext4: sanity check the block and cluster size at mount time
Wei Yongjun (3):
clk: mmp: pxa910: fix return value check in pxa910_clk_init()
clk: mmp: pxa168: fix return value check in pxa168_clk_init()
clk: mmp: mmp2: fix return value check in mmp2_clk_init()
Yazen Ghannam (1):
x86/cpu/AMD: Fix cpu_llc_id for AMD Fam17h systems
Greg KH
maintainerMakefile +4 -3
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 34 +SUBLEVEL = 35 EXTRAVERSION = NAME = Blurry Fish Butt
@@ -395,11 +395,12 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Werror-implicit-function-declaration \ -Wno-format-security \ - -std=gnu89 + -std=gnu89 $(call cc-option,-fno-PIE) + KBUILD_AFLAGS_KERNEL := KBUILD_CFLAGS_KERNEL := -KBUILD_AFLAGS := -D__ASSEMBLY__ +KBUILD_AFLAGS := -D__ASSEMBLY__ $(call cc-option,-fno-PIE) KBUILD_AFLAGS_MODULE := -DMODULE KBUILD_CFLAGS_MODULE := -DMODULE KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
arch/x86/kernel/cpu/amd.c +1 -5
@@ -352,7 +352,6 @@ static void amd_detect_cmp(struct cpuinfo_x86 *c)#ifdef CONFIG_SMP unsigned bits;int cpu =smp_processor_id (); -unsigned int socket_id, core_complex_id; bits = c->x86_coreid_bits;/* Low order bits define the core id (index of core in socket) */
@@ -370,10 +369,7 @@ static void amd_detect_cmp(struct cpuinfo_x86 *c)if (c->x86 !=0x17 || !cpuid_edx (0x80000006 ))return ; - socket_id = (c->apicid >> bits) -1 ; - core_complex_id = (c->apicid & ((1 << bits) -1 )) >>3 ; - -per_cpu (cpu_llc_id, cpu) = (socket_id <<3 ) | core_complex_id; +per_cpu (cpu_llc_id, cpu) = c->apicid >>3 ;#endif }
arch/x86/kvm/x86.c +14 -2
@@ -199,7 +199,18 @@ static void kvm_on_user_return(struct user_return_notifier *urn)struct kvm_shared_msrs *locals = container_of(urn, struct kvm_shared_msrs, urn);struct kvm_shared_msr_values *values; +unsigned long flags; +/* +* Disabling irqs at this point since the following code could be +* interrupted and executed through kvm_arch_hardware_disable() +*/ +local_irq_save (flags); +if (locals->registered) { + locals->registered = false; +user_return_notifier_unregister (urn); + } +local_irq_restore (flags);for (slot =0 ; slot < shared_msrs_global.nr; ++slot) { values = &locals->values[slot];if (values->host != values->curr) {
@@ -207,8 +218,6 @@ static void kvm_on_user_return(struct user_return_notifier *urn) values->curr = values->host; } } - locals->registered = false; -user_return_notifier_unregister (urn); }static void shared_msr_update (unsigned slot,u32 msr)
@@ -3317,6 +3326,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, };case KVM_SET_VAPIC_ADDR : {struct kvm_vapic_addr va; +int idx; r = -EINVAL ;if (!lapic_in_kernel (vcpu))
@@ -3324,7 +3334,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp, r = -EFAULT ;if (copy_from_user (&va, argp,sizeof va)) goto out; + idx =srcu_read_lock (&vcpu->kvm->srcu); r =kvm_lapic_set_vapic_addr (vcpu, va.vapic_addr); +srcu_read_unlock (&vcpu->kvm->srcu, idx);break ; }case KVM_X86_SETUP_MCE : {
arch/x86/purgatory/Makefile +1 -0
@@ -12,6 +12,7 @@ targets += purgatory.ro KBUILD_CFLAGS := -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -fno-builtin -ffreestanding -c -MD -Os -mcmodel=large KBUILD_CFLAGS += -m$(BITS) +KBUILD_CFLAGS += $(call cc-option,-fno-PIE) $(obj)/purgatory.ro: $(PURGATORY_OBJS) FORCE $(call if_changed,ld)
drivers/base/power/main.c +4 -4
@@ -1022,6 +1022,8 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool aTRACE_DEVICE (dev);TRACE_SUSPEND (0 ); +dpm_wait_for_children (dev, async); +if (async_error) goto Complete;
@@ -1033,8 +1035,6 @@ static int __device_suspend_noirq(struct device *dev, pm_message_t state, bool aif (dev->power.syscore || dev->power.direct_complete) goto Complete; -dpm_wait_for_children (dev, async); -if (dev->pm_domain) { info ="noirq power domain " ; callback =pm_noirq_op (&dev->pm_domain->ops, state);
@@ -1169,6 +1169,8 @@ static int __device_suspend_late(struct device *dev, pm_message_t state, bool as__pm_runtime_disable (dev, false); +dpm_wait_for_children (dev, async); +if (async_error) goto Complete;
@@ -1180,8 +1182,6 @@ static int __device_suspend_late(struct device *dev, pm_message_t state, bool asif (dev->power.syscore || dev->power.direct_complete) goto Complete; -dpm_wait_for_children (dev, async); -if (dev->pm_domain) { info ="late power domain " ; callback =pm_late_early_op (&dev->pm_domain->ops, state);
drivers/clk/mmp/clk-of-mmp2.c +1 -1
@@ -313,7 +313,7 @@ static void __init mmp2_clk_init(struct device_node *np) } pxa_unit->apmu_base =of_iomap (np,1 ); -if (!pxa_unit->mpmu_base) { +if (!pxa_unit->apmu_base) {pr_err ("failed to map apmu registers\n" );return ; }
drivers/clk/mmp/clk-of-pxa168.c +1 -1
@@ -262,7 +262,7 @@ static void __init pxa168_clk_init(struct device_node *np) } pxa_unit->apmu_base =of_iomap (np,1 ); -if (!pxa_unit->mpmu_base) { +if (!pxa_unit->apmu_base) {pr_err ("failed to map apmu registers\n" );return ; }
drivers/clk/mmp/clk-of-pxa910.c +2 -2
@@ -282,7 +282,7 @@ static void __init pxa910_clk_init(struct device_node *np) } pxa_unit->apmu_base =of_iomap (np,1 ); -if (!pxa_unit->mpmu_base) { +if (!pxa_unit->apmu_base) {pr_err ("failed to map apmu registers\n" );return ; }
@@ -294,7 +294,7 @@ static void __init pxa910_clk_init(struct device_node *np) } pxa_unit->apbcp_base =of_iomap (np,3 ); -if (!pxa_unit->mpmu_base) { +if (!pxa_unit->apbcp_base) {pr_err ("failed to map apbcp registers\n" );return ; }
drivers/crypto/caam/caamalg.c +9 -0
@@ -4542,6 +4542,15 @@ static int __init caam_algapi_init(void)if (!aes_inst && (alg_sel ==OP_ALG_ALGSEL_AES ))continue ; +/* +* Check support for AES modes not available +* on LP devices. +*/ +if ((cha_vid &CHA_ID_LS_AES_MASK ) ==CHA_ID_LS_AES_LP ) +if ((alg->class1_alg_type &OP_ALG_AAI_MASK ) == +OP_ALG_AAI_XTS ) +continue ; + t_alg =caam_alg_alloc (alg);if (IS_ERR (t_alg)) { err =PTR_ERR (t_alg);
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
@@ -532,6 +532,7 @@ struct amdgpu_bo {u64 metadata_flags;void *metadata;u32 metadata_size; +unsigned prime_shared_count;/* list of all virtual address to which this bo * is associated to */
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +1 -1
@@ -117,7 +117,7 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev, entry->allowed_domains =AMDGPU_GEM_DOMAIN_GTT ; } entry->tv.bo = &entry->robj->tbo; - entry->tv.shared = true; + entry->tv.shared = !entry->robj->prime_shared_count;if (entry->prefered_domains ==AMDGPU_GEM_DOMAIN_GDS ) gds_obj = entry->robj;
drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c +19 -1
@@ -77,20 +77,36 @@ struct drm_gem_object *amdgpu_gem_prime_import_sg_table(struct drm_device *dev,list_add_tail (&bo->list, &adev->gem.objects);mutex_unlock (&adev->gem.mutex); + bo->prime_shared_count =1 ;return &bo->gem_base; }int amdgpu_gem_prime_pin (struct drm_gem_object *obj) {struct amdgpu_bo *bo =gem_to_amdgpu_bo (obj); -int ret =0 ; +long ret =0 ; ret =amdgpu_bo_reserve (bo, false);if (unlikely (ret !=0 ))return ret; +/* +* Wait for all shared fences to complete before we switch to future +* use of exclusive fence on this prime shared bo. +*/ + ret =reservation_object_wait_timeout_rcu (bo->tbo.resv, true, false, +MAX_SCHEDULE_TIMEOUT ); +if (unlikely (ret <0 )) { +DRM_DEBUG_PRIME ("Fence wait failed: %li\n" , ret); +amdgpu_bo_unreserve (bo); +return ret; + } +/* pin buffer into GTT */ ret =amdgpu_bo_pin (bo,AMDGPU_GEM_DOMAIN_GTT ,NULL ); +if (likely (ret ==0 )) + bo->prime_shared_count++; +amdgpu_bo_unreserve (bo);return ret; }
@@ -105,6 +121,8 @@ void amdgpu_gem_prime_unpin(struct drm_gem_object *obj)return ;amdgpu_bo_unpin (bo); +if (bo->prime_shared_count) + bo->prime_shared_count--;amdgpu_bo_unreserve (bo); }
drivers/i2c/Kconfig +0 -1
@@ -59,7 +59,6 @@ config I2C_CHARDEV config I2C_MUX tristate "I2C bus multiplexing support" - depends on HAS_IOMEM help Say Y here if you want the I2C core to support the ability to handle multiplexed I2C bus topologies, by presenting each
drivers/i2c/muxes/Kconfig +1 -0
@@ -63,6 +63,7 @@ config I2C_MUX_PINCTRL config I2C_MUX_REG tristate "Register-based I2C multiplexer" + depends on HAS_IOMEM help If you say yes to this option, support will be included for a register based I2C multiplexer. This driver provides access to
drivers/infiniband/core/cm.c +110 -16
275 lines not on this page · raw message
drivers/infiniband/core/umem.c +1 -1
@@ -175,7 +175,7 @@ struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr, cur_base = addr &PAGE_MASK ; -if (npages ==0 ) { +if (npages ==0 || npages >UINT_MAX ) { ret = -EINVAL ; goto out; }
drivers/infiniband/core/uverbs_main.c +2 -5
@@ -244,12 +244,9 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file, container_of(uobj, struct ib_uqp_object, uevent.uobject);idr_remove_uobj (&ib_uverbs_qp_idr, uobj); -if (qp != qp->real_qp) { -ib_close_qp (qp); - }else { +if (qp == qp->real_qp)ib_uverbs_detach_umcast (qp, uqp); -ib_destroy_qp (qp); - } +ib_destroy_qp (qp);ib_uverbs_release_uevent (file, &uqp->uevent);kfree (uqp); }
drivers/infiniband/hw/mlx4/ah.c +4 -1
@@ -102,7 +102,10 @@ static struct ib_ah *create_iboe_ah(struct ib_pd *pd, struct ib_ah_attr *ah_attrif (vlan_tag <0x1000 ) vlan_tag |= (ah_attr->sl &7 ) <<13 ; ah->av.eth.port_pd =cpu_to_be32 (to_mpd (pd)->pdn | (ah_attr->port_num <<24 )); - ah->av.eth.gid_index =mlx4_ib_gid_index_to_real_index (ibdev, ah_attr->port_num, ah_attr->grh.sgid_index); + ret =mlx4_ib_gid_index_to_real_index (ibdev, ah_attr->port_num, ah_attr->grh.sgid_index); +if (ret <0 ) +return ERR_PTR (ret); + ah->av.eth.gid_index = ret; ah->av.eth.vlan =cpu_to_be16 (vlan_tag);if (ah_attr->static_rate) { ah->av.eth.stat_rate = ah_attr->static_rate +MLX4_STAT_RATE_OFFSET ;
drivers/infiniband/hw/mlx4/cq.c +4 -1
@@ -253,11 +253,14 @@ struct ib_cq *mlx4_ib_create_cq(struct ib_device *ibdev,if (context)if (ib_copy_to_udata (udata, &cq->mcq.cqn,sizeof (__u32))) { err = -EFAULT ; - goto err_dbmap; + goto err_cq_free; }return &cq->ibcq; +err_cq_free: +mlx4_cq_free (dev->dev, &cq->mcq); + err_dbmap:if (context)mlx4_ib_db_unmap_user (to_mucontext (context), &cq->db);
drivers/infiniband/hw/mlx5/cq.c +1 -2
@@ -787,8 +787,7 @@ struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev,if (err) goto err_create; }else { -/* for now choose 64 bytes till we have a proper interface */ - cqe_size =64 ; + cqe_size =cache_line_size () ==128 ?128 :64 ; err =create_cq_kernel (dev, cq, entries, cqe_size, &cqb, &index, &inlen);if (err)
drivers/infiniband/hw/mlx5/main.c +5 -2
@@ -947,13 +947,13 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, void *context, {struct mlx5_ib_dev *ibdev = (struct mlx5_ib_dev *)context;struct ib_event ibev; - +bool fatal = false;u8 port =0 ;switch (event) {case MLX5_DEV_EVENT_SYS_ERROR : - ibdev->ib_active = false; ibev.event =IB_EVENT_DEVICE_FATAL ; + fatal = true;break ;case MLX5_DEV_EVENT_PORT_UP :
@@ -998,6 +998,9 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, void *context,if (ibdev->ib_active)ib_dispatch_event (&ibev); + +if (fatal) + ibdev->ib_active = false; }static void get_ext_port_caps (struct mlx5_ib_dev *dev)
drivers/mfd/intel-lpss.c +0 -3
@@ -494,9 +494,6 @@ int intel_lpss_suspend(struct device *dev)for (i =0 ; i <LPSS_PRIV_REG_COUNT ; i++) lpss->priv_ctx[i] =readl (lpss->priv + i *4 ); -/* Put the device into reset state */ -writel (0 , lpss->priv +LPSS_PRIV_RESETS ); -return 0 ; }EXPORT_SYMBOL_GPL (intel_lpss_suspend);
drivers/mfd/mfd-core.c +2 -0
@@ -354,6 +354,8 @@ int mfd_clone_cell(const char *cell, const char **clones, size_t n_clones) clones[i]); } +put_device (dev); +return 0 ; }EXPORT_SYMBOL (mfd_clone_cell);
drivers/net/wireless/iwlwifi/pcie/drv.c +48 -31
119 lines not on this page · raw message
drivers/rtc/rtc-omap.c +4 -2
@@ -109,6 +109,7 @@/* OMAP_RTC_OSC_REG bit fields: */ #define OMAP_RTC_OSC_32KCLK_EN BIT(6)#define OMAP_RTC_OSC_SEL_32KCLK_SRC BIT(3) +#define OMAP_RTC_OSC_OSC32K_GZ_DISABLE BIT(4)/* OMAP_RTC_IRQWAKEEN bit fields: */ #define OMAP_RTC_IRQWAKEEN_ALARM_WAKEEN BIT(1)
@@ -646,8 +647,9 @@ static int omap_rtc_probe(struct platform_device *pdev)*/ if (rtc->has_ext_clk) { reg =rtc_read (rtc,OMAP_RTC_OSC_REG ); -rtc_write (rtc,OMAP_RTC_OSC_REG , - reg |OMAP_RTC_OSC_SEL_32KCLK_SRC ); + reg &= ~OMAP_RTC_OSC_OSC32K_GZ_DISABLE ; + reg |=OMAP_RTC_OSC_32KCLK_EN |OMAP_RTC_OSC_SEL_32KCLK_SRC ; +rtc_writel (rtc,OMAP_RTC_OSC_REG , reg); } rtc->type->lock (rtc);
drivers/uwb/lc-rc.c +13 -3
@@ -56,8 +56,11 @@ static struct uwb_rc *uwb_rc_find_by_index(int index)struct uwb_rc *rc =NULL ; dev =class_find_device (&uwb_rc_class,NULL , &index, uwb_rc_index_match); -if (dev) +if (dev) { rc =dev_get_drvdata (dev); +put_device (dev); + } +return rc; }
@@ -467,7 +470,9 @@ struct uwb_rc *__uwb_rc_try_get(struct uwb_rc *target_rc)if (dev) { rc =dev_get_drvdata (dev);__uwb_rc_get (rc); +put_device (dev); } +return rc; }EXPORT_SYMBOL_GPL (__uwb_rc_try_get);
@@ -520,8 +525,11 @@ struct uwb_rc *uwb_rc_get_by_grandpa(const struct device *grandpa_dev) dev =class_find_device (&uwb_rc_class,NULL , grandpa_dev, find_rc_grandpa); -if (dev) +if (dev) { rc =dev_get_drvdata (dev); +put_device (dev); + } +return rc; }EXPORT_SYMBOL_GPL (uwb_rc_get_by_grandpa);
@@ -553,8 +561,10 @@ struct uwb_rc *uwb_rc_get_by_dev(const struct uwb_dev_addr *addr)struct uwb_rc *rc =NULL ; dev =class_find_device (&uwb_rc_class,NULL , addr, find_rc_dev); -if (dev) +if (dev) { rc =dev_get_drvdata (dev); +put_device (dev); + }return rc; }
drivers/uwb/pal.c +2 -0
@@ -97,6 +97,8 @@ static bool uwb_rc_class_device_exists(struct uwb_rc *target_rc) dev =class_find_device (&uwb_rc_class,NULL , target_rc, find_rc); +put_device (dev); +return (dev !=NULL ); }
fs/ext4/ext4.h +1 -0
@@ -221,6 +221,7 @@ struct ext4_io_submit {#define EXT4_MAX_BLOCK_SIZE 65536#define EXT4_MIN_BLOCK_LOG_SIZE 10#define EXT4_MAX_BLOCK_LOG_SIZE 16 +#define EXT4_MAX_CLUSTER_LOG_SIZE 30#ifdef __KERNEL__# define EXT4_BLOCK_SIZE (s) ((s)->s_blocksize)#else
fs/ext4/super.c +16 -1
@@ -3394,7 +3394,15 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)if (blocksize <EXT4_MIN_BLOCK_SIZE || blocksize >EXT4_MAX_BLOCK_SIZE ) {ext4_msg (sb,KERN_ERR , -"Unsupported filesystem blocksize %d" , blocksize); +"Unsupported filesystem blocksize %d (%d log_block_size)" , + blocksize,le32_to_cpu (es->s_log_block_size)); + goto failed_mount; + } +if (le32_to_cpu (es->s_log_block_size) > + (EXT4_MAX_BLOCK_LOG_SIZE -EXT4_MIN_BLOCK_LOG_SIZE )) { +ext4_msg (sb,KERN_ERR , +"Invalid log block size: %u" , +le32_to_cpu (es->s_log_block_size)); goto failed_mount; }
@@ -3533,6 +3541,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) "block size (%d)", clustersize, blocksize); goto failed_mount; } +if (le32_to_cpu (es->s_log_cluster_size) > + (EXT4_MAX_CLUSTER_LOG_SIZE -EXT4_MIN_BLOCK_LOG_SIZE )) { +ext4_msg (sb,KERN_ERR , +"Invalid log cluster size: %u" , +le32_to_cpu (es->s_log_cluster_size)); + goto failed_mount; + } sbi->s_cluster_bits =le32_to_cpu (es->s_log_cluster_size) -le32_to_cpu (es->s_log_block_size); sbi->s_clusters_per_group =
fs/fuse/file.c +6 -0
@@ -1997,6 +1997,10 @@ static int fuse_write_end(struct file *file, struct address_space *mapping, {struct inode *inode = page->mapping->host; +/* Haven't copied anything? Skip zeroing, size extending, dirtying. */ +if (!copied) + goto unlock; +if (!PageUptodate (page)) {/* Zero any unwritten bytes at the end of the page */ size_t endoff = (pos + copied) & ~PAGE_CACHE_MASK ;
@@ -2007,6 +2011,8 @@ static int fuse_write_end(struct file *file, struct address_space *mapping,fuse_write_update_size (inode, pos + copied);set_page_dirty (page); + +unlock:unlock_page (page);page_cache_release (page);
kernel/power/suspend_test.c +3 -1
@@ -203,8 +203,10 @@ static int __init test_suspend(void)/* RTCs have initialized by now too ... can we use one? */ dev =class_find_device (rtc_class,NULL ,NULL , has_wakealarm); -if (dev) +if (dev) { rtc =rtc_class_open (dev_name (dev)); +put_device (dev); + }if (!rtc) {printk (warn_no_rtc);return 0 ;
net/can/bcm.c +23 -9
@@ -1500,24 +1500,31 @@ static int bcm_connect(struct socket *sock, struct sockaddr *uaddr, int len,struct sockaddr_can *addr = (struct sockaddr_can *)uaddr;struct sock *sk = sock->sk;struct bcm_sock *bo =bcm_sk (sk); +int ret =0 ;if (len <sizeof (*addr))return -EINVAL ; -if (bo->bound) -return -EISCONN ; +lock_sock (sk); + +if (bo->bound) { + ret = -EISCONN ; + goto fail; + }/* bind a device to this socket */ if (addr->can_ifindex) {struct net_device *dev; dev =dev_get_by_index (&init_net, addr->can_ifindex); -if (!dev) -return -ENODEV ; - +if (!dev) { + ret = -ENODEV ; + goto fail; + }if (dev->type !=ARPHRD_CAN ) {dev_put (dev); -return -ENODEV ; + ret = -ENODEV ; + goto fail; } bo->ifindex = dev->ifindex;
@@ -1528,17 +1535,24 @@ static int bcm_connect(struct socket *sock, struct sockaddr *uaddr, int len, bo->ifindex =0 ; } - bo->bound =1 ; -if (proc_dir) {/* unique socket address as filename */ sprintf (bo->procname,"%lu" ,sock_i_ino (sk)); bo->bcm_proc_read =proc_create_data (bo->procname,0644 , proc_dir, &bcm_proc_fops, sk); +if (!bo->bcm_proc_read) { + ret = -ENOMEM ; + goto fail; + } } -return 0 ; + bo->bound =1 ; + +fail: +release_sock (sk); + +return ret; } static int bcm_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
net/netfilter/nft_dynset.c +4 -2
@@ -140,7 +140,8 @@ static int nft_dynset_init(const struct nft_ctx *ctx,if (tb[NFTA_DYNSET_TIMEOUT ] !=NULL ) {if (!(set->flags &NFT_SET_TIMEOUT ))return -EINVAL ; - timeout =be64_to_cpu (nla_get_be64 (tb[NFTA_DYNSET_TIMEOUT ])); + timeout =msecs_to_jiffies (be64_to_cpu (nla_get_be64 ( + tb[NFTA_DYNSET_TIMEOUT ]))); } priv->sreg_key =nft_parse_register (tb[NFTA_DYNSET_SREG_KEY ]);
@@ -227,7 +228,8 @@ static int nft_dynset_dump(struct sk_buff *skb, const struct nft_expr *expr) goto nla_put_failure;if (nla_put_string (skb,NFTA_DYNSET_SET_NAME , priv->set->name)) goto nla_put_failure; -if (nla_put_be64 (skb,NFTA_DYNSET_TIMEOUT ,cpu_to_be64 (priv->timeout))) +if (nla_put_be64 (skb,NFTA_DYNSET_TIMEOUT , +cpu_to_be64 (jiffies_to_msecs (priv->timeout)))) goto nla_put_failure;if (priv->expr &&nft_expr_dump (skb,NFTA_DYNSET_EXPR , priv->expr)) goto nla_put_failure;
scripts/gcc-x86_64-has-stack-protector.sh +1 -1
@@ -1,6 +1,6 @@ #!/bin/sh -echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fstack-protector - -o - 2> /dev/null | grep -q "%gs" +echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs" if [ "$?" -eq "0" ] ; then echo y else