Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

+200 -88
+6
Documentation/kernel-parameters.txt
··· 1481 1481 By default, super page will be supported if Intel IOMMU 1482 1482 has the capability. With this option, super page will 1483 1483 not be supported. 1484 + ecs_off [Default Off] 1485 + By default, extended context tables will be supported if 1486 + the hardware advertises that it has support both for the 1487 + extended tables themselves, and also PASID support. With 1488 + this option set, extended tables will not be used even 1489 + on hardware which claims to support them. 1484 1490 1485 1491 intel_idle.max_cstate= [KNL,HW,ACPI,X86] 1486 1492 0 disables intel_idle and fall back on acpi_idle.
+1 -1
Documentation/networking/udplite.txt
··· 20 20 files/UDP-Lite-HOWTO.txt 21 21 22 22 o The Wireshark UDP-Lite WiKi (with capture files): 23 - http://wiki.wireshark.org/Lightweight_User_Datagram_Protocol 23 + https://wiki.wireshark.org/Lightweight_User_Datagram_Protocol 24 24 25 25 o The Protocol Spec, RFC 3828, http://www.ietf.org/rfc/rfc3828.txt 26 26
+1
arch/blackfin/include/asm/io.h
··· 10 10 #include <linux/compiler.h> 11 11 #include <linux/types.h> 12 12 #include <asm/byteorder.h> 13 + #include <asm/def_LPBlackfin.h> 13 14 14 15 #define __raw_readb bfin_read8 15 16 #define __raw_readw bfin_read16
+1 -1
arch/score/lib/string.S
··· 175 175 br r3 176 176 177 177 .section .fixup, "ax" 178 + 99: 178 179 br r3 179 180 .previous 180 181 .section __ex_table, "a" 181 182 .align 2 182 - 99: 183 183 .word 0b, 99b 184 184 .previous
+7 -7
arch/x86/kvm/mmu.c
··· 4215 4215 u64 entry, gentry, *spte; 4216 4216 int npte; 4217 4217 bool remote_flush, local_flush, zap_page; 4218 - union kvm_mmu_page_role mask = (union kvm_mmu_page_role) { 4219 - .cr0_wp = 1, 4220 - .cr4_pae = 1, 4221 - .nxe = 1, 4222 - .smep_andnot_wp = 1, 4223 - .smap_andnot_wp = 1, 4224 - }; 4218 + union kvm_mmu_page_role mask = { }; 4219 + 4220 + mask.cr0_wp = 1; 4221 + mask.cr4_pae = 1; 4222 + mask.nxe = 1; 4223 + mask.smep_andnot_wp = 1; 4224 + mask.smap_andnot_wp = 1; 4225 4225 4226 4226 /* 4227 4227 * If we don't have indirect shadow pages, it means no page is
+6 -2
block/blk-mq.c
··· 1600 1600 return NOTIFY_OK; 1601 1601 } 1602 1602 1603 + /* hctx->ctxs will be freed in queue's release handler */ 1603 1604 static void blk_mq_exit_hctx(struct request_queue *q, 1604 1605 struct blk_mq_tag_set *set, 1605 1606 struct blk_mq_hw_ctx *hctx, unsigned int hctx_idx) ··· 1619 1618 1620 1619 blk_mq_unregister_cpu_notifier(&hctx->cpu_notifier); 1621 1620 blk_free_flush_queue(hctx->fq); 1622 - kfree(hctx->ctxs); 1623 1621 blk_mq_free_bitmap(&hctx->ctx_map); 1624 1622 } 1625 1623 ··· 1891 1891 unsigned int i; 1892 1892 1893 1893 /* hctx kobj stays in hctx */ 1894 - queue_for_each_hw_ctx(q, hctx, i) 1894 + queue_for_each_hw_ctx(q, hctx, i) { 1895 + if (!hctx) 1896 + continue; 1897 + kfree(hctx->ctxs); 1895 1898 kfree(hctx); 1899 + } 1896 1900 1897 1901 kfree(q->queue_hw_ctx); 1898 1902
+6 -6
block/genhd.c
··· 422 422 /* allocate ext devt */ 423 423 idr_preload(GFP_KERNEL); 424 424 425 - spin_lock(&ext_devt_lock); 425 + spin_lock_bh(&ext_devt_lock); 426 426 idx = idr_alloc(&ext_devt_idr, part, 0, NR_EXT_DEVT, GFP_NOWAIT); 427 - spin_unlock(&ext_devt_lock); 427 + spin_unlock_bh(&ext_devt_lock); 428 428 429 429 idr_preload_end(); 430 430 if (idx < 0) ··· 449 449 return; 450 450 451 451 if (MAJOR(devt) == BLOCK_EXT_MAJOR) { 452 - spin_lock(&ext_devt_lock); 452 + spin_lock_bh(&ext_devt_lock); 453 453 idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt))); 454 - spin_unlock(&ext_devt_lock); 454 + spin_unlock_bh(&ext_devt_lock); 455 455 } 456 456 } 457 457 ··· 690 690 } else { 691 691 struct hd_struct *part; 692 692 693 - spin_lock(&ext_devt_lock); 693 + spin_lock_bh(&ext_devt_lock); 694 694 part = idr_find(&ext_devt_idr, blk_mangle_minor(MINOR(devt))); 695 695 if (part && get_disk(part_to_disk(part))) { 696 696 *partno = part->partno; 697 697 disk = part_to_disk(part); 698 698 } 699 - spin_unlock(&ext_devt_lock); 699 + spin_unlock_bh(&ext_devt_lock); 700 700 } 701 701 702 702 return disk;
+1
drivers/block/Kconfig
··· 406 406 407 407 config BLK_DEV_PMEM 408 408 tristate "Persistent memory block device support" 409 + depends on HAS_IOMEM 409 410 help 410 411 Saying Y here will allow you to use a contiguous range of reserved 411 412 memory as one or more persistent block devices.
+2
drivers/block/zram/zram_drv.c
··· 805 805 memset(&zram->stats, 0, sizeof(zram->stats)); 806 806 zram->disksize = 0; 807 807 zram->max_comp_streams = 1; 808 + 808 809 set_capacity(zram->disk, 0); 810 + part_stat_set_all(&zram->disk->part0, 0); 809 811 810 812 up_write(&zram->init_lock); 811 813 /* I/O operation under all of CPU are done so let's free */
+17 -3
drivers/gpu/drm/i915/intel_i2c.c
··· 435 435 struct intel_gmbus, 436 436 adapter); 437 437 struct drm_i915_private *dev_priv = bus->dev_priv; 438 - int i, reg_offset; 438 + int i = 0, inc, try = 0, reg_offset; 439 439 int ret = 0; 440 440 441 441 intel_aux_display_runtime_get(dev_priv); ··· 448 448 449 449 reg_offset = dev_priv->gpio_mmio_base; 450 450 451 + retry: 451 452 I915_WRITE(GMBUS0 + reg_offset, bus->reg0); 452 453 453 - for (i = 0; i < num; i++) { 454 + for (; i < num; i += inc) { 455 + inc = 1; 454 456 if (gmbus_is_index_read(msgs, i, num)) { 455 457 ret = gmbus_xfer_index_read(dev_priv, &msgs[i]); 456 - i += 1; /* set i to the index of the read xfer */ 458 + inc = 2; /* an index read is two msgs */ 457 459 } else if (msgs[i].flags & I2C_M_RD) { 458 460 ret = gmbus_xfer_read(dev_priv, &msgs[i], 0); 459 461 } else { ··· 526 524 DRM_DEBUG_KMS("GMBUS [%s] NAK for addr: %04x %c(%d)\n", 527 525 adapter->name, msgs[i].addr, 528 526 (msgs[i].flags & I2C_M_RD) ? 'r' : 'w', msgs[i].len); 527 + 528 + /* 529 + * Passive adapters sometimes NAK the first probe. Retry the first 530 + * message once on -ENXIO for GMBUS transfers; the bit banging algorithm 531 + * has retries internally. See also the retry loop in 532 + * drm_do_probe_ddc_edid, which bails out on the first -ENXIO. 533 + */ 534 + if (ret == -ENXIO && i == 0 && try++ == 0) { 535 + DRM_DEBUG_KMS("GMBUS [%s] NAK on first message, retry\n", 536 + adapter->name); 537 + goto retry; 538 + } 529 539 530 540 goto out; 531 541
+1 -1
drivers/gpu/drm/i915/intel_sdvo.c
··· 2550 2550 2551 2551 DRM_DEBUG_KMS("initialising analog device %d\n", device); 2552 2552 2553 - intel_sdvo_connector = kzalloc(sizeof(*intel_sdvo_connector), GFP_KERNEL); 2553 + intel_sdvo_connector = intel_sdvo_connector_alloc(); 2554 2554 if (!intel_sdvo_connector) 2555 2555 return false; 2556 2556
+1 -6
drivers/gpu/drm/radeon/atombios_crtc.c
··· 580 580 else 581 581 radeon_crtc->pll_flags |= RADEON_PLL_PREFER_LOW_REF_DIV; 582 582 583 - /* if there is no audio, set MINM_OVER_MAXP */ 584 - if (!drm_detect_monitor_audio(radeon_connector_edid(connector))) 585 - radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP; 586 583 if (rdev->family < CHIP_RV770) 587 584 radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP; 588 585 /* use frac fb div on APUs */ ··· 1795 1798 if ((crtc->mode.clock == test_crtc->mode.clock) && 1796 1799 (adjusted_clock == test_adjusted_clock) && 1797 1800 (radeon_crtc->ss_enabled == test_radeon_crtc->ss_enabled) && 1798 - (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID) && 1799 - (drm_detect_monitor_audio(radeon_connector_edid(test_radeon_crtc->connector)) == 1800 - drm_detect_monitor_audio(radeon_connector_edid(radeon_crtc->connector)))) 1801 + (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID)) 1801 1802 return test_radeon_crtc->pll_id; 1802 1803 } 1803 1804 }
+15
drivers/gpu/drm/radeon/radeon_device.c
··· 1463 1463 if (r) 1464 1464 DRM_ERROR("ib ring test failed (%d).\n", r); 1465 1465 1466 + /* 1467 + * Turks/Thames GPU will freeze whole laptop if DPM is not restarted 1468 + * after the CP ring have chew one packet at least. Hence here we stop 1469 + * and restart DPM after the radeon_ib_ring_tests(). 1470 + */ 1471 + if (rdev->pm.dpm_enabled && 1472 + (rdev->pm.pm_method == PM_METHOD_DPM) && 1473 + (rdev->family == CHIP_TURKS) && 1474 + (rdev->flags & RADEON_IS_MOBILITY)) { 1475 + mutex_lock(&rdev->pm.mutex); 1476 + radeon_dpm_disable(rdev); 1477 + radeon_dpm_enable(rdev); 1478 + mutex_unlock(&rdev->pm.mutex); 1479 + } 1480 + 1466 1481 if ((radeon_testing & 1)) { 1467 1482 if (rdev->accel_working) 1468 1483 radeon_test_moves(rdev);
+12 -5
drivers/gpu/drm/radeon/radeon_vm.c
··· 458 458 /* make sure object fit at this offset */ 459 459 eoffset = soffset + size; 460 460 if (soffset >= eoffset) { 461 - return -EINVAL; 461 + r = -EINVAL; 462 + goto error_unreserve; 462 463 } 463 464 464 465 last_pfn = eoffset / RADEON_GPU_PAGE_SIZE; 465 466 if (last_pfn > rdev->vm_manager.max_pfn) { 466 467 dev_err(rdev->dev, "va above limit (0x%08X > 0x%08X)\n", 467 468 last_pfn, rdev->vm_manager.max_pfn); 468 - return -EINVAL; 469 + r = -EINVAL; 470 + goto error_unreserve; 469 471 } 470 472 471 473 } else { ··· 488 486 "(bo %p 0x%010lx 0x%010lx)\n", bo_va->bo, 489 487 soffset, tmp->bo, tmp->it.start, tmp->it.last); 490 488 mutex_unlock(&vm->mutex); 491 - return -EINVAL; 489 + r = -EINVAL; 490 + goto error_unreserve; 492 491 } 493 492 } 494 493 ··· 500 497 tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL); 501 498 if (!tmp) { 502 499 mutex_unlock(&vm->mutex); 503 - return -ENOMEM; 500 + r = -ENOMEM; 501 + goto error_unreserve; 504 502 } 505 503 tmp->it.start = bo_va->it.start; 506 504 tmp->it.last = bo_va->it.last; ··· 559 555 r = radeon_vm_clear_bo(rdev, pt); 560 556 if (r) { 561 557 radeon_bo_unref(&pt); 562 - radeon_bo_reserve(bo_va->bo, false); 563 558 return r; 564 559 } 565 560 ··· 578 575 579 576 mutex_unlock(&vm->mutex); 580 577 return 0; 578 + 579 + error_unreserve: 580 + radeon_bo_unreserve(bo_va->bo); 581 + return r; 581 582 } 582 583 583 584 /**
+6 -1
drivers/input/mouse/synaptics.c
··· 151 151 1024, 5112, 2024, 4832 152 152 }, 153 153 { 154 + (const char * const []){"LEN2000", NULL}, 155 + {ANY_BOARD_ID, ANY_BOARD_ID}, 156 + 1024, 5113, 2021, 4832 157 + }, 158 + { 154 159 (const char * const []){"LEN2001", NULL}, 155 160 {ANY_BOARD_ID, ANY_BOARD_ID}, 156 161 1024, 5022, 2508, 4832 ··· 196 191 "LEN0045", 197 192 "LEN0047", 198 193 "LEN0049", 199 - "LEN2000", 194 + "LEN2000", /* S540 */ 200 195 "LEN2001", /* Edge E431 */ 201 196 "LEN2002", /* Edge E531 */ 202 197 "LEN2003",
+15 -3
drivers/iommu/intel-iommu.c
··· 422 422 static int dmar_forcedac; 423 423 static int intel_iommu_strict; 424 424 static int intel_iommu_superpage = 1; 425 + static int intel_iommu_ecs = 1; 426 + 427 + /* We only actually use ECS when PASID support (on the new bit 40) 428 + * is also advertised. Some early implementations — the ones with 429 + * PASID support on bit 28 — have issues even when we *only* use 430 + * extended root/context tables. */ 431 + #define ecs_enabled(iommu) (intel_iommu_ecs && ecap_ecs(iommu->ecap) && \ 432 + ecap_pasid(iommu->ecap)) 425 433 426 434 int intel_iommu_gfx_mapped; 427 435 EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped); ··· 473 465 printk(KERN_INFO 474 466 "Intel-IOMMU: disable supported super page\n"); 475 467 intel_iommu_superpage = 0; 468 + } else if (!strncmp(str, "ecs_off", 7)) { 469 + printk(KERN_INFO 470 + "Intel-IOMMU: disable extended context table support\n"); 471 + intel_iommu_ecs = 0; 476 472 } 477 473 478 474 str += strcspn(str, ","); ··· 681 669 struct context_entry *context; 682 670 u64 *entry; 683 671 684 - if (ecap_ecs(iommu->ecap)) { 672 + if (ecs_enabled(iommu)) { 685 673 if (devfn >= 0x80) { 686 674 devfn -= 0x80; 687 675 entry = &root->hi; ··· 818 806 if (context) 819 807 free_pgtable_page(context); 820 808 821 - if (!ecap_ecs(iommu->ecap)) 809 + if (!ecs_enabled(iommu)) 822 810 continue; 823 811 824 812 context = iommu_context_addr(iommu, i, 0x80, 0); ··· 1153 1141 unsigned long flag; 1154 1142 1155 1143 addr = virt_to_phys(iommu->root_entry); 1156 - if (ecap_ecs(iommu->ecap)) 1144 + if (ecs_enabled(iommu)) 1157 1145 addr |= DMA_RTADDR_RTT; 1158 1146 1159 1147 raw_spin_lock_irqsave(&iommu->register_lock, flag);
+8 -6
drivers/md/md.c
··· 3834 3834 err = -EBUSY; 3835 3835 } 3836 3836 spin_unlock(&mddev->lock); 3837 - return err; 3837 + return err ?: len; 3838 3838 } 3839 3839 err = mddev_lock(mddev); 3840 3840 if (err) ··· 4217 4217 set_bit(MD_RECOVERY_FROZEN, &mddev->recovery); 4218 4218 else 4219 4219 clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery); 4220 - flush_workqueue(md_misc_wq); 4221 - if (mddev->sync_thread) { 4222 - set_bit(MD_RECOVERY_INTR, &mddev->recovery); 4223 - if (mddev_lock(mddev) == 0) { 4220 + if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) && 4221 + mddev_lock(mddev) == 0) { 4222 + flush_workqueue(md_misc_wq); 4223 + if (mddev->sync_thread) { 4224 + set_bit(MD_RECOVERY_INTR, &mddev->recovery); 4224 4225 md_reap_sync_thread(mddev); 4225 - mddev_unlock(mddev); 4226 4226 } 4227 + mddev_unlock(mddev); 4227 4228 } 4228 4229 } else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) || 4229 4230 test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) ··· 8262 8261 if (mddev_is_clustered(mddev)) 8263 8262 md_cluster_ops->metadata_update_finish(mddev); 8264 8263 clear_bit(MD_RECOVERY_RUNNING, &mddev->recovery); 8264 + clear_bit(MD_RECOVERY_DONE, &mddev->recovery); 8265 8265 clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); 8266 8266 clear_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); 8267 8267 clear_bit(MD_RECOVERY_REQUESTED, &mddev->recovery);
+1
drivers/md/raid10.c
··· 4156 4156 4157 4157 clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); 4158 4158 clear_bit(MD_RECOVERY_CHECK, &mddev->recovery); 4159 + clear_bit(MD_RECOVERY_DONE, &mddev->recovery); 4159 4160 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); 4160 4161 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); 4161 4162
+1
drivers/md/raid5.c
··· 7354 7354 7355 7355 clear_bit(MD_RECOVERY_SYNC, &mddev->recovery); 7356 7356 clear_bit(MD_RECOVERY_CHECK, &mddev->recovery); 7357 + clear_bit(MD_RECOVERY_DONE, &mddev->recovery); 7357 7358 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery); 7358 7359 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); 7359 7360 mddev->sync_thread = md_register_thread(md_do_sync, mddev,
+16 -2
drivers/net/ethernet/cisco/enic/enic_ethtool.c
··· 131 131 { 132 132 struct enic *enic = netdev_priv(netdev); 133 133 struct vnic_devcmd_fw_info *fw_info; 134 + int err; 134 135 135 - enic_dev_fw_info(enic, &fw_info); 136 + err = enic_dev_fw_info(enic, &fw_info); 137 + /* return only when pci_zalloc_consistent fails in vnic_dev_fw_info 138 + * For other failures, like devcmd failure, we return previously 139 + * recorded info. 140 + */ 141 + if (err == -ENOMEM) 142 + return; 136 143 137 144 strlcpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver)); 138 145 strlcpy(drvinfo->version, DRV_VERSION, sizeof(drvinfo->version)); ··· 188 181 struct enic *enic = netdev_priv(netdev); 189 182 struct vnic_stats *vstats; 190 183 unsigned int i; 184 + int err; 191 185 192 - enic_dev_stats_dump(enic, &vstats); 186 + err = enic_dev_stats_dump(enic, &vstats); 187 + /* return only when pci_zalloc_consistent fails in vnic_dev_stats_dump 188 + * For other failures, like devcmd failure, we return previously 189 + * recorded stats. 190 + */ 191 + if (err == -ENOMEM) 192 + return; 193 193 194 194 for (i = 0; i < enic_n_tx_stats; i++) 195 195 *(data++) = ((u64 *)&vstats->tx)[enic_tx_stats[i].index];
+9 -2
drivers/net/ethernet/cisco/enic/enic_main.c
··· 615 615 { 616 616 struct enic *enic = netdev_priv(netdev); 617 617 struct vnic_stats *stats; 618 + int err; 618 619 619 - enic_dev_stats_dump(enic, &stats); 620 + err = enic_dev_stats_dump(enic, &stats); 621 + /* return only when pci_zalloc_consistent fails in vnic_dev_stats_dump 622 + * For other failures, like devcmd failure, we return previously 623 + * recorded stats. 624 + */ 625 + if (err == -ENOMEM) 626 + return net_stats; 620 627 621 628 net_stats->tx_packets = stats->tx.tx_frames_ok; 622 629 net_stats->tx_bytes = stats->tx.tx_bytes_ok; ··· 1414 1407 */ 1415 1408 enic_calc_int_moderation(enic, &enic->rq[rq]); 1416 1409 1410 + enic_poll_unlock_napi(&enic->rq[rq]); 1417 1411 if (work_done < work_to_do) { 1418 1412 1419 1413 /* Some work done, but not enough to stay in polling, ··· 1426 1418 enic_set_int_moderation(enic, &enic->rq[rq]); 1427 1419 vnic_intr_unmask(&enic->intr[intr]); 1428 1420 } 1429 - enic_poll_unlock_napi(&enic->rq[rq]); 1430 1421 1431 1422 return work_done; 1432 1423 }
+4 -5
drivers/net/ethernet/cisco/enic/vnic_rq.c
··· 188 188 struct vnic_rq_buf *buf; 189 189 u32 fetch_index; 190 190 unsigned int count = rq->ring.desc_count; 191 + int i; 191 192 192 193 buf = rq->to_clean; 193 194 194 - while (vnic_rq_desc_used(rq) > 0) { 195 - 195 + for (i = 0; i < rq->ring.desc_count; i++) { 196 196 (*buf_clean)(rq, buf); 197 - 198 - buf = rq->to_clean = buf->next; 199 - rq->ring.desc_avail++; 197 + buf = buf->next; 200 198 } 199 + rq->ring.desc_avail = rq->ring.desc_count - 1; 201 200 202 201 /* Use current fetch_index as the ring starting point */ 203 202 fetch_index = ioread32(&rq->ctrl->fetch_index);
+2 -2
drivers/net/ethernet/intel/igb/igb_ptp.c
··· 538 538 igb->perout[i].start.tv_nsec = rq->perout.start.nsec; 539 539 igb->perout[i].period.tv_sec = ts.tv_sec; 540 540 igb->perout[i].period.tv_nsec = ts.tv_nsec; 541 - wr32(trgttiml, rq->perout.start.sec); 542 - wr32(trgttimh, rq->perout.start.nsec); 541 + wr32(trgttimh, rq->perout.start.sec); 542 + wr32(trgttiml, rq->perout.start.nsec); 543 543 tsauxc |= tsauxc_mask; 544 544 tsim |= tsim_mask; 545 545 } else {
+2 -1
include/linux/intel-iommu.h
··· 115 115 * Extended Capability Register 116 116 */ 117 117 118 + #define ecap_pasid(e) ((e >> 40) & 0x1) 118 119 #define ecap_pss(e) ((e >> 35) & 0x1f) 119 120 #define ecap_eafs(e) ((e >> 34) & 0x1) 120 121 #define ecap_nwfs(e) ((e >> 33) & 0x1) 121 122 #define ecap_srs(e) ((e >> 31) & 0x1) 122 123 #define ecap_ers(e) ((e >> 30) & 0x1) 123 124 #define ecap_prs(e) ((e >> 29) & 0x1) 124 - #define ecap_pasid(e) ((e >> 28) & 0x1) 125 + /* PASID support used to be on bit 28 */ 125 126 #define ecap_dis(e) ((e >> 27) & 0x1) 126 127 #define ecap_nest(e) ((e >> 26) & 0x1) 127 128 #define ecap_mts(e) ((e >> 25) & 0x1)
+1 -1
kernel/sched/fair.c
··· 2181 2181 } 2182 2182 for (; vma; vma = vma->vm_next) { 2183 2183 if (!vma_migratable(vma) || !vma_policy_mof(vma) || 2184 - is_vm_hugetlb_page(vma)) { 2184 + is_vm_hugetlb_page(vma) || (vma->vm_flags & VM_MIXEDMAP)) { 2185 2185 continue; 2186 2186 } 2187 2187
+1 -1
kernel/trace/ring_buffer_benchmark.c
··· 450 450 451 451 if (producer_fifo >= 0) { 452 452 struct sched_param param = { 453 - .sched_priority = consumer_fifo 453 + .sched_priority = producer_fifo 454 454 }; 455 455 sched_setscheduler(producer, SCHED_FIFO, &param); 456 456 } else
+3 -3
mm/memcontrol.c
··· 2323 2323 css_get_many(&memcg->css, batch); 2324 2324 if (batch > nr_pages) 2325 2325 refill_stock(memcg, batch - nr_pages); 2326 + if (!(gfp_mask & __GFP_WAIT)) 2327 + goto done; 2326 2328 /* 2327 2329 * If the hierarchy is above the normal consumption range, 2328 2330 * make the charging task trim their excess contribution. ··· 5835 5833 if (!mem_cgroup_is_root(memcg)) 5836 5834 page_counter_uncharge(&memcg->memory, 1); 5837 5835 5838 - /* XXX: caller holds IRQ-safe mapping->tree_lock */ 5839 - VM_BUG_ON(!irqs_disabled()); 5840 - 5836 + /* Caller disabled preemption with mapping->tree_lock */ 5841 5837 mem_cgroup_charge_statistics(memcg, page, -1); 5842 5838 memcg_check_events(memcg, page); 5843 5839 }
+3 -1
mm/memory_hotplug.c
··· 1969 1969 * wait_table may be allocated from boot memory, 1970 1970 * here only free if it's allocated by vmalloc. 1971 1971 */ 1972 - if (is_vmalloc_addr(zone->wait_table)) 1972 + if (is_vmalloc_addr(zone->wait_table)) { 1973 1973 vfree(zone->wait_table); 1974 + zone->wait_table = NULL; 1975 + } 1974 1976 } 1975 1977 } 1976 1978 EXPORT_SYMBOL(try_offline_node);
+2 -1
mm/zsmalloc.c
··· 289 289 290 290 static void destroy_handle_cache(struct zs_pool *pool) 291 291 { 292 - kmem_cache_destroy(pool->handle_cachep); 292 + if (pool->handle_cachep) 293 + kmem_cache_destroy(pool->handle_cachep); 293 294 } 294 295 295 296 static unsigned long alloc_handle(struct zs_pool *pool)
+3 -4
net/bridge/br_multicast.c
··· 1164 1164 struct net_bridge_port *p; 1165 1165 struct hlist_node *slot = NULL; 1166 1166 1167 + if (!hlist_unhashed(&port->rlist)) 1168 + return; 1169 + 1167 1170 hlist_for_each_entry(p, &br->router_list, rlist) { 1168 1171 if ((unsigned long) port >= (unsigned long) p) 1169 1172 break; ··· 1194 1191 if (port->multicast_router != 1) 1195 1192 return; 1196 1193 1197 - if (!hlist_unhashed(&port->rlist)) 1198 - goto timer; 1199 - 1200 1194 br_multicast_add_router(br, port); 1201 1195 1202 - timer: 1203 1196 mod_timer(&port->multicast_router_timer, 1204 1197 now + br->multicast_querier_interval); 1205 1198 }
+1 -1
net/core/skbuff.c
··· 4467 4467 4468 4468 while (order) { 4469 4469 if (npages >= 1 << order) { 4470 - page = alloc_pages(gfp_mask | 4470 + page = alloc_pages((gfp_mask & ~__GFP_WAIT) | 4471 4471 __GFP_COMP | 4472 4472 __GFP_NOWARN | 4473 4473 __GFP_NORETRY,
+6 -9
net/core/sock.c
··· 354 354 355 355 /* 356 356 * SOCK_MEMALLOC is allowed to ignore rmem limits to ensure forward 357 - * progress of swapping. However, if SOCK_MEMALLOC is cleared while 358 - * it has rmem allocations there is a risk that the user of the 359 - * socket cannot make forward progress due to exceeding the rmem 360 - * limits. By rights, sk_clear_memalloc() should only be called 361 - * on sockets being torn down but warn and reset the accounting if 362 - * that assumption breaks. 357 + * progress of swapping. SOCK_MEMALLOC may be cleared while 358 + * it has rmem allocations due to the last swapfile being deactivated 359 + * but there is a risk that the socket is unusable due to exceeding 360 + * the rmem limits. Reclaim the reserves and obey rmem limits again. 363 361 */ 364 - if (WARN_ON(sk->sk_forward_alloc)) 365 - sk_mem_reclaim(sk); 362 + sk_mem_reclaim(sk); 366 363 } 367 364 EXPORT_SYMBOL_GPL(sk_clear_memalloc); 368 365 ··· 1869 1872 1870 1873 pfrag->offset = 0; 1871 1874 if (SKB_FRAG_PAGE_ORDER) { 1872 - pfrag->page = alloc_pages(gfp | __GFP_COMP | 1875 + pfrag->page = alloc_pages((gfp & ~__GFP_WAIT) | __GFP_COMP | 1873 1876 __GFP_NOWARN | __GFP_NORETRY, 1874 1877 SKB_FRAG_PAGE_ORDER); 1875 1878 if (likely(pfrag->page)) {
+3 -5
net/ipv6/ip6_input.c
··· 212 212 */ 213 213 214 214 rcu_read_lock(); 215 + resubmit: 215 216 idev = ip6_dst_idev(skb_dst(skb)); 216 217 if (!pskb_pull(skb, skb_transport_offset(skb))) 217 218 goto discard; 218 219 nhoff = IP6CB(skb)->nhoff; 219 220 nexthdr = skb_network_header(skb)[nhoff]; 220 221 221 - resubmit: 222 222 raw = raw6_local_deliver(skb, nexthdr); 223 223 ipprot = rcu_dereference(inet6_protos[nexthdr]); 224 224 if (ipprot) { ··· 246 246 goto discard; 247 247 248 248 ret = ipprot->handler(skb); 249 - if (ret < 0) { 250 - nexthdr = -ret; 249 + if (ret > 0) 251 250 goto resubmit; 252 - } else if (ret == 0) { 251 + else if (ret == 0) 253 252 IP6_INC_STATS_BH(net, idev, IPSTATS_MIB_INDELIVERS); 254 - } 255 253 } else { 256 254 if (!raw) { 257 255 if (xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) {
+11
net/mpls/af_mpls.c
··· 564 564 case NETDEV_UNREGISTER: 565 565 mpls_ifdown(dev); 566 566 break; 567 + case NETDEV_CHANGENAME: 568 + mdev = mpls_dev_get(dev); 569 + if (mdev) { 570 + int err; 571 + 572 + mpls_dev_sysctl_unregister(mdev); 573 + err = mpls_dev_sysctl_register(dev, mdev); 574 + if (err) 575 + return notifier_from_errno(err); 576 + } 577 + break; 567 578 } 568 579 return NOTIFY_OK; 569 580 }
+10 -1
net/sctp/auth.c
··· 381 381 } 382 382 383 383 384 - /* Public interface to creat the association shared key. 384 + /* Public interface to create the association shared key. 385 385 * See code above for the algorithm. 386 386 */ 387 387 int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp) 388 388 { 389 389 struct sctp_auth_bytes *secret; 390 390 struct sctp_shared_key *ep_key; 391 + struct sctp_chunk *chunk; 391 392 392 393 /* If we don't support AUTH, or peer is not capable 393 394 * we don't need to do anything. ··· 410 409 411 410 sctp_auth_key_put(asoc->asoc_shared_key); 412 411 asoc->asoc_shared_key = secret; 412 + 413 + /* Update send queue in case any chunk already in there now 414 + * needs authenticating 415 + */ 416 + list_for_each_entry(chunk, &asoc->outqueue.out_chunk_list, list) { 417 + if (sctp_auth_send_cid(chunk->chunk_hdr->type, asoc)) 418 + chunk->auth = 1; 419 + } 413 420 414 421 return 0; 415 422 }
+11 -5
net/tipc/socket.c
··· 2140 2140 peer_node = tsk_peer_node(tsk); 2141 2141 2142 2142 if (tsk->probing_state == TIPC_CONN_PROBING) { 2143 - /* Previous probe not answered -> self abort */ 2144 - skb = tipc_msg_create(TIPC_CRITICAL_IMPORTANCE, 2145 - TIPC_CONN_MSG, SHORT_H_SIZE, 0, 2146 - own_node, peer_node, tsk->portid, 2147 - peer_port, TIPC_ERR_NO_PORT); 2143 + if (!sock_owned_by_user(sk)) { 2144 + sk->sk_socket->state = SS_DISCONNECTING; 2145 + tsk->connected = 0; 2146 + tipc_node_remove_conn(sock_net(sk), tsk_peer_node(tsk), 2147 + tsk_peer_port(tsk)); 2148 + sk->sk_state_change(sk); 2149 + } else { 2150 + /* Try again later */ 2151 + sk_reset_timer(sk, &sk->sk_timer, (HZ / 20)); 2152 + } 2153 + 2148 2154 } else { 2149 2155 skb = tipc_msg_create(CONN_MANAGER, CONN_PROBE, 2150 2156 INT_H_SIZE, 0, peer_node, own_node,
+2
net/wireless/wext-compat.c
··· 1333 1333 memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN); 1334 1334 wdev_unlock(wdev); 1335 1335 1336 + memset(&sinfo, 0, sizeof(sinfo)); 1337 + 1336 1338 if (rdev_get_station(rdev, dev, bssid, &sinfo)) 1337 1339 return NULL; 1338 1340
+2 -2
scripts/checkpatch.pl
··· 3169 3169 } 3170 3170 3171 3171 # check for global initialisers. 3172 - if ($line =~ /^\+(\s*$Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/) { 3172 + if ($line =~ /^\+$Type\s*$Ident(?:\s+$Modifier)*\s*=\s*(?:0|NULL|false)\s*;/) { 3173 3173 if (ERROR("GLOBAL_INITIALISERS", 3174 3174 "do not initialise globals to 0 or NULL\n" . 3175 3175 $herecurr) && 3176 3176 $fix) { 3177 - $fixed[$fixlinenr] =~ s/($Type\s*$Ident\s*(?:\s+$Modifier))*\s*=\s*(0|NULL|false)\s*;/$1;/; 3177 + $fixed[$fixlinenr] =~ s/(^.$Type\s*$Ident(?:\s+$Modifier)*)\s*=\s*(0|NULL|false)\s*;/$1;/; 3178 3178 } 3179 3179 } 3180 3180 # check for static initialisers.