Linux 4.9.58
Greg KH
maintainerI'm announcing the release of the 4.9.58 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/mips/include/asm/irq.h | 2 arch/powerpc/perf/isa207-common.h | 4 arch/powerpc/perf/power9-pmu.c | 2 arch/sparc/include/asm/setup.h | 5 arch/sparc/kernel/smp_64.c | 6 arch/x86/mm/init_64.c | 2 block/bsg-lib.c | 1 crypto/Kconfig | 1 drivers/bluetooth/btmrvl_sdio.c | 8 drivers/cpufreq/Kconfig.arm | 2 drivers/edac/mce_amd.c | 9 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 drivers/i2c/busses/i2c-at91.c | 3 drivers/iio/adc/xilinx-xadc-core.c | 6 drivers/infiniband/hw/hfi1/init.c | 17 - drivers/infiniband/hw/hfi1/pcie.c | 4 drivers/irqchip/irq-crossbar.c | 3 drivers/md/linear.c | 3 drivers/net/ethernet/marvell/mvpp2.c | 9 drivers/net/ethernet/mellanox/mlx4/en_clock.c | 18 - drivers/net/ethernet/mellanox/mlx4/main.c | 2 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 drivers/net/ethernet/qlogic/qed/qed.h | 4 drivers/net/ethernet/qlogic/qed/qed_dev.c | 8 drivers/net/ethernet/qlogic/qed/qed_mcp.c | 3 drivers/net/ethernet/qlogic/qed/qed_roce.c | 12 - drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 6 drivers/net/wireless/mac80211_hwsim.c | 28 ++ drivers/net/xen-netback/hash.c | 2 drivers/regulator/core.c | 10 drivers/scsi/device_handler/scsi_dh_emc.c | 2 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 8 drivers/target/iscsi/iscsi_target_erl0.c | 6 drivers/tty/serial/sunhv.c | 6 drivers/usb/dwc3/gadget.c | 35 +++ drivers/watchdog/kempld_wdt.c | 9 fs/btrfs/send.c | 5 fs/ceph/inode.c | 4 fs/ceph/ioctl.c | 4 fs/ceph/mds_client.c | 9 fs/f2fs/data.c | 7 fs/f2fs/segment.c | 2 fs/nfsd/nfs4callback.c | 8 fs/nfsd/nfs4state.c | 10 fs/nfsd/state.h | 1 fs/ocfs2/dlmglue.c | 105 +++++++++- fs/ocfs2/dlmglue.h | 18 + fs/ocfs2/ocfs2.h | 1 include/uapi/linux/mroute6.h | 1 include/uapi/linux/rds.h | 3 init/initramfs.c | 2 init/main.c | 3 kernel/locking/lockdep.c | 11 - kernel/sched/core.c | 1 kernel/time/hrtimer.c | 20 + mm/memory_hotplug.c | 5 mm/slab_common.c | 5 mm/sparse.c | 2 net/mac80211/sta_info.c | 2 net/netfilter/nf_conntrack_expect.c | 4 sound/pci/hda/patch_hdmi.c | 1 sound/soc/mediatek/Kconfig | 2 64 files changed, 376 insertions(+), 114 deletions(-)
Alexandre Belloni (1):
i2c: at91: ensure state is restored after suspending
Anoob Soman (1):
xen-netback: Use GFP_ATOMIC to allocate hash
Arnd Bergmann (3):
watchdog: kempld: fix gcc-4.3 build
ASoC: mediatek: add I2C dependency for CS42XX8
cpufreq: CPPC: add ACPI_PROCESSOR dependency
Ben Skeggs (1):
drm/nouveau/gr/gf100-: fix ccache error logging
Christophe JAILLET (1):
iio: adc: xilinx: Fix error handling
Dan Carpenter (1):
scsi: scsi_dh_emc: return success in clariion_std_inquiry()
Dmitry V. Levin (2):
uapi: fix linux/rds.h userspace compilation errors
uapi: fix linux/mroute6.h userspace compilation errors
Easwar Hariharan (1):
IB/hfi1: Use static CTLE with Preset 6 for integrated HFIs
Emmanuel Grumbach (1):
mac80211: fix power saving clients handling in iwlwifi
Eric Dumazet (1):
net/mlx4_en: fix overflow in mlx4_en_init_timestamp()
Eric Ren (1):
ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock
Franck Demathieu (1):
irqchip/crossbar: Fix incorrect type of local variables
Greg Kroah-Hartman (2):
Revert "bsg-lib: don't free job in bsg_prepare_job" Linux 4.9.58
Grygorii Maistrenko (1):
slub: do not merge cache if slub_debug contains a never-merge flag
Jaegeuk Kim (1):
f2fs: do not wait for writeback in write_begin
Jarno Rajahalme (1):
netfilter: nf_ct_expect: Change __nf_ct_expect_check() return value.
Javier Martinez Canillas (1):
regulator: core: Resolve supplies before disabling unused regulators
Jeff Layton (3):
ceph: don't update_dentry_lease unless we actually got one
ceph: fix bogus endianness change in ceph_ioctl_set_layout
ceph: clean up unsafe d_parent accesses in build_dentry_path
Jeffy Chen (1):
btmrvl: avoid double-disable_irq() race
Johannes Berg (1):
mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length
Kinglong Mee (1):
nfsd/callback: Cleanup callback cred on shutdown
Lokesh Vutla (1):
initramfs: finish fput() before accessing any binary from initramfs
Madhavan Srinivasan (1):
powerpc/perf: Add restrictions to PMC5 in power9 DD1
Majd Dibbiny (1):
net/mlx4_core: Fix VF overwrite of module param which disables DMFS on new probed PFs
Manu Gautam (1):
usb: dwc3: gadget: Correct ISOC DATA PIDs for short packets
Marc Zyngier (1):
hrtimer: Catch invalid clockids again
Matt Redfearn (1):
MIPS: Fix minimum alignment requirement of IRQ stack
Michael Zoran (1):
staging: vchiq_2835_arm: Make cache-line-size a required DT property
Milan Broz (1):
crypto: xts - Add ECB dependency
Mintz, Yuval (1):
qed: Don't use attention PTT for configuring BW
Nicolai Hähnle (1):
drm/amdgpu: refuse to reserve io mem for split VRAM buffers
Peter Zijlstra (1):
locking/lockdep: Add nest_lock integrity test
Ram Amrani (2):
qed: Reserve doorbell BAR space for present CPUs
qed: Read queue state before releasing buffer
Robbie Ko (1):
Btrfs: send, fix failure to rename top level inode due to name collision
Sebastian Sanchez (1):
IB/hfi1: Allocate context data on memory node
Shaohua Li (1):
md/linear: shutup lockdep warnning
Sudarsana Reddy Kalluru (1):
qede: Prevent index problems in loopback test
Thomas Petazzoni (1):
net: mvpp2: release reference to txq_cpu[] entry after unmapping
Varun Prakash (1):
target/iscsi: Fix unsolicited data seq_end_offset calculation
Vijay Kumar (1):
sparc64: Migrate hvcons irq to panicked cpu
Vinod Koul (1):
ALSA: hda: Add Geminilake HDMI codec ID
Wanpeng Li (1):
sched/fair: Update rq clock before changing a task's CPU affinity
Yasuaki Ishimatsu (1):
mm/memory_hotplug: set magic number to page->freelist instead of page->lru.next
Yazen Ghannam (1):
EDAC, mce_amd: Print IPID and Syndrome on a separate line
Yunlong Song (1):
f2fs: do SSR for data when there is enough free space
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 57 +SUBLEVEL = 58 EXTRAVERSION = NAME = Roaring Lionus
arch/mips/include/asm/irq.h +1 -1
@@ -18,7 +18,7 @@#include <irq.h> #define IRQ_STACK_SIZE THREAD_SIZE -#define IRQ_STACK_START (IRQ_STACK_SIZE - sizeof(unsigned long)) +#define IRQ_STACK_START (IRQ_STACK_SIZE - 16)extern void *irq_stack[NR_CPUS ];
arch/powerpc/perf/isa207-common.h +4 -0
@@ -201,6 +201,10 @@CNST_PMC_VAL (1 ) |CNST_PMC_VAL (2 ) |CNST_PMC_VAL (3 ) | \CNST_PMC_VAL (4 ) |CNST_PMC_VAL (5 ) |CNST_PMC_VAL (6 ) |CNST_NC_VAL +/* +* Lets restrict use of PMC5 for instruction counting. + */ +#define P9_DD1_TEST_ADDER (ISA207_TEST_ADDER | CNST_PMC_VAL(5))/* Bits in MMCR1 for PowerISA v2.07 */ #define MMCR1_UNIT_SHIFT (pmc) (60 - (4 * ((pmc) - 1)))
arch/powerpc/perf/power9-pmu.c +1 -1
@@ -295,7 +295,7 @@ static struct power_pmu power9_pmu = { .name = "POWER9", .n_counter = MAX_PMU_COUNTERS, .add_fields = ISA207_ADD_FIELDS, - .test_adder = ISA207_TEST_ADDER, + .test_adder = P9_DD1_TEST_ADDER, .compute_mmcr = isa207_compute_mmcr, .config_bhrb = power9_config_bhrb, .bhrb_filter_map = power9_bhrb_filter_map,
arch/sparc/include/asm/setup.h +4 -1
@@ -59,8 +59,11 @@ extern atomic_t dcpage_flushes;extern atomic_t dcpage_flushes_xcall;extern int sysctl_tsb_ratio; -#endif +#ifdef CONFIG_SERIAL_SUNHV +void sunhv_migrate_hvcons_irq (int cpu); +#endif +#endif void sun_do_break (void );extern int stop_a_enabled;extern int scons_pwroff;
arch/sparc/kernel/smp_64.c +5 -1
@@ -1465,8 +1465,12 @@ void smp_send_stop(void)int cpu;if (tlb_type == hypervisor) { +int this_cpu =smp_processor_id (); +#ifdef CONFIG_SERIAL_SUNHV +sunhv_migrate_hvcons_irq (this_cpu); +#endif for_each_online_cpu (cpu) { -if (cpu ==smp_processor_id ()) +if (cpu == this_cpu)continue ;#ifdef CONFIG_SUN_LDOMS if (ldom_domaining_enabled) {
arch/x86/mm/init_64.c +1 -1
@@ -689,7 +689,7 @@ static void __meminit free_pagetable(struct page *page, int order)if (PageReserved (page)) {__ClearPageReserved (page); - magic = (unsigned long )page->lru.next; + magic = (unsigned long )page->freelist;if (magic ==SECTION_INFO || magic ==MIX_SECTION_INFO ) {while (nr_pages--)put_page_bootmem (page++);
block/bsg-lib.c +1 -0
@@ -147,6 +147,7 @@ static int bsg_create_job(struct device *dev, struct request *req) failjob_rls_rqst_payload:kfree (job->request_payload.sg_list); failjob_rls_job: +kfree (job);return -ENOMEM ; }
crypto/Kconfig +1 -0
@@ -360,6 +360,7 @@ config CRYPTO_XTS select CRYPTO_BLKCIPHER select CRYPTO_MANAGER select CRYPTO_GF128MUL + select CRYPTO_ECB help XTS: IEEE1619/D16 narrow block cipher use with aes-xts-plain, key size 256, 384 or 512 bits. This implementation currently
drivers/bluetooth/btmrvl_sdio.c +6 -2
@@ -1682,8 +1682,12 @@ static int btmrvl_sdio_resume(struct device *dev)/* Disable platform specific wakeup interrupt */ if (card->plt_wake_cfg && card->plt_wake_cfg->irq_bt >=0 ) {disable_irq_wake (card->plt_wake_cfg->irq_bt); -if (!card->plt_wake_cfg->wake_by_bt) -disable_irq (card->plt_wake_cfg->irq_bt); +disable_irq (card->plt_wake_cfg->irq_bt); +if (card->plt_wake_cfg->wake_by_bt) +/* Undo our disable, since interrupt handler already +* did this. +*/ +enable_irq (card->plt_wake_cfg->irq_bt); }return 0 ;
drivers/cpufreq/Kconfig.arm +1 -1
@@ -244,7 +244,7 @@ config ARM_PXA2xx_CPUFREQ config ACPI_CPPC_CPUFREQ tristate "CPUFreq driver based on the ACPI CPPC spec" - depends on ACPI + depends on ACPI_PROCESSOR select ACPI_CPPC_LIB default n help
drivers/edac/mce_amd.c +4 -5
@@ -981,20 +981,19 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)pr_cont ("]: 0x%016llx\n" , m->status);if (m->status &MCI_STATUS_ADDRV ) -pr_emerg (HW_ERR "Error Addr: 0x%016llx" , m->addr); +pr_emerg (HW_ERR "Error Addr: 0x%016llx\n" , m->addr);if (boot_cpu_has (X86_FEATURE_SMCA )) { +pr_emerg (HW_ERR "IPID: 0x%016llx" , m->ipid); +if (m->status &MCI_STATUS_SYNDV )pr_cont (", Syndrome: 0x%016llx" , m->synd); -pr_cont (", IPID: 0x%016llx" , m->ipid); -pr_cont ("\n" );decode_smca_errors (m); goto err_code; - }else -pr_cont ("\n" ); + }if (!fam_ops) goto err_code;
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +3 -0
@@ -491,6 +491,9 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_case TTM_PL_TT :break ;case TTM_PL_VRAM : +if (mem->start ==AMDGPU_BO_INVALID_OFFSET ) +return -EINVAL ; + mem->bus.offset = mem->start <<PAGE_SHIFT ;/* check if it's visible */ if ((mem->bus.offset + mem->bus.size) > adev->mc.visible_vram_size)
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +1 -1
@@ -1129,7 +1129,7 @@ gf100_gr_trap_intr(struct gf100_gr *gr)if (trap &0x00000008 ) {u32 stat =nvkm_rd32 (device,0x408030 ); -nvkm_snprintbf (error,sizeof (error), gf100_m2mf_error, +nvkm_snprintbf (error,sizeof (error), gf100_ccache_error, stat &0x3fffffff );nvkm_error (subdev,"CCACHE %08x [%s]\n" , stat, error);nvkm_wr32 (device,0x408030 ,0xc0000000 );
drivers/i2c/busses/i2c-at91.c +3 -0
@@ -1180,6 +1180,7 @@ static int at91_twi_suspend_noirq(struct device *dev)static int at91_twi_resume_noirq (struct device *dev) { +struct at91_twi_dev *twi_dev =dev_get_drvdata (dev);int ret;if (!pm_runtime_status_suspended (dev)) {
@@ -1191,6 +1192,8 @@ static int at91_twi_resume_noirq(struct device *dev)pm_runtime_mark_last_busy (dev);pm_request_autosuspend (dev); +at91_init_twi_bus (twi_dev); +return 0 ; }
drivers/iio/adc/xilinx-xadc-core.c +3 -3
@@ -1208,7 +1208,7 @@ static int xadc_probe(struct platform_device *pdev) ret = xadc->ops->setup (pdev, indio_dev, irq);if (ret) - goto err_free_samplerate_trigger; + goto err_clk_disable_unprepare; ret =request_irq (irq, xadc->ops->interrupt_handler,0 ,dev_name (&pdev->dev), indio_dev);
@@ -1268,6 +1268,8 @@ static int xadc_probe(struct platform_device *pdev) err_free_irq:free_irq (irq, indio_dev); +err_clk_disable_unprepare: +clk_disable_unprepare (xadc->clk); err_free_samplerate_trigger:if (xadc->ops->flags &XADC_FLAGS_BUFFERED )iio_trigger_free (xadc->samplerate_trigger);
@@ -1277,8 +1279,6 @@ static int xadc_probe(struct platform_device *pdev) err_triggered_buffer_cleanup:if (xadc->ops->flags &XADC_FLAGS_BUFFERED )iio_triggered_buffer_cleanup (indio_dev); -err_clk_disable_unprepare: -clk_disable_unprepare (xadc->clk); err_device_free:kfree (indio_dev->channels);
drivers/infiniband/hw/hfi1/init.c +9 -8
@@ -297,14 +297,15 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt,* The resulting value will be rounded down to the closest * multiple of dd->rcv_entries.group_size. */ - rcd->egrbufs.buffers =kcalloc (rcd->egrbufs.count, -sizeof (*rcd->egrbufs.buffers), -GFP_KERNEL ); + rcd->egrbufs.buffers =kzalloc_node ( + rcd->egrbufs.count *sizeof (*rcd->egrbufs.buffers), +GFP_KERNEL , numa);if (!rcd->egrbufs.buffers) goto bail; - rcd->egrbufs.rcvtids =kcalloc (rcd->egrbufs.count, -sizeof (*rcd->egrbufs.rcvtids), -GFP_KERNEL ); + rcd->egrbufs.rcvtids =kzalloc_node ( + rcd->egrbufs.count * +sizeof (*rcd->egrbufs.rcvtids), +GFP_KERNEL , numa);if (!rcd->egrbufs.rcvtids) goto bail; rcd->egrbufs.size = eager_buffer_size;
@@ -322,8 +323,8 @@ struct hfi1_ctxtdata *hfi1_create_ctxtdata(struct hfi1_pportdata *ppd, u32 ctxt, rcd->egrbufs.rcvtid_size =HFI1_MAX_EAGER_BUFFER_SIZE ;if (ctxt < dd->first_user_ctxt) {/* N/A for PSM contexts */ - rcd->opstats =kzalloc (sizeof (*rcd->opstats), -GFP_KERNEL ); + rcd->opstats =kzalloc_node (sizeof (*rcd->opstats), +GFP_KERNEL , numa);if (!rcd->opstats) goto bail; }
drivers/infiniband/hw/hfi1/pcie.c +2 -2
@@ -673,12 +673,12 @@ MODULE_PARM_DESC(pcie_retry, "Driver will try this many times to reach requested#define UNSET_PSET 255#define DEFAULT_DISCRETE_PSET 2/* discrete HFI */ -#define DEFAULT_MCP_PSET 4/* MCP HFI */ +#define DEFAULT_MCP_PSET 6/* MCP HFI */ static uint pcie_pset =UNSET_PSET ;module_param (pcie_pset, uint,S_IRUGO );MODULE_PARM_DESC (pcie_pset,"PCIe Eq Pset value to use, range is 0-10" ); -static uint pcie_ctle =1 ;/* discrete on, integrated off */ +static uint pcie_ctle =3 ;/* discrete on, integrated on */ module_param (pcie_ctle, uint,S_IRUGO );MODULE_PARM_DESC (pcie_ctle,"PCIe static CTLE mode, bit 0 - discrete on/off, bit 1 - integrated on/off" );
drivers/irqchip/irq-crossbar.c +2 -1
@@ -198,7 +198,8 @@ static const struct irq_domain_ops crossbar_domain_ops = {static int __init crossbar_of_init (struct device_node *node) { -int i, size, max =0 , reserved =0 , entry; +int i, size, reserved =0 ; +u32 max =0 , entry;const __be32 *irqsr;int ret = -ENOMEM ;
drivers/md/linear.c +2 -1
@@ -223,7 +223,8 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)* oldconf until no one uses it anymore. */ mddev_suspend (mddev); - oldconf =rcu_dereference (mddev->private); + oldconf =rcu_dereference_protected (mddev->private, +lockdep_is_held (&mddev->reconfig_mutex)); mddev->raid_disks++;WARN_ONCE (mddev->raid_disks != newconf->raid_disks,"copied raid_disks doesn't match mddev->raid_disks" );
drivers/net/ethernet/marvell/mvpp2.c +4 -5
@@ -4413,13 +4413,12 @@ static void mvpp2_txq_bufs_free(struct mvpp2_port *port,struct mvpp2_txq_pcpu_buf *tx_buf = txq_pcpu->buffs + txq_pcpu->txq_get_index; -mvpp2_txq_inc_get (txq_pcpu); -dma_unmap_single (port->dev->dev.parent, tx_buf->phys, tx_buf->size,DMA_TO_DEVICE ); -if (!tx_buf->skb) -continue ; -dev_kfree_skb_any (tx_buf->skb); +if (tx_buf->skb) +dev_kfree_skb_any (tx_buf->skb); + +mvpp2_txq_inc_get (txq_pcpu); } }
drivers/net/ethernet/mellanox/mlx4/en_clock.c +8 -10
@@ -88,10 +88,17 @@ void mlx4_en_remove_timestamp(struct mlx4_en_dev *mdev) } } +#define MLX4_EN_WRAP_AROUND_SEC 10UL +/* By scheduling the overflow check every 5 seconds, we have a reasonably +* good chance we wont miss a wrap around. +* TOTO: Use a timer instead of a work queue to increase the guarantee. +*/ +#define MLX4_EN_OVERFLOW_PERIOD (MLX4_EN_WRAP_AROUND_SEC * HZ / 2) +void mlx4_en_ptp_overflow_check (struct mlx4_en_dev *mdev) {bool timeout =time_is_before_jiffies (mdev->last_overflow_check + - mdev->overflow_period); +MLX4_EN_OVERFLOW_PERIOD );unsigned long flags;if (timeout) {
@@ -236,7 +243,6 @@ static const struct ptp_clock_info mlx4_en_ptp_clock_info = { .enable = mlx4_en_phc_enable, }; -#define MLX4_EN_WRAP_AROUND_SEC 10ULL/* This function calculates the max shift that enables the user range * of MLX4_EN_WRAP_AROUND_SEC values in the cycles register.
@@ -261,7 +267,6 @@ void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev) {struct mlx4_dev *dev = mdev->dev;unsigned long flags; -u64 ns, zero =0 ;/* mlx4_en_init_timestamp is called for each netdev. * mdev->ptp_clock is common for all ports, skip initialization if
@@ -285,13 +290,6 @@ void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev) ktime_to_ns(ktime_get_real()));write_unlock_irqrestore (&mdev->clock_lock, flags); -/* Calculate period in seconds to call the overflow watchdog - to make -* sure counter is checked at least once every wrap around. -*/ - ns =cyclecounter_cyc2ns (&mdev->cycles, mdev->cycles.mask, zero, &zero); -do_div (ns,NSEC_PER_SEC /2 /HZ ); - mdev->overflow_period = ns; -/* Configure the PHC */ mdev->ptp_clock_info = mlx4_en_ptp_clock_info;snprintf (mdev->ptp_clock_info.name,16 ,"mlx4 ptp" );
drivers/net/ethernet/mellanox/mlx4/main.c +0 -2
@@ -841,8 +841,6 @@ static int mlx4_slave_cap(struct mlx4_dev *dev)return -ENOSYS ; } - mlx4_log_num_mgm_entry_size = hca_param.log_mc_entry_sz; - dev->caps.hca_core_clock = hca_param.hca_core_clock;memset (&dev_cap,0 ,sizeof (dev_cap));
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h +0 -1
@@ -419,7 +419,6 @@ struct mlx4_en_dev {struct cyclecounter cycles;struct timecounter clock;unsigned long last_overflow_check; -unsigned long overflow_period;struct ptp_clock *ptp_clock;struct ptp_clock_info ptp_clock_info;struct notifier_block nb;
drivers/net/ethernet/qlogic/qed/qed.h +3 -1
@@ -642,7 +642,9 @@ static inline u8 qed_concrete_to_sw_fid(struct qed_dev *cdev,#define OOO_LB_TC 9int qed_configure_vport_wfq (struct qed_dev *cdev,u16 vp_id,u32 rate); -void qed_configure_vp_wfq_on_link_change (struct qed_dev *cdev,u32 min_pf_rate); +void qed_configure_vp_wfq_on_link_change (struct qed_dev *cdev, +struct qed_ptt *p_ptt, +u32 min_pf_rate);void qed_clean_wfq_db (struct qed_hwfn *p_hwfn,struct qed_ptt *p_ptt);#define QED_LEADING_HWFN (dev) (&dev->hwfns[0])
drivers/net/ethernet/qlogic/qed/qed_dev.c +4 -4
@@ -877,7 +877,7 @@ qed_hw_init_pf_doorbell_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)/* Either EDPM is mandatory, or we are attempting to allocate a * WID per CPU. */ - n_cpus =num_active_cpus (); + n_cpus =num_present_cpus (); rc =qed_hw_init_dpi_size (p_hwfn, p_ptt, pwm_regsize, n_cpus); }
@@ -2732,7 +2732,8 @@ int qed_configure_vport_wfq(struct qed_dev *cdev, u16 vp_id, u32 rate) }/* API to configure WFQ from mcp link change */ -void qed_configure_vp_wfq_on_link_change (struct qed_dev *cdev,u32 min_pf_rate) +void qed_configure_vp_wfq_on_link_change (struct qed_dev *cdev, +struct qed_ptt *p_ptt,u32 min_pf_rate) {int i;
@@ -2746,8 +2747,7 @@ void qed_configure_vp_wfq_on_link_change(struct qed_dev *cdev, u32 min_pf_rate)for_each_hwfn (cdev, i) {struct qed_hwfn *p_hwfn = &cdev->hwfns[i]; -__qed_configure_vp_wfq_on_link_change (p_hwfn, - p_hwfn->p_dpc_ptt, +__qed_configure_vp_wfq_on_link_change (p_hwfn, p_ptt, min_pf_rate); } }
drivers/net/ethernet/qlogic/qed/qed_mcp.c +2 -1
@@ -628,7 +628,8 @@ static void qed_mcp_handle_link_change(struct qed_hwfn *p_hwfn,/* Min bandwidth configuration */ __qed_configure_pf_min_bandwidth (p_hwfn, p_ptt, p_link, min_bw); -qed_configure_vp_wfq_on_link_change (p_hwfn->cdev, p_link->min_pf_rate); +qed_configure_vp_wfq_on_link_change (p_hwfn->cdev, p_ptt, + p_link->min_pf_rate); p_link->an = !!(status &LINK_STATUS_AUTO_NEGOTIATE_ENABLED ); p_link->an_complete = !!(status &
drivers/net/ethernet/qlogic/qed/qed_roce.c +6 -6
@@ -1766,13 +1766,13 @@ static int qed_roce_query_qp(struct qed_hwfn *p_hwfn,if (rc) goto err_resp; -dma_free_coherent (&p_hwfn->cdev->pdev->dev,sizeof (*p_resp_ramrod_res), - p_resp_ramrod_res, resp_ramrod_res_phys); - out_params->rq_psn =le32_to_cpu (p_resp_ramrod_res->psn); rq_err_state =GET_FIELD (le32_to_cpu (p_resp_ramrod_res->err_flag),ROCE_QUERY_QP_RESP_OUTPUT_PARAMS_ERROR_FLG ); +dma_free_coherent (&p_hwfn->cdev->pdev->dev,sizeof (*p_resp_ramrod_res), + p_resp_ramrod_res, resp_ramrod_res_phys); +if (!(qp->req_offloaded)) {/* Don't send query qp for the requester */ out_params->sq_psn = qp->sq_psn;
@@ -1813,9 +1813,6 @@ static int qed_roce_query_qp(struct qed_hwfn *p_hwfn,if (rc) goto err_req; -dma_free_coherent (&p_hwfn->cdev->pdev->dev,sizeof (*p_req_ramrod_res), - p_req_ramrod_res, req_ramrod_res_phys); - out_params->sq_psn =le32_to_cpu (p_req_ramrod_res->psn); sq_err_state =GET_FIELD (le32_to_cpu (p_req_ramrod_res->flags),ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_ERR_FLG );
@@ -1823,6 +1820,9 @@ static int qed_roce_query_qp(struct qed_hwfn *p_hwfn,GET_FIELD (le32_to_cpu (p_req_ramrod_res->flags),ROCE_QUERY_QP_REQ_OUTPUT_PARAMS_SQ_DRAINING_FLG ); +dma_free_coherent (&p_hwfn->cdev->pdev->dev,sizeof (*p_req_ramrod_res), + p_req_ramrod_res, req_ramrod_res_phys); + out_params->draining = false;if (rq_err_state)
drivers/net/ethernet/qlogic/qede/qede_ethtool.c +3 -3
@@ -1221,7 +1221,7 @@ static int qede_selftest_receive_traffic(struct qede_dev *edev)struct qede_rx_queue *rxq =NULL ;struct sw_rx_data *sw_rx_data;union eth_rx_cqe *cqe; -int i, rc =0 ; +int i, iter, rc =0 ;u8 *data_ptr;for_each_queue (i) {
@@ -1240,7 +1240,7 @@ static int qede_selftest_receive_traffic(struct qede_dev *edev)* enabled. This is because the queue 0 is configured as the default * queue and that the loopback traffic is not IP. */ -for (i =0 ; i <QEDE_SELFTEST_POLL_COUNT ; i++) { +for (iter =0 ; iter <QEDE_SELFTEST_POLL_COUNT ; iter++) {if (!qede_has_rx_work (rxq)) {usleep_range (100 ,200 );continue ;
@@ -1287,7 +1287,7 @@ static int qede_selftest_receive_traffic(struct qede_dev *edev)qed_chain_recycle_consumed (&rxq->rx_comp_ring); } -if (i ==QEDE_SELFTEST_POLL_COUNT ) { +if (iter ==QEDE_SELFTEST_POLL_COUNT ) {DP_NOTICE (edev,"Failed to receive the traffic\n" );return -1 ; }
drivers/net/wireless/mac80211_hwsim.c +21 -7
@@ -3046,6 +3046,7 @@ static int hwsim_register_received_nl(struct sk_buff *skb_2,static int hwsim_new_radio_nl (struct sk_buff *msg,struct genl_info *info) {struct hwsim_new_radio_params param = {0 }; +const char *hwname =NULL ; param.reg_strict = info->attrs[HWSIM_ATTR_REG_STRICT_REG ]; param.p2p_device = info->attrs[HWSIM_ATTR_SUPPORT_P2P_DEVICE ];
@@ -3059,8 +3060,14 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)if (info->attrs[HWSIM_ATTR_NO_VIF ]) param.no_vif = true; -if (info->attrs[HWSIM_ATTR_RADIO_NAME ]) - param.hwname =nla_data (info->attrs[HWSIM_ATTR_RADIO_NAME ]); +if (info->attrs[HWSIM_ATTR_RADIO_NAME ]) { + hwname =kasprintf (GFP_KERNEL ,"%.*s" , +nla_len (info->attrs[HWSIM_ATTR_RADIO_NAME ]), + (char *)nla_data (info->attrs[HWSIM_ATTR_RADIO_NAME ])); +if (!hwname) +return -ENOMEM ; + param.hwname = hwname; + }if (info->attrs[HWSIM_ATTR_USE_CHANCTX ]) param.use_chanctx = true;
@@ -3088,11 +3095,15 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)s64 idx =-1 ;const char *hwname =NULL ; -if (info->attrs[HWSIM_ATTR_RADIO_ID ]) +if (info->attrs[HWSIM_ATTR_RADIO_ID ]) { idx =nla_get_u32 (info->attrs[HWSIM_ATTR_RADIO_ID ]); -else if (info->attrs[HWSIM_ATTR_RADIO_NAME ]) - hwname = (void *)nla_data (info->attrs[HWSIM_ATTR_RADIO_NAME ]); -else + }else if (info->attrs[HWSIM_ATTR_RADIO_NAME ]) { + hwname =kasprintf (GFP_KERNEL ,"%.*s" , +nla_len (info->attrs[HWSIM_ATTR_RADIO_NAME ]), + (char *)nla_data (info->attrs[HWSIM_ATTR_RADIO_NAME ])); +if (!hwname) +return -ENOMEM ; + }else return -EINVAL ;spin_lock_bh (&hwsim_radio_lock);
@@ -3101,7 +3112,8 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)if (data->idx != idx)continue ; }else { -if (strcmp (hwname,wiphy_name (data->hw->wiphy))) +if (!hwname || +strcmp (hwname,wiphy_name (data->hw->wiphy)))continue ; }
@@ -3112,10 +3124,12 @@ static int hwsim_del_radio_nl(struct sk_buff *msg, struct genl_info *info)spin_unlock_bh (&hwsim_radio_lock);mac80211_hwsim_del_radio (data,wiphy_name (data->hw->wiphy), info); +kfree (hwname);return 0 ; }spin_unlock_bh (&hwsim_radio_lock); +kfree (hwname);return -ENODEV ; }
drivers/net/xen-netback/hash.c +1 -1
@@ -39,7 +39,7 @@ static void xenvif_add_hash(struct xenvif *vif, const u8 *tag,unsigned long flags;bool found; - new =kmalloc (sizeof (*entry),GFP_KERNEL ); + new =kmalloc (sizeof (*entry),GFP_ATOMIC );if (!new)return ;
drivers/regulator/core.c +10 -0
@@ -4507,6 +4507,16 @@ static int __init regulator_init_complete(void)if (of_have_populated_dt ()) has_full_constraints = true; +/* +* Regulators may had failed to resolve their input supplies +* when were registered, either because the input supply was +* not registered yet or because its parent device was not +* bound yet. So attempt to resolve the input supplies for +* pending regulators before trying to disable unused ones. +*/ +class_for_each_device (®ulator_class,NULL ,NULL , + regulator_register_resolve_supply); +/* If we have a full configuration then disable any regulators * we have permission to change the status for and which are * not in use or always_on. This is effectively the default
drivers/scsi/device_handler/scsi_dh_emc.c +1 -1
@@ -461,7 +461,7 @@ static int clariion_prep_fn(struct scsi_device *sdev, struct request *req)static int clariion_std_inquiry (struct scsi_device *sdev,struct clariion_dh_data *csdev) { -int err; +int err =SCSI_DH_OK ;char *sp_model; err =send_inquiry_cmd (sdev,0 , csdev);
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +7 -1
@@ -106,8 +106,14 @@ int vchiq_platform_init(struct platform_device *pdev, VCHIQ_STATE_T *state) g_virt_to_bus_offset =virt_to_dma (dev, (void *)0 ); - (void )of_property_read_u32 (dev->of_node,"cache-line-size" , + err =of_property_read_u32 (dev->of_node,"cache-line-size" , &g_cache_line_size); + +if (err) { +dev_err (dev,"Missing cache-line-size property\n" ); +return -ENODEV ; + } + g_fragments_size =2 * g_cache_line_size;/* Allocate space for the channels in coherent memory */
drivers/target/iscsi/iscsi_target_erl0.c +2 -4
@@ -44,10 +44,8 @@ void iscsit_set_dataout_sequence_values(*/ if (cmd->unsolicited_data) { cmd->seq_start_offset = cmd->write_data_done; - cmd->seq_end_offset = (cmd->write_data_done + - ((cmd->se_cmd.data_length > - conn->sess->sess_ops->FirstBurstLength) ? - conn->sess->sess_ops->FirstBurstLength : cmd->se_cmd.data_length)); + cmd->seq_end_offset =min (cmd->se_cmd.data_length, + conn->sess->sess_ops->FirstBurstLength);return ; }
drivers/tty/serial/sunhv.c +6 -0
@@ -398,6 +398,12 @@ static struct uart_driver sunhv_reg = {static struct uart_port *sunhv_port; +void sunhv_migrate_hvcons_irq (int cpu) +{ +/* Migrate hvcons irq to param cpu */ +irq_force_affinity (sunhv_port->irq,cpumask_of (cpu)); +} +/* Copy 's' into the con_write_page, decoding "\n" into * "\r\n" along the way. We have to return two lengths * because the caller needs to know how much to advance
drivers/usb/dwc3/gadget.c +34 -1
@@ -817,9 +817,42 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,if (!node) { trb->ctrl =DWC3_TRBCTL_ISOCHRONOUS_FIRST ; +/* +* USB Specification 2.0 Section 5.9.2 states that: "If +* there is only a single transaction in the microframe, +* only a DATA0 data packet PID is used. If there are +* two transactions per microframe, DATA1 is used for +* the first transaction data packet and DATA0 is used +* for the second transaction data packet. If there are +* three transactions per microframe, DATA2 is used for +* the first transaction data packet, DATA1 is used for +* the second, and DATA0 is used for the third." +* +* IOW, we should satisfy the following cases: +* +* 1) length <= maxpacket +* - DATA0 +* +* 2) maxpacket < length <= (2 * maxpacket) +* - DATA1, DATA0 +* +* 3) (2 * maxpacket) < length <= (3 * maxpacket) +* - DATA2, DATA1, DATA0 +*/ if (speed ==USB_SPEED_HIGH ) {struct usb_ep *ep = &dep->endpoint; - trb->size |=DWC3_TRB_SIZE_PCM1 (ep->mult -1 ); +unsigned int mult = ep->mult -1 ; +unsigned int maxp; + + maxp =usb_endpoint_maxp (ep->desc) &0x07ff ; + +if (length <= (2 * maxp)) + mult--; + +if (length <= maxp) + mult--; + + trb->size |=DWC3_TRB_SIZE_PCM1 (mult); } }else { trb->ctrl =DWC3_TRBCTL_ISOCHRONOUS ;
drivers/watchdog/kempld_wdt.c +8 -1
@@ -140,12 +140,19 @@ static int kempld_wdt_set_stage_timeout(struct kempld_wdt_data *wdt_data, unsigned int timeout) {struct kempld_device_data *pld = wdt_data->pld; -u32 prescaler = kempld_prescaler[PRESCALER_21 ]; +u32 prescaler;u64 stage_timeout64;u32 stage_timeout;u32 remainder;u8 stage_cfg; +#if GCC_VERSION <40400 +/* work around a bug compiling do_div() */ + prescaler =READ_ONCE (kempld_prescaler[PRESCALER_21 ]); +#else + prescaler = kempld_prescaler[PRESCALER_21 ]; +#endif +if (!stage)return -EINVAL ;
fs/btrfs/send.c +4 -1
@@ -1680,6 +1680,9 @@ static int is_inode_existent(struct send_ctx *sctx, u64 ino, u64 gen) {int ret; +if (ino ==BTRFS_FIRST_FREE_OBJECTID ) +return 1 ; + ret =get_cur_inode_state (sctx, ino, gen);if (ret <0 ) goto out;
@@ -1865,7 +1868,7 @@ static int will_overwrite_ref(struct send_ctx *sctx, u64 dir, u64 dir_gen,* not deleted and then re-created, if it was then we have no overwrite * and we can just unlink this entry. */ -if (sctx->parent_root) { +if (sctx->parent_root && dir !=BTRFS_FIRST_FREE_OBJECTID ) { ret =get_inode_info (sctx->parent_root, dir,NULL , &gen,NULL ,NULL ,NULL ,NULL );if (ret <0 && ret != -ENOENT )
fs/ceph/inode.c +2 -2
@@ -1323,8 +1323,8 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req,ceph_dir_clear_ordered (dir);dout ("d_delete %p\n" , dn);d_delete (dn); - }else { -if (have_lease &&d_unhashed (dn)) + }else if (have_lease) { +if (d_unhashed (dn))d_add (dn,NULL ); update_dentry_lease(dn, rinfo->dlease, session,
fs/ceph/ioctl.c +2 -2
@@ -25,7 +25,7 @@ static long ceph_ioctl_get_layout(struct file *file, void __user *arg) l.stripe_count = ci->i_layout.stripe_count; l.object_size = ci->i_layout.object_size; l.data_pool = ci->i_layout.pool_id; - l.preferred_osd = (s32)-1 ; + l.preferred_osd =-1 ;if (copy_to_user (arg, &l,sizeof (l)))return -EFAULT ; }
@@ -97,7 +97,7 @@ static long ceph_ioctl_set_layout(struct file *file, void __user *arg) nl.data_pool = ci->i_layout.pool_id;/* this is obsolete, and always -1 */ - nl.preferred_osd =le64_to_cpu (-1 ); + nl.preferred_osd =-1 ; err =__validate_layout (mdsc, &nl);if (err)
fs/ceph/mds_client.c +7 -2
@@ -1782,13 +1782,18 @@ static int build_dentry_path(struct dentry *dentry, int *pfreepath) {char *path; +struct inode *dir; -if (ceph_snap (d_inode (dentry->d_parent)) ==CEPH_NOSNAP ) { - *pino =ceph_ino (d_inode (dentry->d_parent)); +rcu_read_lock (); + dir =d_inode_rcu (dentry->d_parent); +if (dir &&ceph_snap (dir) ==CEPH_NOSNAP ) { + *pino =ceph_ino (dir); +rcu_read_unlock (); *ppath = dentry->d_name.name; *ppathlen = dentry->d_name.len;return 0 ; } +rcu_read_unlock (); path =ceph_mdsc_build_path (dentry, ppathlen, pino,1 );if (IS_ERR (path))return PTR_ERR (path);
fs/f2fs/data.c +6 -1
@@ -1619,7 +1619,12 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping, goto fail; } repeat: - page =grab_cache_page_write_begin (mapping, index, flags); +/* +* Do not use grab_cache_page_write_begin() to avoid deadlock due to +* wait_for_stable_page. Will wait that below with our IO control. +*/ + page =pagecache_get_page (mapping, index, +FGP_LOCK |FGP_WRITE |FGP_CREAT ,GFP_NOFS );if (!page) { err = -ENOMEM ; goto fail;
fs/f2fs/segment.c +1 -1
@@ -1263,7 +1263,7 @@ static int get_ssr_segment(struct f2fs_sb_info *sbi, int type)struct curseg_info *curseg =CURSEG_I (sbi, type);const struct victim_selection *v_ops =DIRTY_I (sbi)->v_ops; -if (IS_NODESEG (type) || !has_not_enough_free_secs (sbi,0 ,0 )) +if (IS_NODESEG (type))return v_ops->get_victim (sbi, &(curseg)->next_segno,BG_GC , type,SSR );
fs/nfsd/nfs4callback.c +8 -0
@@ -753,6 +753,14 @@ int set_callback_cred(void)return 0 ; } +void cleanup_callback_cred (void ) +{ +if (callback_cred) { +put_rpccred (callback_cred); + callback_cred =NULL ; + } +} +static struct rpc_cred *get_backchannel_cred (struct nfs4_client *clp,struct rpc_clnt *client,struct nfsd4_session *ses) {if (clp->cl_minorversion ==0 ) {
fs/nfsd/nfs4state.c +6 -4
@@ -7012,23 +7012,24 @@ nfs4_state_start(void) ret =set_callback_cred ();if (ret) -return -ENOMEM ; +return ret; + laundry_wq =alloc_workqueue ("%s" ,WQ_UNBOUND ,0 ,"nfsd4" );if (laundry_wq ==NULL ) { ret = -ENOMEM ; - goto out_recovery; + goto out_cleanup_cred; } ret =nfsd4_create_callback_queue ();if (ret) goto out_free_laundry;set_max_delegations (); -return 0 ; out_free_laundry:destroy_workqueue (laundry_wq); -out_recovery: +out_cleanup_cred: +cleanup_callback_cred ();return ret; }
@@ -7086,6 +7087,7 @@ nfs4_state_shutdown(void) {destroy_workqueue (laundry_wq);nfsd4_destroy_callback_queue (); +cleanup_callback_cred (); } static void
fs/nfsd/state.h +1 -0
@@ -615,6 +615,7 @@ extern struct nfs4_client_reclaim *nfsd4_find_reclaim_client(const char *recdir,extern __be32 nfs4_check_open_reclaim (clientid_t *clid,struct nfsd4_compound_state *cstate,struct nfsd_net *nn);extern int set_callback_cred (void ); +extern void cleanup_callback_cred (void );extern void nfsd4_probe_callback (struct nfs4_client *clp);extern void nfsd4_probe_callback_sync (struct nfs4_client *clp);extern void nfsd4_change_callback (struct nfs4_client *clp,struct nfs4_cb_conn *);
fs/ocfs2/dlmglue.c +102 -3
135 lines not on this page · raw message
fs/ocfs2/dlmglue.h +18 -0
@@ -70,6 +70,11 @@ struct ocfs2_orphan_scan_lvb {__be32 lvb_os_seqno; }; +struct ocfs2_lock_holder { +struct list_head oh_list; +struct pid *oh_owner_pid; +}; +/* ocfs2_inode_lock_full() 'arg_flags' flags */ /* don't wait on recovery. */ #define OCFS2_META_LOCK_RECOVERY (0x01)
@@ -77,6 +82,8 @@ struct ocfs2_orphan_scan_lvb {#define OCFS2_META_LOCK_NOQUEUE (0x02)/* don't block waiting for the downconvert thread, instead return -EAGAIN */ #define OCFS2_LOCK_NONBLOCK (0x04) +/* just get back disk inode bh if we've got cluster lock. */ +#define OCFS2_META_LOCK_GETBH (0x08)/* Locking subclasses of inode cluster lock */ enum {
@@ -170,4 +177,15 @@ void ocfs2_put_dlm_debug(struct ocfs2_dlm_debug *dlm_debug);/* To set the locking protocol on module initialization */ void ocfs2_set_locking_protocol (void ); + +/* The _tracker pair is used to avoid cluster recursive locking */ +int ocfs2_inode_lock_tracker (struct inode *inode, +struct buffer_head **ret_bh, +int ex, +struct ocfs2_lock_holder *oh); +void ocfs2_inode_unlock_tracker (struct inode *inode, +int ex, +struct ocfs2_lock_holder *oh, +int had_lock); +#endif /* DLMGLUE_H */
fs/ocfs2/ocfs2.h +1 -0
@@ -172,6 +172,7 @@ struct ocfs2_lock_res {struct list_head l_blocked_list;struct list_head l_mask_waiters; +struct list_head l_holders;unsigned long l_flags;char l_name[OCFS2_LOCK_ID_MAX_LEN ];
include/uapi/linux/mroute6.h +1 -0
@@ -4,6 +4,7 @@#include <linux/kernel.h> #include <linux/types.h> #include <linux/sockios.h> +#include <linux/in6.h> /* For struct sockaddr_in6. */ /* * Based on the MROUTING 3.5 defines primarily to keep
include/uapi/linux/rds.h +2 -1
@@ -35,6 +35,7 @@#define _LINUX_RDS_H#include <linux/types.h> +#include <linux/socket.h> /* For __kernel_sockaddr_storage. */ #define RDS_IB_ABI_VERSION 0x301
@@ -223,7 +224,7 @@ struct rds_get_mr_args { };struct rds_get_mr_for_dest_args { -struct sockaddr_storage dest_addr; +struct __kernel_sockaddr_storage dest_addr;struct rds_iovec vec;uint64_t cookie_addr;uint64_t flags;
init/initramfs.c +2 -0
@@ -18,6 +18,7 @@#include <linux/dirent.h> #include <linux/syscalls.h> #include <linux/utime.h> +#include <linux/file.h> static ssize_t __init xwrite (int fd,const char *p,size_t count) {
@@ -647,6 +648,7 @@ static int __init populate_rootfs(void)printk (KERN_EMERG "Initramfs unpacking failed: %s\n" , err);free_initrd ();#endif +flush_delayed_fput ();/* * Try loading default modules from initramfs. This gives * us a chance to load before device_initcalls.
init/main.c +0 -3
@@ -70,7 +70,6 @@#include <linux/shmem_fs.h> #include <linux/slab.h> #include <linux/perf_event.h> -#include <linux/file.h> #include <linux/ptrace.h> #include <linux/blkdev.h> #include <linux/elevator.h>
@@ -947,8 +946,6 @@ static int __ref kernel_init(void *unused) system_state =SYSTEM_RUNNING ;numa_default_policy (); -flush_delayed_fput (); -rcu_end_inkernel_boot ();if (ramdisk_execute_command) {
kernel/locking/lockdep.c +9 -2
@@ -3260,10 +3260,17 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,if (depth) { hlock = curr->held_locks + depth -1 ;if (hlock->class_idx == class_idx && nest_lock) { -if (hlock->references) +if (hlock->references) { +/* +* Check: unsigned int references:12, overflow. +*/ +if (DEBUG_LOCKS_WARN_ON (hlock->references == (1 <<12 )-1 )) +return 0 ; + hlock->references++; -else + }else { hlock->references =2 ; + }return 1 ; }
kernel/sched/core.c +1 -0
@@ -1141,6 +1141,7 @@ static int __set_cpus_allowed_ptr(struct task_struct *p,int ret =0 ; rq =task_rq_lock (p, &rf); +update_rq_clock (rq);if (p->flags &PF_KTHREAD ) {/*
kernel/time/hrtimer.c +15 -5
@@ -94,17 +94,15 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) = };static const int hrtimer_clock_to_base_table[MAX_CLOCKS ] = { +/* Make sure we catch unsupported clockids */ + [0 ...MAX_CLOCKS -1 ] =HRTIMER_MAX_CLOCK_BASES , + [CLOCK_REALTIME ] =HRTIMER_BASE_REALTIME , [CLOCK_MONOTONIC ] =HRTIMER_BASE_MONOTONIC , [CLOCK_BOOTTIME ] =HRTIMER_BASE_BOOTTIME , [CLOCK_TAI ] =HRTIMER_BASE_TAI , }; -static inline int hrtimer_clockid_to_base (clockid_t clock_id) -{ -return hrtimer_clock_to_base_table[clock_id]; -} -/* * Functions and macros which are different for UP/SMP systems are kept in a * single place
@@ -1112,6 +1110,18 @@ u64 hrtimer_get_next_event(void) }#endif +static inline int hrtimer_clockid_to_base (clockid_t clock_id) +{ +if (likely (clock_id <MAX_CLOCKS )) { +int base = hrtimer_clock_to_base_table[clock_id]; + +if (likely (base !=HRTIMER_MAX_CLOCK_BASES )) +return base; + } +WARN (1 ,"Invalid clockid %d. Using MONOTONIC\n" , clock_id); +return HRTIMER_BASE_MONOTONIC ; +} +static void __hrtimer_init (struct hrtimer *timer,clockid_t clock_id,enum hrtimer_mode mode) {
mm/memory_hotplug.c +3 -2
@@ -179,7 +179,7 @@ static void release_memory_resource(struct resource *res)void get_page_bootmem (unsigned long info,struct page *page,unsigned long type) { - page->lru.next = (struct list_head *) type; + page->freelist = (void *)type;SetPagePrivate (page);set_page_private (page, info);page_ref_inc (page);
@@ -189,11 +189,12 @@ void put_page_bootmem(struct page *page) {unsigned long type; - type = (unsigned long ) page->lru.next; + type = (unsigned long ) page->freelist;BUG_ON (type <MEMORY_HOTPLUG_MIN_BOOTMEM_TYPE || type >MEMORY_HOTPLUG_MAX_BOOTMEM_TYPE );if (page_ref_dec_return (page) ==1 ) { + page->freelist =NULL ;ClearPagePrivate (page);set_page_private (page,0 );INIT_LIST_HEAD (&page->lru);
mm/slab_common.c +4 -1
@@ -255,7 +255,7 @@ struct kmem_cache *find_mergeable(size_t size, size_t align, {struct kmem_cache *s; -if (slab_nomerge || (flags &SLAB_NEVER_MERGE )) +if (slab_nomerge)return NULL ;if (ctor)
@@ -266,6 +266,9 @@ struct kmem_cache *find_mergeable(size_t size, size_t align, size =ALIGN (size, align); flags =kmem_cache_flags (size, flags, name,NULL ); +if (flags &SLAB_NEVER_MERGE ) +return NULL ; +list_for_each_entry_reverse (s, &slab_caches, list) {if (slab_unmergeable (s))continue ;
mm/sparse.c +1 -1
@@ -662,7 +662,7 @@ static void free_map_bootmem(struct page *memmap) >> PAGE_SHIFT;for (i =0 ; i < nr_pages; i++, page++) { - magic = (unsigned long ) page->lru.next; + magic = (unsigned long ) page->freelist;BUG_ON (magic ==NODE_INFO );
net/mac80211/sta_info.c +1 -1
@@ -688,7 +688,7 @@ static void __sta_info_recalc_tim(struct sta_info *sta, bool ignore_pending) }/* No need to do anything if the driver does all */ -if (ieee80211_hw_check (&local->hw,AP_LINK_PS )) +if (ieee80211_hw_check (&local->hw,AP_LINK_PS ) && !local->ops->set_tim)return ;if (sta->dead)
net/netfilter/nf_conntrack_expect.c +2 -2
@@ -411,7 +411,7 @@ static inline int __nf_ct_expect_check(struct nf_conntrack_expect *expect)struct net *net =nf_ct_exp_net (expect);struct hlist_node *next;unsigned int h; -int ret =1 ; +int ret =0 ;if (!master_help) { ret = -ESHUTDOWN ;
@@ -461,7 +461,7 @@ int nf_ct_expect_related_report(struct nf_conntrack_expect *expect,spin_lock_bh (&nf_conntrack_expect_lock); ret =__nf_ct_expect_check (expect); -if (ret <=0 ) +if (ret <0 ) goto out; ret =nf_ct_expect_insert (expect);
sound/pci/hda/patch_hdmi.c +1 -0
@@ -3685,6 +3685,7 @@ HDA_CODEC_ENTRY(0x80862808, "Broadwell HDMI", patch_i915_hsw_hdmi),HDA_CODEC_ENTRY (0x80862809 ,"Skylake HDMI" , patch_i915_hsw_hdmi),HDA_CODEC_ENTRY (0x8086280a ,"Broxton HDMI" , patch_i915_hsw_hdmi),HDA_CODEC_ENTRY (0x8086280b ,"Kabylake HDMI" , patch_i915_hsw_hdmi), +HDA_CODEC_ENTRY (0x8086280d ,"Geminilake HDMI" , patch_i915_hsw_hdmi),HDA_CODEC_ENTRY (0x80862880 ,"CedarTrail HDMI" , patch_generic_hdmi),HDA_CODEC_ENTRY (0x80862882 ,"Valleyview2 HDMI" , patch_i915_byt_hdmi), HDA_CODEC_ENTRY(0x80862883, "Braswell HDMI", patch_i915_byt_hdmi),
sound/soc/mediatek/Kconfig +1 -1
@@ -13,7 +13,7 @@ config SND_SOC_MT2701 config SND_SOC_MT2701_CS42448 tristate "ASoc Audio driver for MT2701 with CS42448 codec" - depends on SND_SOC_MT2701 + depends on SND_SOC_MT2701 && I2C select SND_SOC_CS42XX8_I2C select SND_SOC_BT_SCO help