···77node's name represents the name of the corresponding LED.8899LED sub-node properties:1010-- gpios : Should specify the LED's GPIO, see "Specifying GPIO information1111- for devices" in Documentation/devicetree/booting-without-of.txt. Active1212- low LEDs should be indicated using flags in the GPIO specifier.1010+- gpios : Should specify the LED's GPIO, see "gpios property" in1111+ Documentation/devicetree/gpio.txt. Active low LEDs should be1212+ indicated using flags in the GPIO specifier.1313- label : (optional) The label for this LED. If omitted, the label is1414 taken from the node name (excluding the unit address).1515- linux,default-trigger : (optional) This parameter, if present, is a
···13131414All ALPS touchpads should respond to the "E6 report" command sequence:1515E8-E6-E6-E6-E9. An ALPS touchpad should respond with either 00-00-0A or1616-00-00-64.1616+00-00-64 if no buttons are pressed. The bits 0-2 of the first byte will be 1s1717+if some buttons are pressed.17181819If the E6 report is successful, the touchpad model is identified using the "E71920report" sequence: E8-E7-E7-E7-E9. The response is the model signature and is
+6
Documentation/kernel-parameters.txt
···2211221122122212 default: off.2213221322142214+ printk.always_kmsg_dump=22152215+ Trigger kmsg_dump for cases other than kernel oops or22162216+ panics22172217+ Format: <bool> (1/Y/y=enable, 0/N/n=disable)22182218+ default: disabled22192219+22142220 printk.time= Show timing data prefixed to each printk message line22152221 Format: <bool> (1/Y/y=enable, 0/N/n=disable)22162222
···12801280 depends on CPU_V712811281 help12821282 This option enables the workaround for the 743622 Cortex-A912831283- (r2p0..r2p2) erratum. Under very rare conditions, a faulty12831283+ (r2p*) erratum. Under very rare conditions, a faulty12841284 optimisation in the Cortex-A9 Store Buffer may lead to data12851285 corruption. This workaround sets a specific bit in the diagnostic12861286 register of the Cortex-A9 which disables the Store Buffer
···180180u64181181armpmu_event_update(struct perf_event *event,182182 struct hw_perf_event *hwc,183183- int idx, int overflow)183183+ int idx)184184{185185 struct arm_pmu *armpmu = to_arm_pmu(event->pmu);186186 u64 delta, prev_raw_count, new_raw_count;···193193 new_raw_count) != prev_raw_count)194194 goto again;195195196196- new_raw_count &= armpmu->max_period;197197- prev_raw_count &= armpmu->max_period;198198-199199- if (overflow)200200- delta = armpmu->max_period - prev_raw_count + new_raw_count + 1;201201- else202202- delta = new_raw_count - prev_raw_count;196196+ delta = (new_raw_count - prev_raw_count) & armpmu->max_period;203197204198 local64_add(delta, &event->count);205199 local64_sub(delta, &hwc->period_left);···210216 if (hwc->idx < 0)211217 return;212218213213- armpmu_event_update(event, hwc, hwc->idx, 0);219219+ armpmu_event_update(event, hwc, hwc->idx);214220}215221216222static void···226232 if (!(hwc->state & PERF_HES_STOPPED)) {227233 armpmu->disable(hwc, hwc->idx);228234 barrier(); /* why? */229229- armpmu_event_update(event, hwc, hwc->idx, 0);235235+ armpmu_event_update(event, hwc, hwc->idx);230236 hwc->state |= PERF_HES_STOPPED | PERF_HES_UPTODATE;231237 }232238}···512518 hwc->config_base |= (unsigned long)mapping;513519514520 if (!hwc->sample_period) {515515- hwc->sample_period = armpmu->max_period;521521+ /*522522+ * For non-sampling runs, limit the sample_period to half523523+ * of the counter width. That way, the new counter value524524+ * is far less likely to overtake the previous one unless525525+ * you have some serious IRQ latency issues.526526+ */527527+ hwc->sample_period = armpmu->max_period >> 1;516528 hwc->last_period = hwc->sample_period;517529 local64_set(&hwc->period_left, hwc->sample_period);518530 }···680680}681681682682/*683683+ * PMU hardware loses all context when a CPU goes offline.684684+ * When a CPU is hotplugged back in, since some hardware registers are685685+ * UNKNOWN at reset, the PMU must be explicitly reset to avoid reading686686+ * junk values out of them.687687+ */688688+static int __cpuinit pmu_cpu_notify(struct notifier_block *b,689689+ unsigned long action, void *hcpu)690690+{691691+ if ((action & ~CPU_TASKS_FROZEN) != CPU_STARTING)692692+ return NOTIFY_DONE;693693+694694+ if (cpu_pmu && cpu_pmu->reset)695695+ cpu_pmu->reset(NULL);696696+697697+ return NOTIFY_OK;698698+}699699+700700+static struct notifier_block __cpuinitdata pmu_cpu_notifier = {701701+ .notifier_call = pmu_cpu_notify,702702+};703703+704704+/*683705 * CPU PMU identification and registration.684706 */685707static int __init···752730 pr_info("enabled with %s PMU driver, %d counters available\n",753731 cpu_pmu->name, cpu_pmu->num_events);754732 cpu_pmu_init(cpu_pmu);733733+ register_cpu_notifier(&pmu_cpu_notifier);755734 armpmu_register(cpu_pmu, "cpu", PERF_TYPE_RAW);756735 } else {757736 pr_info("no hardware support available\n");
+3-19
arch/arm/kernel/perf_event_v6.c
···467467 raw_spin_unlock_irqrestore(&events->pmu_lock, flags);468468}469469470470-static int counter_is_active(unsigned long pmcr, int idx)471471-{472472- unsigned long mask = 0;473473- if (idx == ARMV6_CYCLE_COUNTER)474474- mask = ARMV6_PMCR_CCOUNT_IEN;475475- else if (idx == ARMV6_COUNTER0)476476- mask = ARMV6_PMCR_COUNT0_IEN;477477- else if (idx == ARMV6_COUNTER1)478478- mask = ARMV6_PMCR_COUNT1_IEN;479479-480480- if (mask)481481- return pmcr & mask;482482-483483- WARN_ONCE(1, "invalid counter number (%d)\n", idx);484484- return 0;485485-}486486-487470static irqreturn_t488471armv6pmu_handle_irq(int irq_num,489472 void *dev)···496513 struct perf_event *event = cpuc->events[idx];497514 struct hw_perf_event *hwc;498515499499- if (!counter_is_active(pmcr, idx))516516+ /* Ignore if we don't have an event. */517517+ if (!event)500518 continue;501519502520 /*···508524 continue;509525510526 hwc = &event->hw;511511- armpmu_event_update(event, hwc, idx, 1);527527+ armpmu_event_update(event, hwc, idx);512528 data.period = event->hw.last_period;513529 if (!armpmu_event_set_period(event, hwc, idx))514530 continue;
+10-1
arch/arm/kernel/perf_event_v7.c
···809809810810 counter = ARMV7_IDX_TO_COUNTER(idx);811811 asm volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (BIT(counter)));812812+ isb();813813+ /* Clear the overflow flag in case an interrupt is pending. */814814+ asm volatile("mcr p15, 0, %0, c9, c12, 3" : : "r" (BIT(counter)));815815+ isb();816816+812817 return idx;813818}814819···960955 struct perf_event *event = cpuc->events[idx];961956 struct hw_perf_event *hwc;962957958958+ /* Ignore if we don't have an event. */959959+ if (!event)960960+ continue;961961+963962 /*964963 * We have a single interrupt for all counters. Check that965964 * each counter has overflowed before we process it.···972963 continue;973964974965 hwc = &event->hw;975975- armpmu_event_update(event, hwc, idx, 1);966966+ armpmu_event_update(event, hwc, idx);976967 data.period = event->hw.last_period;977968 if (!armpmu_event_set_period(event, hwc, idx))978969 continue;
+16-4
arch/arm/kernel/perf_event_xscale.c
···255255 struct perf_event *event = cpuc->events[idx];256256 struct hw_perf_event *hwc;257257258258+ if (!event)259259+ continue;260260+258261 if (!xscale1_pmnc_counter_has_overflowed(pmnc, idx))259262 continue;260263261264 hwc = &event->hw;262262- armpmu_event_update(event, hwc, idx, 1);265265+ armpmu_event_update(event, hwc, idx);263266 data.period = event->hw.last_period;264267 if (!armpmu_event_set_period(event, hwc, idx))265268 continue;···595592 struct perf_event *event = cpuc->events[idx];596593 struct hw_perf_event *hwc;597594598598- if (!xscale2_pmnc_counter_has_overflowed(pmnc, idx))595595+ if (!event)596596+ continue;597597+598598+ if (!xscale2_pmnc_counter_has_overflowed(of_flags, idx))599599 continue;600600601601 hwc = &event->hw;602602- armpmu_event_update(event, hwc, idx, 1);602602+ armpmu_event_update(event, hwc, idx);603603 data.period = event->hw.last_period;604604 if (!armpmu_event_set_period(event, hwc, idx))605605 continue;···669663static void670664xscale2pmu_disable_event(struct hw_perf_event *hwc, int idx)671665{672672- unsigned long flags, ien, evtsel;666666+ unsigned long flags, ien, evtsel, of_flags;673667 struct pmu_hw_events *events = cpu_pmu->get_hw_events();674668675669 ien = xscale2pmu_read_int_enable();···678672 switch (idx) {679673 case XSCALE_CYCLE_COUNTER:680674 ien &= ~XSCALE2_CCOUNT_INT_EN;675675+ of_flags = XSCALE2_CCOUNT_OVERFLOW;681676 break;682677 case XSCALE_COUNTER0:683678 ien &= ~XSCALE2_COUNT0_INT_EN;684679 evtsel &= ~XSCALE2_COUNT0_EVT_MASK;685680 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT0_EVT_SHFT;681681+ of_flags = XSCALE2_COUNT0_OVERFLOW;686682 break;687683 case XSCALE_COUNTER1:688684 ien &= ~XSCALE2_COUNT1_INT_EN;689685 evtsel &= ~XSCALE2_COUNT1_EVT_MASK;690686 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT1_EVT_SHFT;687687+ of_flags = XSCALE2_COUNT1_OVERFLOW;691688 break;692689 case XSCALE_COUNTER2:693690 ien &= ~XSCALE2_COUNT2_INT_EN;694691 evtsel &= ~XSCALE2_COUNT2_EVT_MASK;695692 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT2_EVT_SHFT;693693+ of_flags = XSCALE2_COUNT2_OVERFLOW;696694 break;697695 case XSCALE_COUNTER3:698696 ien &= ~XSCALE2_COUNT3_INT_EN;699697 evtsel &= ~XSCALE2_COUNT3_EVT_MASK;700698 evtsel |= XSCALE_PERFCTR_UNUSED << XSCALE2_COUNT3_EVT_SHFT;699699+ of_flags = XSCALE2_COUNT3_OVERFLOW;701700 break;702701 default:703702 WARN_ONCE(1, "invalid counter number (%d)\n", idx);···712701 raw_spin_lock_irqsave(&events->pmu_lock, flags);713702 xscale2pmu_write_event_select(evtsel);714703 xscale2pmu_write_int_enable(ien);704704+ xscale2pmu_write_overflow_flags(of_flags);715705 raw_spin_unlock_irqrestore(&events->pmu_lock, flags);716706}717707
···364364 going on could result in system crashes;365365366366config OMAP4_ERRATA_I688367367- bool "OMAP4 errata: Async Bridge Corruption (BROKEN)"368368- depends on ARCH_OMAP4 && BROKEN367367+ bool "OMAP4 errata: Async Bridge Corruption"368368+ depends on ARCH_OMAP4369369 select ARCH_HAS_BARRIERS370370 help371371 If a data is stalled inside asynchronous bridge because of back
+4
arch/arm/mach-omap2/board-n8x0.c
···371371 else372372 *openp = 0;373373374374+#ifdef CONFIG_MMC_OMAP374375 omap_mmc_notify_cover_event(mmc_device, index, *openp);376376+#else377377+ pr_warn("MMC: notify cover event not available\n");378378+#endif375379}376380377381static int n8x0_mmc_late_init(struct device *dev)
···6565 struct timespec ts_preidle, ts_postidle, ts_idle;6666 u32 cpu1_state;6767 int idle_time;6868- int new_state_idx;6968 int cpu_id = smp_processor_id();70697170 /* Used to keep track of the total time in idle */···8384 */8485 cpu1_state = pwrdm_read_pwrst(cpu1_pd);8586 if (cpu1_state != PWRDM_POWER_OFF) {8686- new_state_idx = drv->safe_state_index;8787- cx = cpuidle_get_statedata(&dev->states_usage[new_state_idx]);8787+ index = drv->safe_state_index;8888+ cx = cpuidle_get_statedata(&dev->states_usage[index]);8889 }89909091 if (index > 0)
+52
arch/arm/mach-omap2/gpmc-smsc911x.c
···1919#include <linux/interrupt.h>2020#include <linux/io.h>2121#include <linux/smsc911x.h>2222+#include <linux/regulator/fixed.h>2323+#include <linux/regulator/machine.h>22242325#include <plat/board.h>2426#include <plat/gpmc.h>···4442 .flags = SMSC911X_USE_16BIT,4543};46444545+static struct regulator_consumer_supply gpmc_smsc911x_supply[] = {4646+ REGULATOR_SUPPLY("vddvario", "smsc911x.0"),4747+ REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),4848+};4949+5050+/* Generic regulator definition to satisfy smsc911x */5151+static struct regulator_init_data gpmc_smsc911x_reg_init_data = {5252+ .constraints = {5353+ .min_uV = 3300000,5454+ .max_uV = 3300000,5555+ .valid_modes_mask = REGULATOR_MODE_NORMAL5656+ | REGULATOR_MODE_STANDBY,5757+ .valid_ops_mask = REGULATOR_CHANGE_MODE5858+ | REGULATOR_CHANGE_STATUS,5959+ },6060+ .num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply),6161+ .consumer_supplies = gpmc_smsc911x_supply,6262+};6363+6464+static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = {6565+ .supply_name = "gpmc_smsc911x",6666+ .microvolts = 3300000,6767+ .gpio = -EINVAL,6868+ .startup_delay = 0,6969+ .enable_high = 0,7070+ .enabled_at_boot = 1,7171+ .init_data = &gpmc_smsc911x_reg_init_data,7272+};7373+7474+/*7575+ * Platform device id of 42 is a temporary fix to avoid conflicts7676+ * with other reg-fixed-voltage devices. The real fix should7777+ * involve the driver core providing a way of dynamically7878+ * assigning a unique id on registration for platform devices7979+ * in the same name space.8080+ */8181+static struct platform_device gpmc_smsc911x_regulator = {8282+ .name = "reg-fixed-voltage",8383+ .id = 42,8484+ .dev = {8585+ .platform_data = &gpmc_smsc911x_fixed_reg_data,8686+ },8787+};8888+4789/*4890 * Initialize smsc911x device connected to the GPMC. Note that we4991 * assume that pin multiplexing is done in the board-*.c file,···10054 int ret;1015510256 gpmc_cfg = board_data;5757+5858+ ret = platform_device_register(&gpmc_smsc911x_regulator);5959+ if (ret < 0) {6060+ pr_err("Unable to register smsc911x regulators: %d\n", ret);6161+ return;6262+ }1036310464 if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {10565 pr_err("Failed to request GPMC mem region\n");
+6
arch/arm/mach-omap2/hsmmc.c
···428428 return 0;429429}430430431431+static int omap_hsmmc_done;431432#define MAX_OMAP_MMC_HWMOD_NAME_LEN 16432433433434void omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)···491490void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)492491{493492 u32 reg;493493+494494+ if (omap_hsmmc_done)495495+ return;496496+497497+ omap_hsmmc_done = 1;494498495499 if (!cpu_is_omap44xx()) {496500 if (cpu_is_omap2430()) {
···150150 platform_device_put(omap_iommu_pdev[i]);151151 return err;152152}153153-module_init(omap_iommu_init);153153+/* must be ready before omap3isp is probed */154154+subsys_initcall(omap_iommu_init);154155155156static void __exit omap_iommu_exit(void)156157{
···174174 freq = clk->rate;175175 clk_put(clk);176176177177+ rcu_read_lock();177178 opp = opp_find_freq_ceil(dev, &freq);178179 if (IS_ERR(opp)) {180180+ rcu_read_unlock();179181 pr_err("%s: unable to find boot up OPP for vdd_%s\n",180182 __func__, vdd_name);181183 goto exit;182184 }183185184186 bootup_volt = opp_get_voltage(opp);187187+ rcu_read_unlock();185188 if (!bootup_volt) {186189 pr_err("%s: unable to find voltage corresponding "187190 "to the bootup OPP for vdd_%s\n", __func__, vdd_name);
···226226{227227 int i;228228229229+ /* running before pxa_gpio_probe() */230230+#ifdef CONFIG_CPU_PXA26x231231+ pxa_last_gpio = 89;232232+#else233233+ pxa_last_gpio = 84;234234+#endif229235 for (i = 0; i <= pxa_last_gpio; i++)230236 gpio_desc[i].valid = 1;231237···301295{302296 int i, gpio;303297298298+ pxa_last_gpio = 120; /* running before pxa_gpio_probe() */304299 for (i = 0; i <= pxa_last_gpio; i++) {305300 /* skip GPIO2, 5, 6, 7, 8, they are not306301 * valid pins allow configuration
···168168#define MAXCTRL_SEL_SH 4169169#define MAXCTRL_STR (1u << 7)170170171171+extern int max1111_read_channel(int);171172/*172173 * Read MAX1111 ADC173174 */···177176 /* Ugly, better move this function into another module */178177 if (machine_is_tosa())179178 return 0;180180-181181- extern int max1111_read_channel(int);182179183180 /* max1111 accepts channels from 0-3, however,184181 * it is encoded from 0-7 here in the code.
+2-3
arch/arm/mach-pxa/spitz_pm.c
···172172static unsigned long spitz_charger_wakeup(void)173173{174174 unsigned long ret;175175- ret = (!gpio_get_value(SPITZ_GPIO_KEY_INT)175175+ ret = ((!gpio_get_value(SPITZ_GPIO_KEY_INT)176176 << GPIO_bit(SPITZ_GPIO_KEY_INT))177177- | (!gpio_get_value(SPITZ_GPIO_SYNC)178178- << GPIO_bit(SPITZ_GPIO_SYNC));177177+ | gpio_get_value(SPITZ_GPIO_SYNC));179178 return ret;180179}181180
···3535#include <plat/cpu.h>3636#include <plat/s3c244x.h>3737#include <plat/pm.h>3838-#include <plat/watchdog-reset.h>39384039#include <plat/gpio-core.h>4140#include <plat/gpio-cfg.h>···72737374 s3c24xx_gpiocfg_default.set_pull = s3c24xx_gpio_setpull_1up;7475 s3c24xx_gpiocfg_default.get_pull = s3c24xx_gpio_getpull_1up;7575-}7676-7777-void s3c2440_restart(char mode, const char *cmd)7878-{7979- if (mode == 's') {8080- soft_restart(0);8181- }8282-8383- arch_wdt_reset();8484-8585- /* we'll take a jump through zero as a poor second */8686- soft_restart(0);8776}
+12
arch/arm/mach-s3c2440/s3c244x.c
···4646#include <plat/pm.h>4747#include <plat/pll.h>4848#include <plat/nand-core.h>4949+#include <plat/watchdog-reset.h>49505051static struct map_desc s3c244x_iodesc[] __initdata = {5152 IODESC_ENT(CLKPWR),···197196 .suspend = s3c244x_suspend,198197 .resume = s3c244x_resume,199198};199199+200200+void s3c244x_restart(char mode, const char *cmd)201201+{202202+ if (mode == 's')203203+ soft_restart(0);204204+205205+ arch_wdt_reset();206206+207207+ /* we'll take a jump through zero as a poor second */208208+ soft_restart(0);209209+}
···9696{9797 if (soc_is_ar913x())9898 ar913x_wmac_setup();9999- if (soc_is_ar933x())9999+ else if (soc_is_ar933x())100100 ar933x_wmac_setup();101101 else102102 BUG();
+2-2
arch/mips/configs/nlm_xlp_defconfig
···88# CONFIG_SECCOMP is not set99CONFIG_USE_OF=y1010CONFIG_EXPERIMENTAL=y1111-CONFIG_CROSS_COMPILE="mips-linux-gnu-"1111+CONFIG_CROSS_COMPILE=""1212# CONFIG_LOCALVERSION_AUTO is not set1313CONFIG_SYSVIPC=y1414CONFIG_POSIX_MQUEUE=y···2222CONFIG_CGROUPS=y2323CONFIG_NAMESPACES=y2424CONFIG_BLK_DEV_INITRD=y2525-CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlp"2525+CONFIG_INITRAMFS_SOURCE=""2626CONFIG_RD_BZIP2=y2727CONFIG_RD_LZMA=y2828CONFIG_INITRAMFS_COMPRESSION_LZMA=y
+2-2
arch/mips/configs/nlm_xlr_defconfig
···88CONFIG_PREEMPT_VOLUNTARY=y99CONFIG_KEXEC=y1010CONFIG_EXPERIMENTAL=y1111-CONFIG_CROSS_COMPILE="mips-linux-gnu-"1111+CONFIG_CROSS_COMPILE=""1212# CONFIG_LOCALVERSION_AUTO is not set1313CONFIG_SYSVIPC=y1414CONFIG_POSIX_MQUEUE=y···2222CONFIG_NAMESPACES=y2323CONFIG_SCHED_AUTOGROUP=y2424CONFIG_BLK_DEV_INITRD=y2525-CONFIG_INITRAMFS_SOURCE="usr/dev_file_list usr/rootfs.xlr"2525+CONFIG_INITRAMFS_SOURCE=""2626CONFIG_RD_BZIP2=y2727CONFIG_RD_LZMA=y2828CONFIG_INITRAMFS_COMPRESSION_GZIP=y
+1-1
arch/mips/configs/powertv_defconfig
···66CONFIG_PREEMPT=y77# CONFIG_SECCOMP is not set88CONFIG_EXPERIMENTAL=y99-CONFIG_CROSS_COMPILE="mips-linux-"99+CONFIG_CROSS_COMPILE=""1010# CONFIG_SWAP is not set1111CONFIG_SYSVIPC=y1212CONFIG_LOG_BUF_SHIFT=16
+19-1
arch/mips/include/asm/mach-au1x00/gpio-au1300.h
···1111#include <asm/io.h>1212#include <asm/mach-au1x00/au1000.h>13131414+struct gpio;1515+struct gpio_chip;1616+1417/* with the current GPIC design, up to 128 GPIOs are possible.1518 * The only implementation so far is in the Au1300, which has 75 externally1619 * available GPIOs.···206203 return 0;207204}208205209209-static inline void gpio_free(unsigned int gpio)206206+static inline int gpio_request_one(unsigned gpio,207207+ unsigned long flags, const char *label)208208+{209209+ return 0;210210+}211211+212212+static inline int gpio_request_array(struct gpio *array, size_t num)213213+{214214+ return 0;215215+}216216+217217+static inline void gpio_free(unsigned gpio)218218+{219219+}220220+221221+static inline void gpio_free_array(struct gpio *array, size_t num)210222{211223}212224
···7777 long syscallno; /* Syscall number (used by strace) */7878 long dummy; /* Cheap alignment fix */7979};8080-#endif /* __ASSEMBLY__ */81808281/* TODO: Rename this to REDZONE because that's what it is */8382#define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */···8586#define user_mode(regs) (((regs)->sr & SPR_SR_SM) == 0)8687#define user_stack_pointer(regs) ((unsigned long)(regs)->sp)8788#define profile_pc(regs) instruction_pointer(regs)8989+9090+static inline long regs_return_value(struct pt_regs *regs)9191+{9292+ return regs->gpr[11];9393+}9494+9595+#endif /* __ASSEMBLY__ */88968997/*9098 * Offsets used by 'ptrace' system call interface.
···188188 */189189 ret = -1L;190190191191- /* Are these regs right??? */192192- if (unlikely(current->audit_context))193193- audit_syscall_entry(audit_arch(), regs->syscallno,194194- regs->gpr[3], regs->gpr[4],195195- regs->gpr[5], regs->gpr[6]);191191+ audit_syscall_entry(audit_arch(), regs->syscallno,192192+ regs->gpr[3], regs->gpr[4],193193+ regs->gpr[5], regs->gpr[6]);196194197195 return ret ? : regs->syscallno;198196}···199201{200202 int step;201203202202- if (unlikely(current->audit_context))203203- audit_syscall_exit(AUDITSC_RESULT(regs->gpr[11]),204204- regs->gpr[11]);204204+ audit_syscall_exit(regs);205205206206 step = test_thread_flag(TIF_SINGLESTEP);207207 if (step || test_thread_flag(TIF_SYSCALL_TRACE))
+4
arch/parisc/Makefile
···3131UTS_MACHINE := parisc643232CHECKFLAGS += -D__LP64__=1 -m643333WIDTH := 643434+3535+# FIXME: if no default set, should really try to locate dynamically3636+ifeq ($(CROSS_COMPILE),)3437CROSS_COMPILE := hppa64-linux-gnu-3838+endif3539else # 32-bit3640WIDTH :=3741endif
+3
arch/s390/Kconfig
···227227config SYSVIPC_COMPAT228228 def_bool y if COMPAT && SYSVIPC229229230230+config KEYS_COMPAT231231+ def_bool y if COMPAT && KEYS232232+230233config AUDIT_ARCH231234 def_bool y232235
···4848}49495050/* TSC based delay: */5151-static void delay_tsc(unsigned long loops)5151+static void delay_tsc(unsigned long __loops)5252{5353- unsigned long bclock, now;5353+ u32 bclock, now, loops = __loops;5454 int cpu;55555656 preempt_disable();
+3-1
arch/x86/mm/hugetlbpage.c
···333333 * Lookup failure means no vma is above this address,334334 * i.e. return with success:335335 */336336- if (!(vma = find_vma_prev(mm, addr, &prev_vma)))336336+ vma = find_vma(mm, addr);337337+ if (!vma)337338 return addr;338339339340 /*340341 * new region fits between prev_vma->vm_end and341342 * vma->vm_start, use it:342343 */344344+ prev_vma = vma->vm_prev;343345 if (addr + len <= vma->vm_start &&344346 (!prev_vma || (addr >= prev_vma->vm_end))) {345347 /* remember the address as a hint for next time */
+17-5
arch/x86/pci/acpi.c
···6060 DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),6161 },6262 },6363+ /* https://bugzilla.kernel.org/show_bug.cgi?id=42619 */6464+ {6565+ .callback = set_use_crs,6666+ .ident = "MSI MS-7253",6767+ .matches = {6868+ DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),6969+ DMI_MATCH(DMI_BOARD_NAME, "MS-7253"),7070+ DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),7171+ },7272+ },63736474 /* Now for the blacklist.. */6575···292282 int i;293283 struct resource *res, *root, *conflict;294284295295- if (!pci_use_crs)296296- return;297297-298285 coalesce_windows(info, IORESOURCE_MEM);299286 coalesce_windows(info, IORESOURCE_IO);300287···343336 acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource,344337 &info);345338346346- add_resources(&info);347347- return;339339+ if (pci_use_crs) {340340+ add_resources(&info);341341+342342+ return;343343+ }344344+345345+ kfree(info.name);348346349347name_alloc_fail:350348 kfree(info.res);
···136136 * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI.137137 * @is_connected: check for that display is connected or not.138138 * @get_edid: get edid modes from display driver.139139- * @get_timing: get timing object from display driver.139139+ * @get_panel: get panel object from display driver.140140 * @check_timing: check if timing is valid or not.141141 * @power_on: display device on or off.142142 */···145145 bool (*is_connected)(struct device *dev);146146 int (*get_edid)(struct device *dev, struct drm_connector *connector,147147 u8 *edid, int len);148148- void *(*get_timing)(struct device *dev);148148+ void *(*get_panel)(struct device *dev);149149 int (*check_timing)(struct device *dev, void *timing);150150 int (*power_on)(struct device *dev, int mode);151151};
···446446 pg->gtt_start = pci_resource_start(dev->pdev, PSB_GTT_RESOURCE);447447 gtt_pages = pci_resource_len(dev->pdev, PSB_GTT_RESOURCE)448448 >> PAGE_SHIFT;449449- /* Some CDV firmware doesn't report this currently. In which case the450450- system has 64 gtt pages */449449+ /* CDV doesn't report this. In which case the system has 64 gtt pages */451450 if (pg->gtt_start == 0 || gtt_pages == 0) {452452- dev_err(dev->dev, "GTT PCI BAR not initialized.\n");451451+ dev_dbg(dev->dev, "GTT PCI BAR not initialized.\n");453452 gtt_pages = 64;454453 pg->gtt_start = dev_priv->pge_ctl;455454 }···460461461462 if (pg->gatt_pages == 0 || pg->gatt_start == 0) {462463 static struct resource fudge; /* Preferably peppermint */463463- /* This can occur on CDV SDV systems. Fudge it in this case.464464+ /* This can occur on CDV systems. Fudge it in this case.464465 We really don't care what imaginary space is being allocated465466 at this point */466466- dev_err(dev->dev, "GATT PCI BAR not initialized.\n");467467+ dev_dbg(dev->dev, "GATT PCI BAR not initialized.\n");467468 pg->gatt_start = 0x40000000;468469 pg->gatt_pages = (128 * 1024 * 1024) >> PAGE_SHIFT;469470 /* This is a little confusing but in fact the GTT is providing
+12-3
drivers/gpu/drm/i915/intel_display.c
···4680468046814681 crtc = intel_get_crtc_for_plane(dev, plane);46824682 clock = crtc->mode.clock;46834683+ if (!clock) {46844684+ *sprite_wm = 0;46854685+ return false;46864686+ }4683468746844688 line_time_us = (sprite_width * 1000) / clock;46894689+ if (!line_time_us) {46904690+ *sprite_wm = 0;46914691+ return false;46924692+ }46934693+46854694 line_count = (latency_ns / line_time_us + 1000) / 1000;46864695 line_size = sprite_width * pixel_size;46874696···61846175 int i;6185617661866177 /* The clocks have to be on to load the palette. */61876187- if (!crtc->enabled)61786178+ if (!crtc->enabled || !intel_crtc->active)61886179 return;6189618061906181 /* use legacy palette for Ironlake */···65706561 mode_cmd.height = mode->vdisplay;65716562 mode_cmd.pitches[0] = intel_framebuffer_pitch_for_width(mode_cmd.width,65726563 bpp);65736573- mode_cmd.pixel_format = 0;65646564+ mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth);6574656565756566 return intel_framebuffer_create(dev, &mode_cmd, obj);65766567}···8194818581958186 if (intel_enable_rc6(dev_priv->dev))81968187 rc6_mask = GEN6_RC_CTL_RC6_ENABLE |81978197- (IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0;81888188+ ((IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0);8198818981998190 I915_WRITE(GEN6_RC_CONTROL,82008191 rc6_mask |
+1-13
drivers/gpu/drm/i915/intel_ringbuffer.c
···301301302302 I915_WRITE_CTL(ring,303303 ((ring->size - PAGE_SIZE) & RING_NR_PAGES)304304- | RING_REPORT_64K | RING_VALID);304304+ | RING_VALID);305305306306 /* If the head is still not zero, the ring is dead */307307 if ((I915_READ_CTL(ring) & RING_VALID) == 0 ||···11321132 struct drm_device *dev = ring->dev;11331133 struct drm_i915_private *dev_priv = dev->dev_private;11341134 unsigned long end;11351135- u32 head;11361136-11371137- /* If the reported head position has wrapped or hasn't advanced,11381138- * fallback to the slow and accurate path.11391139- */11401140- head = intel_read_status_page(ring, 4);11411141- if (head > ring->head) {11421142- ring->head = head;11431143- ring->space = ring_space(ring);11441144- if (ring->space >= n)11451145- return 0;11461146- }1147113511481136 trace_i915_ring_wait_begin(ring);11491137 if (drm_core_check_feature(dev, DRIVER_GEM))
···10571057 (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_B))10581058 return MODE_OK;10591059 else if (radeon_connector->connector_object_id == CONNECTOR_OBJECT_ID_HDMI_TYPE_A) {10601060- if (ASIC_IS_DCE3(rdev)) {10601060+ if (0) {10611061 /* HDMI 1.3+ supports max clock of 340 Mhz */10621062 if (mode->clock > 340000)10631063 return MODE_CLOCK_HIGH;···11171117 (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) {11181118 struct drm_display_mode *mode;1119111911201120- if (!radeon_dig_connector->edp_on)11211121- atombios_set_edp_panel_power(connector,11221122- ATOM_TRANSMITTER_ACTION_POWER_ON);11231123- ret = radeon_ddc_get_modes(radeon_connector);11241124- if (!radeon_dig_connector->edp_on)11251125- atombios_set_edp_panel_power(connector,11261126- ATOM_TRANSMITTER_ACTION_POWER_OFF);11201120+ if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {11211121+ if (!radeon_dig_connector->edp_on)11221122+ atombios_set_edp_panel_power(connector,11231123+ ATOM_TRANSMITTER_ACTION_POWER_ON);11241124+ ret = radeon_ddc_get_modes(radeon_connector);11251125+ if (!radeon_dig_connector->edp_on)11261126+ atombios_set_edp_panel_power(connector,11271127+ ATOM_TRANSMITTER_ACTION_POWER_OFF);11281128+ } else {11291129+ /* need to setup ddc on the bridge */11301130+ if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) !=11311131+ ENCODER_OBJECT_ID_NONE) {11321132+ if (encoder)11331133+ radeon_atom_ext_encoder_setup_ddc(encoder);11341134+ }11351135+ ret = radeon_ddc_get_modes(radeon_connector);11361136+ }1127113711281138 if (ret > 0) {11291139 if (encoder) {···11441134 return ret;11451135 }1146113611471147- encoder = radeon_best_single_encoder(connector);11481137 if (!encoder)11491138 return 0;11501139
···497497 If you say yes here, you get support for JEDEC JC42.4 compliant498498 temperature sensors, which are used on many DDR3 memory modules for499499 mobile devices and servers. Support will include, but not be limited500500- to, ADT7408, CAT34TS02, CAT6095, MAX6604, MCP9805, MCP98242, MCP98243,501501- MCP9843, SE97, SE98, STTS424(E), TSE2002B3, and TS3000B3.500500+ to, ADT7408, AT30TS00, CAT34TS02, CAT6095, MAX6604, MCP9804, MCP9805,501501+ MCP98242, MCP98243, MCP9843, SE97, SE98, STTS424(E), STTS2002,502502+ STTS3000, TSE2002B3, TSE2002GB2, TS3000B3, and TS3000GB2.502503503504 This driver can also be built as a module. If so, the module504505 will be called jc42.
+75-14
drivers/hwmon/f75375s.c
···178178 i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF));179179}180180181181+static void f75375_write_pwm(struct i2c_client *client, int nr)182182+{183183+ struct f75375_data *data = i2c_get_clientdata(client);184184+ if (data->kind == f75387)185185+ f75375_write16(client, F75375_REG_FAN_EXP(nr), data->pwm[nr]);186186+ else187187+ f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr),188188+ data->pwm[nr]);189189+}190190+181191static struct f75375_data *f75375_update_device(struct device *dev)182192{183193 struct i2c_client *client = to_i2c_client(dev);···264254 return 1500000 / rpm;265255}266256257257+static bool duty_mode_enabled(u8 pwm_enable)258258+{259259+ switch (pwm_enable) {260260+ case 0: /* Manual, duty mode (full speed) */261261+ case 1: /* Manual, duty mode */262262+ case 4: /* Auto, duty mode */263263+ return true;264264+ case 2: /* Auto, speed mode */265265+ case 3: /* Manual, speed mode */266266+ return false;267267+ default:268268+ BUG();269269+ }270270+}271271+272272+static bool auto_mode_enabled(u8 pwm_enable)273273+{274274+ switch (pwm_enable) {275275+ case 0: /* Manual, duty mode (full speed) */276276+ case 1: /* Manual, duty mode */277277+ case 3: /* Manual, speed mode */278278+ return false;279279+ case 2: /* Auto, speed mode */280280+ case 4: /* Auto, duty mode */281281+ return true;282282+ default:283283+ BUG();284284+ }285285+}286286+267287static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr,268288 const char *buf, size_t count)269289{···327287 if (err < 0)328288 return err;329289290290+ if (auto_mode_enabled(data->pwm_enable[nr]))291291+ return -EINVAL;292292+ if (data->kind == f75387 && duty_mode_enabled(data->pwm_enable[nr]))293293+ return -EINVAL;294294+330295 mutex_lock(&data->update_lock);331296 data->fan_target[nr] = rpm_to_reg(val);332297 f75375_write16(client, F75375_REG_FAN_EXP(nr), data->fan_target[nr]);···352307 if (err < 0)353308 return err;354309310310+ if (auto_mode_enabled(data->pwm_enable[nr]) ||311311+ !duty_mode_enabled(data->pwm_enable[nr]))312312+ return -EINVAL;313313+355314 mutex_lock(&data->update_lock);356315 data->pwm[nr] = SENSORS_LIMIT(val, 0, 255);357357- f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr), data->pwm[nr]);316316+ f75375_write_pwm(client, nr);358317 mutex_unlock(&data->update_lock);359318 return count;360319}···376327 struct f75375_data *data = i2c_get_clientdata(client);377328 u8 fanmode;378329379379- if (val < 0 || val > 3)330330+ if (val < 0 || val > 4)380331 return -EINVAL;381332382333 fanmode = f75375_read8(client, F75375_REG_FAN_TIMER);383334 if (data->kind == f75387) {335335+ /* For now, deny dangerous toggling of duty mode */336336+ if (duty_mode_enabled(data->pwm_enable[nr]) !=337337+ duty_mode_enabled(val))338338+ return -EOPNOTSUPP;384339 /* clear each fanX_mode bit before setting them properly */385340 fanmode &= ~(1 << F75387_FAN_DUTY_MODE(nr));386341 fanmode &= ~(1 << F75387_FAN_MANU_MODE(nr));···398345 fanmode |= (1 << F75387_FAN_MANU_MODE(nr));399346 fanmode |= (1 << F75387_FAN_DUTY_MODE(nr));400347 break;401401- case 2: /* AUTOMATIC*/402402- fanmode |= (1 << F75387_FAN_DUTY_MODE(nr));348348+ case 2: /* Automatic, speed mode */403349 break;404350 case 3: /* fan speed */405351 fanmode |= (1 << F75387_FAN_MANU_MODE(nr));352352+ break;353353+ case 4: /* Automatic, pwm */354354+ fanmode |= (1 << F75387_FAN_DUTY_MODE(nr));406355 break;407356 }408357 } else {···423368 break;424369 case 3: /* fan speed */425370 break;371371+ case 4: /* Automatic pwm */372372+ return -EINVAL;426373 }427374 }428375429376 f75375_write8(client, F75375_REG_FAN_TIMER, fanmode);430377 data->pwm_enable[nr] = val;431378 if (val == 0)432432- f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr),433433- data->pwm[nr]);379379+ f75375_write_pwm(client, nr);434380 return 0;435381}436382···782726783727 manu = ((mode >> F75387_FAN_MANU_MODE(nr)) & 1);784728 duty = ((mode >> F75387_FAN_DUTY_MODE(nr)) & 1);785785- if (manu && duty)786786- /* speed */729729+ if (!manu && duty)730730+ /* auto, pwm */731731+ data->pwm_enable[nr] = 4;732732+ else if (manu && !duty)733733+ /* manual, speed */787734 data->pwm_enable[nr] = 3;788788- else if (!manu && duty)789789- /* automatic */735735+ else if (!manu && !duty)736736+ /* automatic, speed */790737 data->pwm_enable[nr] = 2;791738 else792792- /* manual */739739+ /* manual, pwm */793740 data->pwm_enable[nr] = 1;794741 } else {795742 if (!(conf & (1 << F75375_FAN_CTRL_LINEAR(nr))))···817758 set_pwm_enable_direct(client, 0, f75375s_pdata->pwm_enable[0]);818759 set_pwm_enable_direct(client, 1, f75375s_pdata->pwm_enable[1]);819760 for (nr = 0; nr < 2; nr++) {761761+ if (auto_mode_enabled(f75375s_pdata->pwm_enable[nr]) ||762762+ !duty_mode_enabled(f75375s_pdata->pwm_enable[nr]))763763+ continue;820764 data->pwm[nr] = SENSORS_LIMIT(f75375s_pdata->pwm[nr], 0, 255);821821- f75375_write8(client, F75375_REG_FAN_PWM_DUTY(nr),822822- data->pwm[nr]);765765+ f75375_write_pwm(client, nr);823766 }824767825768}···848787 if (err)849788 goto exit_free;850789851851- if (data->kind == f75375) {790790+ if (data->kind != f75373) {852791 err = sysfs_chmod_file(&client->dev.kobj,853792 &sensor_dev_attr_pwm1_mode.dev_attr.attr,854793 S_IRUGO | S_IWUSR);
···3333struct zl6100_data {3434 int id;3535 ktime_t access; /* chip access time */3636+ int delay; /* Delay between chip accesses in uS */3637 struct pmbus_driver_info info;3738};3839···5352/* Some chips need a delay between accesses */5453static inline void zl6100_wait(const struct zl6100_data *data)5554{5656- if (delay) {5555+ if (data->delay) {5756 s64 delta = ktime_us_delta(ktime_get(), data->access);5858- if (delta < delay)5959- udelay(delay - delta);5757+ if (delta < data->delay)5858+ udelay(data->delay - delta);6059 }6160}6261···208207 * can be cleared later for additional chips if tests show that it209208 * is not needed (in other words, better be safe than sorry).210209 */210210+ data->delay = delay;211211 if (data->id == zl2004 || data->id == zl6105)212212- delay = 0;212212+ data->delay = 0;213213214214 /*215215 * Since there was a direct I2C device access above, wait before
···952952953953 /*954954 * First try "E6 report".955955- * ALPS should return 0,0,10 or 0,0,100955955+ * ALPS should return 0,0,10 or 0,0,100 if no buttons are pressed.956956+ * The bits 0-2 of the first byte will be 1s if some buttons are957957+ * pressed.956958 */957959 param[0] = 0;958960 if (ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES) ||···970968 psmouse_dbg(psmouse, "E6 report: %2.2x %2.2x %2.2x",971969 param[0], param[1], param[2]);972970973973- if (param[0] != 0 || param[1] != 0 || (param[2] != 10 && param[2] != 100))971971+ if ((param[0] & 0xf8) != 0 || param[1] != 0 ||972972+ (param[2] != 10 && param[2] != 100))974973 return NULL;975974976975 /*
+2
drivers/input/tablet/Kconfig
···7777 tristate "Wacom Intuos/Graphire tablet support (USB)"7878 depends on USB_ARCH_HAS_HCD7979 select USB8080+ select NEW_LEDS8181+ select LEDS_CLASS8082 help8183 Say Y here if you want to use the USB version of the Wacom Intuos8284 or Graphire tablet. Make sure to say Y to "Mouse support"
+1-1
drivers/input/tablet/wacom_wac.c
···926926{927927 struct input_dev *input = wacom->input;928928 unsigned char *data = wacom->data;929929- int count = data[1] & 0x03;929929+ int count = data[1] & 0x07;930930 int i;931931932932 if (data[0] != 0x02)
+1-1
drivers/iommu/amd_iommu_init.c
···275275}276276277277/* Programs the physical address of the device table into the IOMMU hardware */278278-static void __init iommu_set_device_table(struct amd_iommu *iommu)278278+static void iommu_set_device_table(struct amd_iommu *iommu)279279{280280 u64 entry;281281
···1223122312241224 return platform_driver_register(&omap_iommu_driver);12251225}12261226-module_init(omap_iommu_init);12261226+/* must be ready before omap3isp is probed */12271227+subsys_initcall(omap_iommu_init);1227122812281229static void __exit omap_iommu_exit(void)12291230{
+1-1
drivers/md/dm-flakey.c
···323323 * Corrupt successful READs while in down state.324324 * If flags were specified, only corrupt those that match.325325 */326326- if (!error && bio_submitted_while_down &&326326+ if (fc->corrupt_bio_byte && !error && bio_submitted_while_down &&327327 (bio_data_dir(bio) == READ) && (fc->corrupt_bio_rw == READ) &&328328 all_corrupt_bio_flags_match(bio, fc))329329 corrupt_bio_data(bio, fc);
+16-7
drivers/md/dm-io.c
···296296 unsigned offset;297297 unsigned num_bvecs;298298 sector_t remaining = where->count;299299+ struct request_queue *q = bdev_get_queue(where->bdev);300300+ sector_t discard_sectors;299301300302 /*301303 * where->count may be zero if rw holds a flush and we need to···307305 /*308306 * Allocate a suitably sized-bio.309307 */310310- num_bvecs = dm_sector_div_up(remaining,311311- (PAGE_SIZE >> SECTOR_SHIFT));312312- num_bvecs = min_t(int, bio_get_nr_vecs(where->bdev), num_bvecs);308308+ if (rw & REQ_DISCARD)309309+ num_bvecs = 1;310310+ else311311+ num_bvecs = min_t(int, bio_get_nr_vecs(where->bdev),312312+ dm_sector_div_up(remaining, (PAGE_SIZE >> SECTOR_SHIFT)));313313+313314 bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios);314315 bio->bi_sector = where->sector + (where->count - remaining);315316 bio->bi_bdev = where->bdev;···320315 bio->bi_destructor = dm_bio_destructor;321316 store_io_and_region_in_bio(bio, io, region);322317323323- /*324324- * Try and add as many pages as possible.325325- */326326- while (remaining) {318318+ if (rw & REQ_DISCARD) {319319+ discard_sectors = min_t(sector_t, q->limits.max_discard_sectors, remaining);320320+ bio->bi_size = discard_sectors << SECTOR_SHIFT;321321+ remaining -= discard_sectors;322322+ } else while (remaining) {323323+ /*324324+ * Try and add as many pages as possible.325325+ */327326 dp->get_page(dp, &page, &len, &offset);328327 len = min(len, to_bytes(remaining));329328 if (!bio_add_page(bio, page, len, offset))
···123123 }124124125125 if (!cell->ignore_resource_conflicts) {126126- ret = acpi_check_resource_conflict(res);126126+ ret = acpi_check_resource_conflict(&res[r]);127127 if (ret)128128 goto fail_res;129129 }
+1-1
drivers/mfd/s5m-core.c
···105105 s5m87xx->rtc = i2c_new_dummy(i2c->adapter, RTC_I2C_ADDR);106106 i2c_set_clientdata(s5m87xx->rtc, s5m87xx);107107108108- if (pdata->cfg_pmic_irq)108108+ if (pdata && pdata->cfg_pmic_irq)109109 pdata->cfg_pmic_irq();110110111111 s5m_irq_init(s5m87xx);
···256256 break;257257 }258258259259+ switch (wm8994->type) {260260+ case WM1811:261261+ ret = wm8994_reg_read(wm8994, WM8994_ANTIPOP_2);262262+ if (ret < 0) {263263+ dev_err(dev, "Failed to read jackdet: %d\n", ret);264264+ } else if (ret & WM1811_JACKDET_MODE_MASK) {265265+ dev_dbg(dev, "CODEC still active, ignoring suspend\n");266266+ return 0;267267+ }268268+ break;269269+ default:270270+ break;271271+ }272272+259273 /* Disable LDO pulldowns while the device is suspended if we260274 * don't know that something will be driving them. */261275 if (!wm8994->ldo_ena_always_driven)
+1
drivers/mfd/wm8994-regmap.c
···806806 case WM8994_DC_SERVO_2:807807 case WM8994_DC_SERVO_READBACK:808808 case WM8994_DC_SERVO_4:809809+ case WM8994_DC_SERVO_4E:809810 case WM8994_ANALOGUE_HP_1:810811 case WM8958_MIC_DETECT_1:811812 case WM8958_MIC_DETECT_2:
···20682068 */20692069 mmc_hw_reset_for_init(host);2070207020712071+ /* Initialization should be done at 3.3 V I/O voltage. */20722072+ mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);20732073+20712074 /*20722075 * sdio_reset sends CMD52 to reset card. Since we do not know20732076 * if the card is being re-initialized, just send it. CMD52
+2-2
drivers/mmc/core/host.c
···238238 /* Hold MCI clock for 8 cycles by default */239239 host->clk_delay = 8;240240 /*241241- * Default clock gating delay is 200ms.241241+ * Default clock gating delay is 0ms to avoid wasting power.242242 * This value can be tuned by writing into sysfs entry.243243 */244244- host->clkgate_delay = 200;244244+ host->clkgate_delay = 0;245245 host->clk_gated = false;246246 INIT_DELAYED_WORK(&host->clk_gate_work, mmc_host_clk_gate_work);247247 spin_lock_init(&host->clk_lock);
+3
drivers/mmc/core/mmc.c
···816816 if (!mmc_host_is_spi(host))817817 mmc_set_bus_mode(host, MMC_BUSMODE_OPENDRAIN);818818819819+ /* Initialization should be done at 3.3 V I/O voltage. */820820+ mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);821821+819822 /*820823 * Since we're changing the OCR value, we seem to821824 * need to tell some cards to go back to the idle
+3-5
drivers/mmc/core/sd.c
···911911 BUG_ON(!host);912912 WARN_ON(!host->claimed);913913914914+ /* The initialization should be done at 3.3 V I/O voltage. */915915+ mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);916916+914917 err = mmc_sd_get_cid(host, ocr, cid, &rocr);915918 if (err)916919 return err;···1158115511591156 BUG_ON(!host);11601157 WARN_ON(!host->claimed);11611161-11621162- /* Make sure we are at 3.3V signalling voltage */11631163- err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, false);11641164- if (err)11651165- return err;1166115811671159 /* Disable preset value enable if already set since last time */11681160 if (host->ops->enable_preset_value) {
+8
drivers/mmc/core/sdio.c
···585585 * Inform the card of the voltage586586 */587587 if (!powered_resume) {588588+ /* The initialization should be done at 3.3 V I/O voltage. */589589+ mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);590590+588591 err = mmc_send_io_op_cond(host, host->ocr, &ocr);589592 if (err)590593 goto err;···999996 * With these steps taken, mmc_select_voltage() is also required to1000997 * restore the correct voltage setting of the card.1001998 */999999+10001000+ /* The initialization should be done at 3.3 V I/O voltage. */10011001+ if (!mmc_card_keep_power(host))10021002+ mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330, 0);10031003+10021004 sdio_reset(host);10031005 mmc_go_idle(host);10041006 mmc_send_if_cond(host, host->ocr_avail);
+10-11
drivers/mmc/host/atmel-mci.c
···19481948 }19491949}1950195019511951-static void atmci_configure_dma(struct atmel_mci *host)19511951+static bool atmci_configure_dma(struct atmel_mci *host)19521952{19531953 struct mci_platform_data *pdata;1954195419551955 if (host == NULL)19561956- return;19561956+ return false;1957195719581958 pdata = host->pdev->dev.platform_data;19591959···19701970 host->dma.chan =19711971 dma_request_channel(mask, atmci_filter, pdata->dma_slave);19721972 }19731973- if (!host->dma.chan)19741974- dev_notice(&host->pdev->dev, "DMA not available, using PIO\n");19751975- else19731973+ if (!host->dma.chan) {19741974+ dev_warn(&host->pdev->dev, "no DMA channel available\n");19751975+ return false;19761976+ } else {19761977 dev_info(&host->pdev->dev,19771978 "Using %s for DMA transfers\n",19781979 dma_chan_name(host->dma.chan));19801980+ return true;19811981+ }19791982}1980198319811984static inline unsigned int atmci_get_version(struct atmel_mci *host)···2088208520892086 /* Get MCI capabilities and set operations according to it */20902087 atmci_get_cap(host);20912091- if (host->caps.has_dma) {20922092- dev_info(&pdev->dev, "using DMA\n");20882088+ if (host->caps.has_dma && atmci_configure_dma(host)) {20932089 host->prepare_data = &atmci_prepare_data_dma;20942090 host->submit_data = &atmci_submit_data_dma;20952091 host->stop_transfer = &atmci_stop_transfer_dma;···20982096 host->submit_data = &atmci_submit_data_pdc;20992097 host->stop_transfer = &atmci_stop_transfer_pdc;21002098 } else {21012101- dev_info(&pdev->dev, "no DMA, no PDC\n");20992099+ dev_info(&pdev->dev, "using PIO\n");21022100 host->prepare_data = &atmci_prepare_data;21032101 host->submit_data = &atmci_submit_data;21042102 host->stop_transfer = &atmci_stop_transfer;21052103 }21062106-21072107- if (host->caps.has_dma)21082108- atmci_configure_dma(host);2109210421102105 platform_set_drvdata(pdev, host);21112106
+4-3
drivers/mmc/host/mmci.c
···12711271 /*12721272 * Block size can be up to 2048 bytes, but must be a power of two.12731273 */12741274- mmc->max_blk_size = 2048;12741274+ mmc->max_blk_size = 1 << 11;1275127512761276 /*12771277- * No limit on the number of blocks transferred.12771277+ * Limit the number of blocks transferred so that we don't overflow12781278+ * the maximum request size.12781279 */12791279- mmc->max_blk_count = mmc->max_req_size;12801280+ mmc->max_blk_count = mmc->max_req_size >> 11;1280128112811282 spin_lock_init(&host->lock);12821283
+3-2
drivers/mmc/host/sdhci-esdhc-imx.c
···269269 imx_data->scratchpad = val;270270 return;271271 case SDHCI_COMMAND:272272- if ((host->cmd->opcode == MMC_STOP_TRANSMISSION)273273- && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))272272+ if ((host->cmd->opcode == MMC_STOP_TRANSMISSION ||273273+ host->cmd->opcode == MMC_SET_BLOCK_COUNT) &&274274+ (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))274275 val |= SDHCI_CMD_ABORTCMD;275276276277 if (is_imx6q_usdhc(imx_data)) {
···4455config NET_PACKET_ENGINE66 bool "Packet Engine devices"77+ default y78 depends on PCI89 ---help---910 If you have a network (Ethernet) card belonging to this class, say Y
+2-3
drivers/net/ethernet/qlogic/qla3xxx.c
···30173017 (void __iomem *)port_regs;30183018 u32 delay = 10;30193019 int status = 0;30203020- unsigned long hw_flags = 0;3021302030223021 if (ql_mii_setup(qdev))30233022 return -1;···32273228 value = ql_read_page0_reg(qdev, &port_regs->portStatus);32283229 if (value & PORT_STATUS_IC)32293230 break;32303230- spin_unlock_irqrestore(&qdev->hw_lock, hw_flags);32313231+ spin_unlock_irq(&qdev->hw_lock);32313232 msleep(500);32323232- spin_lock_irqsave(&qdev->hw_lock, hw_flags);32333233+ spin_lock_irq(&qdev->hw_lock);32333234 } while (--delay);3234323532353236 if (delay == 0) {
···830830 ctx->l4_hdr_size = ((struct tcphdr *)831831 skb_transport_header(skb))->doff * 4;832832 else if (iph->protocol == IPPROTO_UDP)833833- /*834834- * Use tcp header size so that bytes to835835- * be copied are more than required by836836- * the device.837837- */838833 ctx->l4_hdr_size =839839- sizeof(struct tcphdr);834834+ sizeof(struct udphdr);840835 else841836 ctx->l4_hdr_size = 0;842837 } else {
+2-2
drivers/net/vmxnet3/vmxnet3_int.h
···7070/*7171 * Version numbers7272 */7373-#define VMXNET3_DRIVER_VERSION_STRING "1.1.18.0-k"7373+#define VMXNET3_DRIVER_VERSION_STRING "1.1.29.0-k"74747575/* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */7676-#define VMXNET3_DRIVER_VERSION_NUM 0x010112007676+#define VMXNET3_DRIVER_VERSION_NUM 0x01011D0077777878#if defined(CONFIG_PCI_MSI)7979 /* RSS only makes sense if MSI-X is supported. */
···12201220 cancel_work_sync(&rt2x00dev->rxdone_work);12211221 cancel_work_sync(&rt2x00dev->txdone_work);12221222 }12231223- destroy_workqueue(rt2x00dev->workqueue);12231223+ if (rt2x00dev->workqueue)12241224+ destroy_workqueue(rt2x00dev->workqueue);1224122512251226 /*12261227 * Free the tx status fifo.
···260260 * the LDO activate bit to implment the changes on the261261 * LDO output.262262 */263263- return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0,264264- info->activate_bit);263263+ return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG,264264+ info->activate_bit, info->activate_bit);265265}266266267267static int da9052_set_dcdc_voltage(struct regulator_dev *rdev,···280280 * the DCDC activate bit to implment the changes on the281281 * DCDC output.282282 */283283- return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, 0,284284- info->activate_bit);283283+ return da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG,284284+ info->activate_bit, info->activate_bit);285285}286286287287static int da9052_get_regulator_voltage_sel(struct regulator_dev *rdev)
···365365366366config PPC_EARLY_DEBUG_EHV_BC367367 bool "Early console (udbg) support for ePAPR hypervisors"368368- depends on PPC_EPAPR_HV_BYTECHAN368368+ depends on PPC_EPAPR_HV_BYTECHAN=y369369 help370370 Select this option to enable early console (a.k.a. "udbg") support371371 via an ePAPR byte channel. You also need to choose the byte channel
+2-9
drivers/usb/host/ehci-fsl.c
···239239 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]);240240}241241242242-static int ehci_fsl_usb_setup(struct ehci_hcd *ehci)242242+static void ehci_fsl_usb_setup(struct ehci_hcd *ehci)243243{244244 struct usb_hcd *hcd = ehci_to_hcd(ehci);245245 struct fsl_usb2_platform_data *pdata;···299299#endif300300 out_be32(non_ehci + FSL_SOC_USB_SICTRL, 0x00000001);301301 }302302-303303- if (!(in_be32(non_ehci + FSL_SOC_USB_CTRL) & CTRL_PHY_CLK_VALID)) {304304- printk(KERN_WARNING "fsl-ehci: USB PHY clock invalid\n");305305- return -ENODEV;306306- }307307- return 0;308302}309303310304/* called after powerup, by probe or system-pm "wakeup" */311305static int ehci_fsl_reinit(struct ehci_hcd *ehci)312306{313313- if (ehci_fsl_usb_setup(ehci))314314- return -ENODEV;307307+ ehci_fsl_usb_setup(ehci);315308 ehci_port_power(ehci, 0);316309317310 return 0;
···12121313config PANEL_DVI1414 tristate "DVI output"1515- depends on OMAP2_DSS_DPI1515+ depends on OMAP2_DSS_DPI && I2C1616 help1717 Driver for external monitors, connected via DVI. The driver uses i2c1818 to read EDID information from the monitor.
···165165166166 DSSDBG("hdmi_runtime_get\n");167167168168+ /*169169+ * HACK: Add dss_runtime_get() to ensure DSS clock domain is enabled.170170+ * This should be removed later.171171+ */172172+ r = dss_runtime_get();173173+ if (r < 0)174174+ goto err_get_dss;175175+168176 r = pm_runtime_get_sync(&hdmi.pdev->dev);169177 WARN_ON(r < 0);170170- return r < 0 ? r : 0;178178+ if (r < 0)179179+ goto err_get_hdmi;180180+181181+ return 0;182182+183183+err_get_hdmi:184184+ dss_runtime_put();185185+err_get_dss:186186+ return r;171187}172188173189static void hdmi_runtime_put(void)···194178195179 r = pm_runtime_put_sync(&hdmi.pdev->dev);196180 WARN_ON(r < 0);181181+182182+ /*183183+ * HACK: This is added to complement the dss_runtime_get() call in184184+ * hdmi_runtime_get(). This should be removed later.185185+ */186186+ dss_runtime_put();197187}198188199189int hdmi_init_display(struct omap_dss_device *dssdev)
+1-8
drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
···479479480480bool ti_hdmi_4xxx_detect(struct hdmi_ip_data *ip_data)481481{482482- int r;483483-484484- void __iomem *base = hdmi_core_sys_base(ip_data);485485-486486- /* HPD */487487- r = REG_GET(base, HDMI_CORE_SYS_SYS_STAT, 1, 1);488488-489489- return r == 1;482482+ return gpio_get_value(ip_data->hpd_gpio);490483}491484492485static void hdmi_core_init(struct hdmi_core_video_config *video_cfg,
+4
drivers/video/via/hw.c
···18101810 break;18111811 }1812181218131813+ /* magic required on VX900 for correct modesetting on IGA1 */18141814+ via_write_reg_mask(VIACR, 0x45, 0x00, 0x01);18151815+18131816 /* probably this should go to the scaling code one day */18171817+ via_write_reg_mask(VIACR, 0xFD, 0, 0x80); /* VX900 hw scale on IGA2 */18141818 viafb_write_regx(scaling_parameters, ARRAY_SIZE(scaling_parameters));1815181918161820 /* Fill VPIT Parameters */
+22-11
drivers/virtio/virtio_balloon.c
···367367#ifdef CONFIG_PM368368static int virtballoon_freeze(struct virtio_device *vdev)369369{370370+ struct virtio_balloon *vb = vdev->priv;371371+370372 /*371373 * The kthread is already frozen by the PM core before this372374 * function is called.373375 */376376+377377+ while (vb->num_pages)378378+ leak_balloon(vb, vb->num_pages);379379+ update_balloon_size(vb);374380375381 /* Ensure we don't get any more requests from the host */376382 vdev->config->reset(vdev);···384378 return 0;385379}386380381381+static int restore_common(struct virtio_device *vdev)382382+{383383+ struct virtio_balloon *vb = vdev->priv;384384+ int ret;385385+386386+ ret = init_vqs(vdev->priv);387387+ if (ret)388388+ return ret;389389+390390+ fill_balloon(vb, towards_target(vb));391391+ update_balloon_size(vb);392392+ return 0;393393+}394394+387395static int virtballoon_thaw(struct virtio_device *vdev)388396{389389- return init_vqs(vdev->priv);397397+ return restore_common(vdev);390398}391399392400static int virtballoon_restore(struct virtio_device *vdev)393401{394402 struct virtio_balloon *vb = vdev->priv;395395- struct page *page, *page2;396396-397397- /* We're starting from a clean slate */398398- vb->num_pages = 0;399403400404 /*401405 * If a request wasn't complete at the time of freezing, this···413397 */414398 vb->need_stats_update = 0;415399416416- /* We don't have these pages in the balloon anymore! */417417- list_for_each_entry_safe(page, page2, &vb->pages, lru) {418418- list_del(&page->lru);419419- totalram_pages++;420420- }421421- return init_vqs(vdev->priv);400400+ return restore_common(vdev);422401}423402#endif424403
+1-1
drivers/watchdog/Kconfig
···10981098 For Freescale Book-E processors, this is a number between 0 and 63.10991099 For other Book-E processors, this is a number between 0 and 3.1100110011011101- The value can be overidden by the wdt_period command-line parameter.11011101+ The value can be overridden by the wdt_period command-line parameter.1102110211031103# PPC64 Architecture11041104
···264264 wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);265265 if (wdt_mem == NULL) {266266 printk(KERN_INFO MODULE_NAME267267- "failed to get memory region resouce\n");267267+ "failed to get memory region resource\n");268268 return -ENOENT;269269 }270270
+31-26
drivers/watchdog/s3c2410_wdt.c
···312312 dev = &pdev->dev;313313 wdt_dev = &pdev->dev;314314315315- /* get the memory region for the watchdog timer */316316-317315 wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);318316 if (wdt_mem == NULL) {319317 dev_err(dev, "no memory resource specified\n");320318 return -ENOENT;321319 }322320321321+ wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);322322+ if (wdt_irq == NULL) {323323+ dev_err(dev, "no irq resource specified\n");324324+ ret = -ENOENT;325325+ goto err;326326+ }327327+328328+ /* get the memory region for the watchdog timer */329329+323330 size = resource_size(wdt_mem);324331 if (!request_mem_region(wdt_mem->start, size, pdev->name)) {325332 dev_err(dev, "failed to get memory region\n");326326- return -EBUSY;333333+ ret = -EBUSY;334334+ goto err;327335 }328336329337 wdt_base = ioremap(wdt_mem->start, size);···343335344336 DBG("probe: mapped wdt_base=%p\n", wdt_base);345337346346- wdt_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);347347- if (wdt_irq == NULL) {348348- dev_err(dev, "no irq resource specified\n");349349- ret = -ENOENT;350350- goto err_map;351351- }352352-353353- ret = request_irq(wdt_irq->start, s3c2410wdt_irq, 0, pdev->name, pdev);354354- if (ret != 0) {355355- dev_err(dev, "failed to install irq (%d)\n", ret);356356- goto err_map;357357- }358358-359338 wdt_clock = clk_get(&pdev->dev, "watchdog");360339 if (IS_ERR(wdt_clock)) {361340 dev_err(dev, "failed to find watchdog clock source\n");362341 ret = PTR_ERR(wdt_clock);363363- goto err_irq;342342+ goto err_map;364343 }365344366345 clk_enable(wdt_clock);367346368368- if (s3c2410wdt_cpufreq_register() < 0) {347347+ ret = s3c2410wdt_cpufreq_register();348348+ if (ret < 0) {369349 printk(KERN_ERR PFX "failed to register cpufreq\n");370350 goto err_clk;371351 }···374378 "cannot start\n");375379 }376380381381+ ret = request_irq(wdt_irq->start, s3c2410wdt_irq, 0, pdev->name, pdev);382382+ if (ret != 0) {383383+ dev_err(dev, "failed to install irq (%d)\n", ret);384384+ goto err_cpufreq;385385+ }386386+377387 watchdog_set_nowayout(&s3c2410_wdd, nowayout);378388379389 ret = watchdog_register_device(&s3c2410_wdd);380390 if (ret) {381391 dev_err(dev, "cannot register watchdog (%d)\n", ret);382382- goto err_cpufreq;392392+ goto err_irq;383393 }384394385395 if (tmr_atboot && started == 0) {···410408411409 return 0;412410411411+ err_irq:412412+ free_irq(wdt_irq->start, pdev);413413+413414 err_cpufreq:414415 s3c2410wdt_cpufreq_deregister();415416416417 err_clk:417418 clk_disable(wdt_clock);418419 clk_put(wdt_clock);419419-420420- err_irq:421421- free_irq(wdt_irq->start, pdev);420420+ wdt_clock = NULL;422421423422 err_map:424423 iounmap(wdt_base);425424426425 err_req:427426 release_mem_region(wdt_mem->start, size);428428- wdt_mem = NULL;429427428428+ err:429429+ wdt_irq = NULL;430430+ wdt_mem = NULL;430431 return ret;431432}432433···437432{438433 watchdog_unregister_device(&s3c2410_wdd);439434435435+ free_irq(wdt_irq->start, dev);436436+440437 s3c2410wdt_cpufreq_deregister();441438442439 clk_disable(wdt_clock);443440 clk_put(wdt_clock);444441 wdt_clock = NULL;445442446446- free_irq(wdt_irq->start, dev);447447- wdt_irq = NULL;448448-449443 iounmap(wdt_base);450444451445 release_mem_region(wdt_mem->start, resource_size(wdt_mem));446446+ wdt_irq = NULL;452447 wdt_mem = NULL;453448 return 0;454449}
+12-12
fs/aio.c
···228228 call_rcu(&ctx->rcu_head, ctx_rcu_free);229229}230230231231-static inline void get_ioctx(struct kioctx *kioctx)232232-{233233- BUG_ON(atomic_read(&kioctx->users) <= 0);234234- atomic_inc(&kioctx->users);235235-}236236-237231static inline int try_get_ioctx(struct kioctx *kioctx)238232{239233 return atomic_inc_not_zero(&kioctx->users);···267273 mm = ctx->mm = current->mm;268274 atomic_inc(&mm->mm_count);269275270270- atomic_set(&ctx->users, 1);276276+ atomic_set(&ctx->users, 2);271277 spin_lock_init(&ctx->ctx_lock);272278 spin_lock_init(&ctx->ring_info.ring_lock);273279 init_waitqueue_head(&ctx->wait);···484490 kmem_cache_free(kiocb_cachep, req);485491 ctx->reqs_active--;486492 }493493+ if (unlikely(!ctx->reqs_active && ctx->dead))494494+ wake_up_all(&ctx->wait);487495 spin_unlock_irq(&ctx->ctx_lock);488496}489497···603607 fput(req->ki_filp);604608605609 /* Link the iocb into the context's free list */610610+ rcu_read_lock();606611 spin_lock_irq(&ctx->ctx_lock);607612 really_put_req(ctx, req);613613+ /*614614+ * at that point ctx might've been killed, but actual615615+ * freeing is RCU'd616616+ */608617 spin_unlock_irq(&ctx->ctx_lock);618618+ rcu_read_unlock();609619610610- put_ioctx(ctx);611620 spin_lock_irq(&fput_lock);612621 }613622 spin_unlock_irq(&fput_lock);···643642 * this function will be executed w/out any aio kthread wakeup.644643 */645644 if (unlikely(!fput_atomic(req->ki_filp))) {646646- get_ioctx(ctx);647645 spin_lock(&fput_lock);648646 list_add(&req->ki_list, &fput_head);649647 spin_unlock(&fput_lock);···13361336 ret = PTR_ERR(ioctx);13371337 if (!IS_ERR(ioctx)) {13381338 ret = put_user(ioctx->user_id, ctxp);13391339- if (!ret)13391339+ if (!ret) {13401340+ put_ioctx(ioctx);13401341 return 0;13411341-13421342- get_ioctx(ioctx); /* io_destroy() expects us to hold a ref */13421342+ }13431343 io_destroy(ioctx);13441344 }13451345
···584584 * If either that or op not supported returned, follow585585 * the normal lookup.586586 */587587- if ((rc == 0) || (rc == -ENOENT))587587+ switch (rc) {588588+ case 0:589589+ /*590590+ * The server may allow us to open things like591591+ * FIFOs, but the client isn't set up to deal592592+ * with that. If it's not a regular file, just593593+ * close it and proceed as if it were a normal594594+ * lookup.595595+ */596596+ if (newInode && !S_ISREG(newInode->i_mode)) {597597+ CIFSSMBClose(xid, pTcon, fileHandle);598598+ break;599599+ }600600+ case -ENOENT:588601 posix_open = true;589589- else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP))602602+ case -EOPNOTSUPP:603603+ break;604604+ default:590605 pTcon->broken_posix_open = true;606606+ }591607 }592608 if (!posix_open)593609 rc = cifs_get_inode_info_unix(&newInode, full_path,
+19-9
fs/cifs/inode.c
···534534 if (fattr->cf_cifsattrs & ATTR_DIRECTORY) {535535 fattr->cf_mode = S_IFDIR | cifs_sb->mnt_dir_mode;536536 fattr->cf_dtype = DT_DIR;537537+ /*538538+ * Server can return wrong NumberOfLinks value for directories539539+ * when Unix extensions are disabled - fake it.540540+ */541541+ fattr->cf_nlink = 2;537542 } else {538543 fattr->cf_mode = S_IFREG | cifs_sb->mnt_file_mode;539544 fattr->cf_dtype = DT_REG;···546541 /* clear write bits if ATTR_READONLY is set */547542 if (fattr->cf_cifsattrs & ATTR_READONLY)548543 fattr->cf_mode &= ~(S_IWUGO);549549- }550544551551- fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks);545545+ fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks);546546+ }552547553548 fattr->cf_uid = cifs_sb->mnt_uid;554549 fattr->cf_gid = cifs_sb->mnt_gid;···13271322 }13281323/*BB check (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID ) to see if need13291324 to set uid/gid */13301330- inc_nlink(inode);1331132513321326 cifs_unix_basic_to_fattr(&fattr, pInfo, cifs_sb);13331327 cifs_fill_uniqueid(inode->i_sb, &fattr);···13591355 d_drop(direntry);13601356 } else {13611357mkdir_get_info:13621362- inc_nlink(inode);13631358 if (pTcon->unix_ext)13641359 rc = cifs_get_inode_info_unix(&newinode, full_path,13651360 inode->i_sb, xid);···14391436 }14401437 }14411438mkdir_out:14391439+ /*14401440+ * Force revalidate to get parent dir info when needed since cached14411441+ * attributes are invalid now.14421442+ */14431443+ CIFS_I(inode)->time = 0;14421444 kfree(full_path);14431445 FreeXid(xid);14441446 cifs_put_tlink(tlink);···14831475 cifs_put_tlink(tlink);1484147614851477 if (!rc) {14861486- drop_nlink(inode);14871478 spin_lock(&direntry->d_inode->i_lock);14881479 i_size_write(direntry->d_inode, 0);14891480 clear_nlink(direntry->d_inode);···14901483 }1491148414921485 cifsInode = CIFS_I(direntry->d_inode);14931493- cifsInode->time = 0; /* force revalidate to go get info when14941494- needed */14861486+ /* force revalidate to go get info when needed */14871487+ cifsInode->time = 0;1495148814961489 cifsInode = CIFS_I(inode);14971497- cifsInode->time = 0; /* force revalidate to get parent dir info14981498- since cached search results now invalid */14901490+ /*14911491+ * Force revalidate to get parent dir info when needed since cached14921492+ * attributes are invalid now.14931493+ */14941494+ cifsInode->time = 0;1499149515001496 direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime =15011497 current_fs_time(inode->i_sb);
+28-5
fs/dcache.c
···104104105105static struct hlist_bl_head *dentry_hashtable __read_mostly;106106107107-static inline struct hlist_bl_head *d_hash(struct dentry *parent,107107+static inline struct hlist_bl_head *d_hash(const struct dentry *parent,108108 unsigned long hash)109109{110110 hash += ((unsigned long) parent ^ GOLDEN_RATIO_PRIME) / L1_CACHE_BYTES;···136136 return proc_dointvec(table, write, buffer, lenp, ppos);137137}138138#endif139139+140140+/*141141+ * Compare 2 name strings, return 0 if they match, otherwise non-zero.142142+ * The strings are both count bytes long, and count is non-zero.143143+ */144144+static inline int dentry_cmp(const unsigned char *cs, size_t scount,145145+ const unsigned char *ct, size_t tcount)146146+{147147+ if (scount != tcount)148148+ return 1;149149+150150+ do {151151+ if (*cs != *ct)152152+ return 1;153153+ cs++;154154+ ct++;155155+ tcount--;156156+ } while (tcount);157157+ return 0;158158+}139159140160static void __d_free(struct rcu_head *head)141161{···17371717 * child is looked up. Thus, an interlocking stepping of sequence lock checks17381718 * is formed, giving integrity down the path walk.17391719 */17401740-struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name,17411741- unsigned *seq, struct inode **inode)17201720+struct dentry *__d_lookup_rcu(const struct dentry *parent,17211721+ const struct qstr *name,17221722+ unsigned *seqp, struct inode **inode)17421723{17431724 unsigned int len = name->len;17441725 unsigned int hash = name->hash;···17691748 * See Documentation/filesystems/path-lookup.txt for more details.17701749 */17711750 hlist_bl_for_each_entry_rcu(dentry, node, b, d_hash) {17511751+ unsigned seq;17721752 struct inode *i;17731753 const char *tname;17741754 int tlen;···17781756 continue;1779175717801758seqretry:17811781- *seq = read_seqcount_begin(&dentry->d_seq);17591759+ seq = read_seqcount_begin(&dentry->d_seq);17821760 if (dentry->d_parent != parent)17831761 continue;17841762 if (d_unhashed(dentry))···17931771 * edge of memory when walking. If we could load this17941772 * atomically some other way, we could drop this check.17951773 */17961796- if (read_seqcount_retry(&dentry->d_seq, *seq))17741774+ if (read_seqcount_retry(&dentry->d_seq, seq))17971775 goto seqretry;17981776 if (unlikely(parent->d_flags & DCACHE_OP_COMPARE)) {17991777 if (parent->d_op->d_compare(parent, *inode,···18101788 * order to do anything useful with the returned dentry18111789 * anyway.18121790 */17911791+ *seqp = seq;18131792 *inode = i;18141793 return dentry;18151794 }
+1-1
fs/ecryptfs/miscdev.c
···429429 goto memdup;430430 } else if (count < MIN_MSG_PKT_SIZE || count > MAX_MSG_PKT_SIZE) {431431 printk(KERN_WARNING "%s: Acceptable packet size range is "432432- "[%d-%lu], but amount of data written is [%zu].",432432+ "[%d-%zu], but amount of data written is [%zu].",433433 __func__, MIN_MSG_PKT_SIZE, MAX_MSG_PKT_SIZE, count);434434 return -EINVAL;435435 }
+2-16
fs/exec.c
···19181918{19191919 struct task_struct *tsk = current;19201920 struct mm_struct *mm = tsk->mm;19211921- struct completion *vfork_done;19221921 int core_waiters = -EBUSY;1923192219241923 init_completion(&core_state->startup);···19291930 core_waiters = zap_threads(tsk, mm, core_state, exit_code);19301931 up_write(&mm->mmap_sem);1931193219321932- if (unlikely(core_waiters < 0))19331933- goto fail;19341934-19351935- /*19361936- * Make sure nobody is waiting for us to release the VM,19371937- * otherwise we can deadlock when we wait on each other19381938- */19391939- vfork_done = tsk->vfork_done;19401940- if (vfork_done) {19411941- tsk->vfork_done = NULL;19421942- complete(vfork_done);19431943- }19441944-19451945- if (core_waiters)19331933+ if (core_waiters > 0)19461934 wait_for_completion(&core_state->startup);19471947-fail:19351935+19481936 return core_waiters;19491937}19501938
···683683 struct gfs2_glock *gl = ip->i_gl;684684 struct gfs2_holder ri_gh;685685 int error = 0;686686+ int unlock_required = 0;686687687688 /* Read new copy from disk if we don't have the latest */688689 if (!sdp->sd_rindex_uptodate) {689690 mutex_lock(&sdp->sd_rindex_mutex);690690- error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh);691691- if (error)692692- return error;691691+ if (!gfs2_glock_is_locked_by_me(gl)) {692692+ error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh);693693+ if (error)694694+ return error;695695+ unlock_required = 1;696696+ }693697 if (!sdp->sd_rindex_uptodate)694698 error = gfs2_ri_update(ip);695695- gfs2_glock_dq_uninit(&ri_gh);699699+ if (unlock_required)700700+ gfs2_glock_dq_uninit(&ri_gh);696701 mutex_unlock(&sdp->sd_rindex_mutex);697702 }698703
+44-22
fs/namei.c
···13741374 return 1;13751375}1376137613771377+unsigned int full_name_hash(const unsigned char *name, unsigned int len)13781378+{13791379+ unsigned long hash = init_name_hash();13801380+ while (len--)13811381+ hash = partial_name_hash(*name++, hash);13821382+ return end_name_hash(hash);13831383+}13841384+EXPORT_SYMBOL(full_name_hash);13851385+13861386+/*13871387+ * We know there's a real path component here of at least13881388+ * one character.13891389+ */13901390+static inline unsigned long hash_name(const char *name, unsigned int *hashp)13911391+{13921392+ unsigned long hash = init_name_hash();13931393+ unsigned long len = 0, c;13941394+13951395+ c = (unsigned char)*name;13961396+ do {13971397+ len++;13981398+ hash = partial_name_hash(c, hash);13991399+ c = (unsigned char)name[len];14001400+ } while (c && c != '/');14011401+ *hashp = end_name_hash(hash);14021402+ return len;14031403+}14041404+13771405/*13781406 * Name resolution.13791407 * This is the basic name resolution function, turning a pathname into···1422139414231395 /* At this point we know we have a real path component. */14241396 for(;;) {14251425- unsigned long hash;14261397 struct qstr this;14271427- unsigned int c;13981398+ long len;14281399 int type;1429140014301401 err = may_lookup(nd);14311402 if (err)14321403 break;1433140414051405+ len = hash_name(name, &this.hash);14341406 this.name = name;14351435- c = *(const unsigned char *)name;14361436-14371437- hash = init_name_hash();14381438- do {14391439- name++;14401440- hash = partial_name_hash(c, hash);14411441- c = *(const unsigned char *)name;14421442- } while (c && (c != '/'));14431443- this.len = name - (const char *) this.name;14441444- this.hash = end_name_hash(hash);14071407+ this.len = len;1445140814461409 type = LAST_NORM;14471447- if (this.name[0] == '.') switch (this.len) {14101410+ if (name[0] == '.') switch (len) {14481411 case 2:14491449- if (this.name[1] == '.') {14121412+ if (name[1] == '.') {14501413 type = LAST_DOTDOT;14511414 nd->flags |= LOOKUP_JUMPED;14521415 }···14561437 }14571438 }1458143914591459- /* remove trailing slashes? */14601460- if (!c)14401440+ if (!name[len])14611441 goto last_component;14621462- while (*++name == '/');14631463- if (!*name)14421442+ /*14431443+ * If it wasn't NUL, we know it was '/'. Skip that14441444+ * slash, and continue until no more slashes.14451445+ */14461446+ do {14471447+ len++;14481448+ } while (unlikely(name[len] == '/'));14491449+ if (!name[len])14641450 goto last_component;14511451+ name += len;1465145214661453 err = walk_component(nd, &next, &this, type, LOOKUP_FOLLOW);14671454 if (err < 0)···18001775struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)18011776{18021777 struct qstr this;18031803- unsigned long hash;18041778 unsigned int c;1805177918061780 WARN_ON_ONCE(!mutex_is_locked(&base->d_inode->i_mutex));1807178118081782 this.name = name;18091783 this.len = len;17841784+ this.hash = full_name_hash(name, len);18101785 if (!len)18111786 return ERR_PTR(-EACCES);1812178718131813- hash = init_name_hash();18141788 while (len--) {18151789 c = *(const unsigned char *)name++;18161790 if (c == '/' || c == '\0')18171791 return ERR_PTR(-EACCES);18181818- hash = partial_name_hash(c, hash);18191792 }18201820- this.hash = end_name_hash(hash);18211793 /*18221794 * See if the low-level filesystem might want18231795 * to use its own hash..
+1-1
include/asm-generic/iomap.h
···7070/* Destroy a virtual mapping cookie for a PCI BAR (memory or IO) */7171struct pci_dev;7272extern void pci_iounmap(struct pci_dev *dev, void __iomem *);7373-#else7373+#elif defined(CONFIG_GENERIC_IOMAP)7474struct pci_dev;7575static inline void pci_iounmap(struct pci_dev *dev, void __iomem *addr)7676{ }
+1-1
include/asm-generic/pci_iomap.h
···2525#define __pci_ioport_map(dev, port, nr) ioport_map((port), (nr))2626#endif27272828-#else2828+#elif defined(CONFIG_GENERIC_PCI_IOMAP)2929static inline void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max)3030{3131 return NULL;
···4747};4848extern struct dentry_stat_t dentry_stat;49495050-/*5151- * Compare 2 name strings, return 0 if they match, otherwise non-zero.5252- * The strings are both count bytes long, and count is non-zero.5353- */5454-static inline int dentry_cmp(const unsigned char *cs, size_t scount,5555- const unsigned char *ct, size_t tcount)5656-{5757- int ret;5858- if (scount != tcount)5959- return 1;6060- do {6161- ret = (*cs != *ct);6262- if (ret)6363- break;6464- cs++;6565- ct++;6666- tcount--;6767- } while (tcount);6868- return ret;6969-}7070-7150/* Name hashing routines. Initial hash value */7251/* Hash courtesy of the R5 hash in reiserfs modulo sign bits */7352#define init_name_hash() 0···6889}69907091/* Compute the hash for a name string. */7171-static inline unsigned int7272-full_name_hash(const unsigned char *name, unsigned int len)7373-{7474- unsigned long hash = init_name_hash();7575- while (len--)7676- hash = partial_name_hash(*name++, hash);7777- return end_name_hash(hash);7878-}9292+extern unsigned int full_name_hash(const unsigned char *, unsigned int);79938094/*8195 * Try to keep struct dentry aligned on 64 byte cachelines (this will···281309extern struct dentry *d_lookup(struct dentry *, struct qstr *);282310extern struct dentry *d_hash_and_lookup(struct dentry *, struct qstr *);283311extern struct dentry *__d_lookup(struct dentry *, struct qstr *);284284-extern struct dentry *__d_lookup_rcu(struct dentry *parent, struct qstr *name,312312+extern struct dentry *__d_lookup_rcu(const struct dentry *parent,313313+ const struct qstr *name,285314 unsigned *seq, struct inode **inode);286315287316/**
+7-2
include/linux/kmsg_dump.h
···1515#include <linux/errno.h>1616#include <linux/list.h>17171818+/*1919+ * Keep this list arranged in rough order of priority. Anything listed after2020+ * KMSG_DUMP_OOPS will not be logged by default unless printk.always_kmsg_dump2121+ * is passed to the kernel.2222+ */1823enum kmsg_dump_reason {1919- KMSG_DUMP_OOPS,2024 KMSG_DUMP_PANIC,2525+ KMSG_DUMP_OOPS,2626+ KMSG_DUMP_EMERG,2127 KMSG_DUMP_RESTART,2228 KMSG_DUMP_HALT,2329 KMSG_DUMP_POWEROFF,2424- KMSG_DUMP_EMERG,2530};26312732/**
···17771777/*17781778 * Per process flags17791779 */17801780-#define PF_STARTING 0x00000002 /* being created */17811780#define PF_EXITING 0x00000004 /* getting shut down */17821781#define PF_EXITPIDONE 0x00000008 /* pi exit done on shut down */17831782#define PF_VCPU 0x00000010 /* I'm a virtual CPU */···23702371 * Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring23712372 * subscriptions and synchronises with wait4(). Also used in procfs. Also23722373 * pins the final release of task.io_context. Also protects ->cpuset and23732373- * ->cgroup.subsys[].23742374+ * ->cgroup.subsys[]. And ->vfork_done.23742375 *23752376 * Nests both inside and outside of read_lock(&tasklist_lock).23762377 * It must not be nested with write_lock_irq(&tasklist_lock),
+2-1
include/linux/tcp.h
···412412413413 struct tcp_sack_block recv_sack_cache[4];414414415415- struct sk_buff *highest_sack; /* highest skb with SACK received415415+ struct sk_buff *highest_sack; /* skb just after the highest416416+ * skb with SACKed bit set416417 * (validity guaranteed only if417418 * sacked_out > 0)418419 */
+3-1
include/net/inetpeer.h
···35353636 u32 metrics[RTAX_MAX];3737 u32 rate_tokens; /* rate limiting for ICMP */3838- int redirect_genid;3938 unsigned long rate_last;4039 unsigned long pmtu_expires;4140 u32 pmtu_orig;4241 u32 pmtu_learned;4342 struct inetpeer_addr_base redirect_learned;4343+ struct list_head gc_list;4444 /*4545 * Once inet_peer is queued for deletion (refcnt == -1), following fields4646 * are not available: rid, ip_id_count, tcp_ts, tcp_ts_stamp···9595/* can be called from BH context or outside */9696extern void inet_putpeer(struct inet_peer *p);9797extern bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout);9898+9999+extern void inetpeer_invalidate_tree(int family);9810099101/*100102 * temporary check to make sure we dont access rid, ip_id_count, tcp_ts,
+3-2
include/net/tcp.h
···13641364 }13651365}1366136613671367-/* Start sequence of the highest skb with SACKed bit, valid only if13681368- * sacked > 0 or when the caller has ensured validity by itself.13671367+/* Start sequence of the skb just after the highest skb with SACKed13681368+ * bit, valid only if sacked_out > 0 or when the caller has ensured13691369+ * validity by itself.13691370 */13701371static inline u32 tcp_highest_sack_seq(struct tcp_sock *tp)13711372{
+39-21
kernel/fork.c
···668668 return mm;669669}670670671671+static void complete_vfork_done(struct task_struct *tsk)672672+{673673+ struct completion *vfork;674674+675675+ task_lock(tsk);676676+ vfork = tsk->vfork_done;677677+ if (likely(vfork)) {678678+ tsk->vfork_done = NULL;679679+ complete(vfork);680680+ }681681+ task_unlock(tsk);682682+}683683+684684+static int wait_for_vfork_done(struct task_struct *child,685685+ struct completion *vfork)686686+{687687+ int killed;688688+689689+ freezer_do_not_count();690690+ killed = wait_for_completion_killable(vfork);691691+ freezer_count();692692+693693+ if (killed) {694694+ task_lock(child);695695+ child->vfork_done = NULL;696696+ task_unlock(child);697697+ }698698+699699+ put_task_struct(child);700700+ return killed;701701+}702702+671703/* Please note the differences between mmput and mm_release.672704 * mmput is called whenever we stop holding onto a mm_struct,673705 * error success whatever.···715683 */716684void mm_release(struct task_struct *tsk, struct mm_struct *mm)717685{718718- struct completion *vfork_done = tsk->vfork_done;719719-720686 /* Get rid of any futexes when releasing the mm */721687#ifdef CONFIG_FUTEX722688 if (unlikely(tsk->robust_list)) {···734704 /* Get rid of any cached register state */735705 deactivate_mm(tsk, mm);736706737737- /* notify parent sleeping on vfork() */738738- if (vfork_done) {739739- tsk->vfork_done = NULL;740740- complete(vfork_done);741741- }707707+ if (tsk->vfork_done)708708+ complete_vfork_done(tsk);742709743710 /*744711 * If we're exiting normally, clear a user-space tid field if745712 * requested. We leave this alone when dying by signal, to leave746713 * the value intact in a core dump, and to save the unnecessary747747- * trouble otherwise. Userland only wants this done for a sys_exit.714714+ * trouble, say, a killed vfork parent shouldn't touch this mm.715715+ * Userland only wants this done for a sys_exit.748716 */749717 if (tsk->clear_child_tid) {750718 if (!(tsk->flags & PF_SIGNALED) &&···1046101810471019 new_flags &= ~(PF_SUPERPRIV | PF_WQ_WORKER);10481020 new_flags |= PF_FORKNOEXEC;10491049- new_flags |= PF_STARTING;10501021 p->flags = new_flags;10511022}10521023···15751548 if (clone_flags & CLONE_VFORK) {15761549 p->vfork_done = &vfork;15771550 init_completion(&vfork);15511551+ get_task_struct(p);15781552 }15791579-15801580- /*15811581- * We set PF_STARTING at creation in case tracing wants to15821582- * use this to distinguish a fully live task from one that15831583- * hasn't finished SIGSTOP raising yet. Now we clear it15841584- * and set the child going.15851585- */15861586- p->flags &= ~PF_STARTING;1587155315881554 wake_up_new_task(p);15891555···15851565 ptrace_event(trace, nr);1586156615871567 if (clone_flags & CLONE_VFORK) {15881588- freezer_do_not_count();15891589- wait_for_completion(&vfork);15901590- freezer_count();15911591- ptrace_event(PTRACE_EVENT_VFORK_DONE, nr);15681568+ if (!wait_for_vfork_done(p, &vfork))15691569+ ptrace_event(PTRACE_EVENT_VFORK_DONE, nr);15921570 }15931571 } else {15941572 nr = PTR_ERR(p);
+7-4
kernel/hung_task.c
···119119 * For preemptible RCU it is sufficient to call rcu_read_unlock in order120120 * to exit the grace period. For classic RCU, a reschedule is required.121121 */122122-static void rcu_lock_break(struct task_struct *g, struct task_struct *t)122122+static bool rcu_lock_break(struct task_struct *g, struct task_struct *t)123123{124124+ bool can_cont;125125+124126 get_task_struct(g);125127 get_task_struct(t);126128 rcu_read_unlock();127129 cond_resched();128130 rcu_read_lock();131131+ can_cont = pid_alive(g) && pid_alive(t);129132 put_task_struct(t);130133 put_task_struct(g);134134+135135+ return can_cont;131136}132137133138/*···159154 goto unlock;160155 if (!--batch_count) {161156 batch_count = HUNG_TASK_BATCHING;162162- rcu_lock_break(g, t);163163- /* Exit if t or g was unhashed during refresh. */164164- if (t->state == TASK_DEAD || g->state == TASK_DEAD)157157+ if (!rcu_lock_break(g, t))165158 goto unlock;166159 }167160 /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */
+38-6
kernel/irq/manage.c
···985985986986 /* add new interrupt at end of irq queue */987987 do {988988+ /*989989+ * Or all existing action->thread_mask bits,990990+ * so we can find the next zero bit for this991991+ * new action.992992+ */988993 thread_mask |= old->thread_mask;989994 old_ptr = &old->next;990995 old = *old_ptr;···998993 }9999941000995 /*10011001- * Setup the thread mask for this irqaction. Unlikely to have10021002- * 32 resp 64 irqs sharing one line, but who knows.996996+ * Setup the thread mask for this irqaction for ONESHOT. For997997+ * !ONESHOT irqs the thread mask is 0 so we can avoid a998998+ * conditional in irq_wake_thread().1003999 */10041004- if (new->flags & IRQF_ONESHOT && thread_mask == ~0UL) {10051005- ret = -EBUSY;10061006- goto out_mask;10001000+ if (new->flags & IRQF_ONESHOT) {10011001+ /*10021002+ * Unlikely to have 32 resp 64 irqs sharing one line,10031003+ * but who knows.10041004+ */10051005+ if (thread_mask == ~0UL) {10061006+ ret = -EBUSY;10071007+ goto out_mask;10081008+ }10091009+ /*10101010+ * The thread_mask for the action is or'ed to10111011+ * desc->thread_active to indicate that the10121012+ * IRQF_ONESHOT thread handler has been woken, but not10131013+ * yet finished. The bit is cleared when a thread10141014+ * completes. When all threads of a shared interrupt10151015+ * line have completed desc->threads_active becomes10161016+ * zero and the interrupt line is unmasked. See10171017+ * handle.c:irq_wake_thread() for further information.10181018+ *10191019+ * If no thread is woken by primary (hard irq context)10201020+ * interrupt handlers, then desc->threads_active is10211021+ * also checked for zero to unmask the irq line in the10221022+ * affected hard irq flow handlers10231023+ * (handle_[fasteoi|level]_irq).10241024+ *10251025+ * The new action gets the first zero bit of10261026+ * thread_mask assigned. See the loop above which or's10271027+ * all existing action->thread_mask bits.10281028+ */10291029+ new->thread_mask = 1 << ffz(thread_mask);10071030 }10081008- new->thread_mask = 1 << ffz(thread_mask);1009103110101032 if (!shared) {10111033 init_waitqueue_head(&desc->wait_for_threads);
+7-5
kernel/kprobes.c
···13341334 if (!kernel_text_address((unsigned long) p->addr) ||13351335 in_kprobes_functions((unsigned long) p->addr) ||13361336 ftrace_text_reserved(p->addr, p->addr) ||13371337- jump_label_text_reserved(p->addr, p->addr))13381338- goto fail_with_jump_label;13371337+ jump_label_text_reserved(p->addr, p->addr)) {13381338+ ret = -EINVAL;13391339+ goto cannot_probe;13401340+ }1339134113401342 /* User can pass only KPROBE_FLAG_DISABLED to register_kprobe */13411343 p->flags &= KPROBE_FLAG_DISABLED;···13541352 * its code to prohibit unexpected unloading.13551353 */13561354 if (unlikely(!try_module_get(probed_mod)))13571357- goto fail_with_jump_label;13551355+ goto cannot_probe;1358135613591357 /*13601358 * If the module freed .init.text, we couldn't insert···13631361 if (within_module_init((unsigned long)p->addr, probed_mod) &&13641362 probed_mod->state != MODULE_STATE_COMING) {13651363 module_put(probed_mod);13661366- goto fail_with_jump_label;13641364+ goto cannot_probe;13671365 }13681366 /* ret will be updated by following code */13691367 }···1411140914121410 return ret;1413141114141414-fail_with_jump_label:14121412+cannot_probe:14151413 preempt_enable();14161414 jump_label_unlock();14171415 return ret;
+6
kernel/printk.c
···707707#endif708708module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR);709709710710+static bool always_kmsg_dump;711711+module_param_named(always_kmsg_dump, always_kmsg_dump, bool, S_IRUGO | S_IWUSR);712712+710713/* Check if we have any console registered that can be called early in boot. */711714static int have_callable_console(void)712715{···17391736 const char *s1, *s2;17401737 unsigned long l1, l2;17411738 unsigned long flags;17391739+17401740+ if ((reason > KMSG_DUMP_OOPS) && !always_kmsg_dump)17411741+ return;1742174217431743 /* Theoretically, the log could move on after we do this, but17441744 there's not a lot we can do about that. The new messages
+3-11
lib/debugobjects.c
···818818 if (obj->static_init == 1) {819819 debug_object_init(obj, &descr_type_test);820820 debug_object_activate(obj, &descr_type_test);821821- /*822822- * Real code should return 0 here ! This is823823- * not a fixup of some bad behaviour. We824824- * merily call the debug_init function to keep825825- * track of the object.826826- */827827- return 1;828828- } else {829829- /* Real code needs to emit a warning here */821821+ return 0;830822 }831831- return 0;823823+ return 1;832824833825 case ODEBUG_STATE_ACTIVE:834826 debug_object_deactivate(obj, &descr_type_test);···959967960968 obj.static_init = 1;961969 debug_object_activate(&obj, &descr_type_test);962962- if (check_results(&obj, ODEBUG_STATE_ACTIVE, ++fixups, warnings))970970+ if (check_results(&obj, ODEBUG_STATE_ACTIVE, fixups, warnings))963971 goto out;964972 debug_object_init(&obj, &descr_type_test);965973 if (check_results(&obj, ODEBUG_STATE_INIT, ++fixups, ++warnings))
+9-3
lib/vsprintf.c
···891891 case 'U':892892 return uuid_string(buf, end, ptr, spec, fmt);893893 case 'V':894894- return buf + vsnprintf(buf, end > buf ? end - buf : 0,895895- ((struct va_format *)ptr)->fmt,896896- *(((struct va_format *)ptr)->va));894894+ {895895+ va_list va;896896+897897+ va_copy(va, *((struct va_format *)ptr)->va);898898+ buf += vsnprintf(buf, end > buf ? end - buf : 0,899899+ ((struct va_format *)ptr)->fmt, va);900900+ va_end(va);901901+ return buf;902902+ }897903 case 'K':898904 /*899905 * %pK cannot be used in IRQ context because its test
+3-3
mm/huge_memory.c
···671671 set_pmd_at(mm, haddr, pmd, entry);672672 prepare_pmd_huge_pte(pgtable, mm);673673 add_mm_counter(mm, MM_ANONPAGES, HPAGE_PMD_NR);674674+ mm->nr_ptes++;674675 spin_unlock(&mm->page_table_lock);675676 }676677···790789 pmd = pmd_mkold(pmd_wrprotect(pmd));791790 set_pmd_at(dst_mm, addr, dst_pmd, pmd);792791 prepare_pmd_huge_pte(pgtable, dst_mm);792792+ dst_mm->nr_ptes++;793793794794 ret = 0;795795out_unlock:···889887 }890888 kfree(pages);891889892892- mm->nr_ptes++;893890 smp_wmb(); /* make pte visible before pmd */894891 pmd_populate(mm, pmd, pgtable);895892 page_remove_rmap(page);···10481047 VM_BUG_ON(page_mapcount(page) < 0);10491048 add_mm_counter(tlb->mm, MM_ANONPAGES, -HPAGE_PMD_NR);10501049 VM_BUG_ON(!PageHead(page));10501050+ tlb->mm->nr_ptes--;10511051 spin_unlock(&tlb->mm->page_table_lock);10521052 tlb_remove_page(tlb, page);10531053 pte_free(tlb->mm, pgtable);···13771375 pte_unmap(pte);13781376 }1379137713801380- mm->nr_ptes++;13811378 smp_wmb(); /* make pte visible before pmd */13821379 /*13831380 * Up to this point the pmd is present and huge and···19891988 set_pmd_at(mm, address, pmd, _pmd);19901989 update_mmu_cache(vma, address, _pmd);19911990 prepare_pmd_huge_pte(pgtable, mm);19921992- mm->nr_ptes--;19931991 spin_unlock(&mm->page_table_lock);1994199219951993#ifndef CONFIG_NUMA
···2828#include <linux/kthread.h>2929#include <linux/wait.h>3030#include <linux/slab.h>3131-#include <linux/memcontrol.h>3231#include <linux/rbtree.h>3332#include <linux/memory.h>3433#include <linux/mmu_notifier.h>···1571157215721573 new_page = alloc_page_vma(GFP_HIGHUSER_MOVABLE, vma, address);15731574 if (new_page) {15741574- /*15751575- * The memcg-specific accounting when moving15761576- * pages around the LRU lists relies on the15771577- * page's owner (memcg) to be valid. Usually,15781578- * pages are assigned to a new owner before15791579- * being put on the LRU list, but since this15801580- * is not the case here, the stale owner from15811581- * a previous allocation cycle must be reset.15821582- */15831583- mem_cgroup_reset_owner(new_page);15841575 copy_user_highpage(new_page, page, address, vma);1585157615861577 SetPageDirty(new_page);
+3-3
mm/memblock.c
···9999 phys_addr_t this_start, this_end, cand;100100 u64 i;101101102102- /* align @size to avoid excessive fragmentation on reserved array */103103- size = round_up(size, align);104104-105102 /* pump up @end */106103 if (end == MEMBLOCK_ALLOC_ACCESSIBLE)107104 end = memblock.current_limit;···727730 int nid)728731{729732 phys_addr_t found;733733+734734+ /* align @size to avoid excessive fragmentation on reserved array */735735+ size = round_up(size, align);730736731737 found = memblock_find_in_range_node(0, max_addr, size, align, nid);732738 if (found && !memblock_reserve(found, size))
+50-52
mm/memcontrol.c
···1042104210431043 pc = lookup_page_cgroup(page);10441044 memcg = pc->mem_cgroup;10451045+10461046+ /*10471047+ * Surreptitiously switch any uncharged page to root:10481048+ * an uncharged page off lru does nothing to secure10491049+ * its former mem_cgroup from sudden removal.10501050+ *10511051+ * Our caller holds lru_lock, and PageCgroupUsed is updated10521052+ * under page_cgroup lock: between them, they make all uses10531053+ * of pc->mem_cgroup safe.10541054+ */10551055+ if (!PageCgroupUsed(pc) && memcg != root_mem_cgroup)10561056+ pc->mem_cgroup = memcg = root_mem_cgroup;10571057+10451058 mz = page_cgroup_zoneinfo(memcg, page);10461059 /* compound_order() is stabilized through lru_lock */10471060 MEM_CGROUP_ZSTAT(mz, lru) += 1 << compound_order(page);···24212408 struct page *page,24222409 unsigned int nr_pages,24232410 struct page_cgroup *pc,24242424- enum charge_type ctype)24112411+ enum charge_type ctype,24122412+ bool lrucare)24252413{24142414+ struct zone *uninitialized_var(zone);24152415+ bool was_on_lru = false;24162416+24262417 lock_page_cgroup(pc);24272418 if (unlikely(PageCgroupUsed(pc))) {24282419 unlock_page_cgroup(pc);···24372420 * we don't need page_cgroup_lock about tail pages, becase they are not24382421 * accessed by any other context at this point.24392422 */24232423+24242424+ /*24252425+ * In some cases, SwapCache and FUSE(splice_buf->radixtree), the page24262426+ * may already be on some other mem_cgroup's LRU. Take care of it.24272427+ */24282428+ if (lrucare) {24292429+ zone = page_zone(page);24302430+ spin_lock_irq(&zone->lru_lock);24312431+ if (PageLRU(page)) {24322432+ ClearPageLRU(page);24332433+ del_page_from_lru_list(zone, page, page_lru(page));24342434+ was_on_lru = true;24352435+ }24362436+ }24372437+24402438 pc->mem_cgroup = memcg;24412439 /*24422440 * We access a page_cgroup asynchronously without lock_page_cgroup().···24752443 break;24762444 }2477244524462446+ if (lrucare) {24472447+ if (was_on_lru) {24482448+ VM_BUG_ON(PageLRU(page));24492449+ SetPageLRU(page);24502450+ add_page_to_lru_list(zone, page, page_lru(page));24512451+ }24522452+ spin_unlock_irq(&zone->lru_lock);24532453+ }24542454+24782455 mem_cgroup_charge_statistics(memcg, PageCgroupCache(pc), nr_pages);24792456 unlock_page_cgroup(pc);24802480- WARN_ON_ONCE(PageLRU(page));24572457+24812458 /*24822459 * "charge_statistics" updated event counter. Then, check it.24832460 * Insert ancestor (and ancestor's ancestors), to softlimit RB-tree.···26842643 ret = __mem_cgroup_try_charge(mm, gfp_mask, nr_pages, &memcg, oom);26852644 if (ret == -ENOMEM)26862645 return ret;26872687- __mem_cgroup_commit_charge(memcg, page, nr_pages, pc, ctype);26462646+ __mem_cgroup_commit_charge(memcg, page, nr_pages, pc, ctype, false);26882647 return 0;26892648}26902649···27032662static void27042663__mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *ptr,27052664 enum charge_type ctype);27062706-27072707-static void27082708-__mem_cgroup_commit_charge_lrucare(struct page *page, struct mem_cgroup *memcg,27092709- enum charge_type ctype)27102710-{27112711- struct page_cgroup *pc = lookup_page_cgroup(page);27122712- struct zone *zone = page_zone(page);27132713- unsigned long flags;27142714- bool removed = false;27152715-27162716- /*27172717- * In some case, SwapCache, FUSE(splice_buf->radixtree), the page27182718- * is already on LRU. It means the page may on some other page_cgroup's27192719- * LRU. Take care of it.27202720- */27212721- spin_lock_irqsave(&zone->lru_lock, flags);27222722- if (PageLRU(page)) {27232723- del_page_from_lru_list(zone, page, page_lru(page));27242724- ClearPageLRU(page);27252725- removed = true;27262726- }27272727- __mem_cgroup_commit_charge(memcg, page, 1, pc, ctype);27282728- if (removed) {27292729- add_page_to_lru_list(zone, page, page_lru(page));27302730- SetPageLRU(page);27312731- }27322732- spin_unlock_irqrestore(&zone->lru_lock, flags);27332733- return;27342734-}2735266527362666int mem_cgroup_cache_charge(struct page *page, struct mm_struct *mm,27372667 gfp_t gfp_mask)···27812769__mem_cgroup_commit_charge_swapin(struct page *page, struct mem_cgroup *memcg,27822770 enum charge_type ctype)27832771{27722772+ struct page_cgroup *pc;27732773+27842774 if (mem_cgroup_disabled())27852775 return;27862776 if (!memcg)27872777 return;27882778 cgroup_exclude_rmdir(&memcg->css);2789277927902790- __mem_cgroup_commit_charge_lrucare(page, memcg, ctype);27802780+ pc = lookup_page_cgroup(page);27812781+ __mem_cgroup_commit_charge(memcg, page, 1, pc, ctype, true);27912782 /*27922783 * Now swap is on-memory. This means this page may be27932784 * counted both as mem and swap....double count.···30423027 batch->memcg = NULL;30433028}3044302930453045-/*30463046- * A function for resetting pc->mem_cgroup for newly allocated pages.30473047- * This function should be called if the newpage will be added to LRU30483048- * before start accounting.30493049- */30503050-void mem_cgroup_reset_owner(struct page *newpage)30513051-{30523052- struct page_cgroup *pc;30533053-30543054- if (mem_cgroup_disabled())30553055- return;30563056-30573057- pc = lookup_page_cgroup(newpage);30583058- VM_BUG_ON(PageCgroupUsed(pc));30593059- pc->mem_cgroup = root_mem_cgroup;30603060-}30613061-30623030#ifdef CONFIG_SWAP30633031/*30643032 * called after __delete_from_swap_cache() and drop "page" account.···32463248 ctype = MEM_CGROUP_CHARGE_TYPE_CACHE;32473249 else32483250 ctype = MEM_CGROUP_CHARGE_TYPE_SHMEM;32493249- __mem_cgroup_commit_charge(memcg, newpage, 1, pc, ctype);32513251+ __mem_cgroup_commit_charge(memcg, newpage, 1, pc, ctype, false);32503252 return ret;32513253}32523254···33303332 * the newpage may be on LRU(or pagevec for LRU) already. We lock33313333 * LRU while we overwrite pc->mem_cgroup.33323334 */33333333- __mem_cgroup_commit_charge_lrucare(newpage, memcg, type);33353335+ __mem_cgroup_commit_charge(memcg, newpage, 1, pc, type, true);33343336}3335333733363338#ifdef CONFIG_DEBUG_VM
+2-1
mm/mempolicy.c
···640640 unsigned long vmstart;641641 unsigned long vmend;642642643643- vma = find_vma_prev(mm, start, &prev);643643+ vma = find_vma(mm, start);644644 if (!vma || vma->vm_start > start)645645 return -EFAULT;646646647647+ prev = vma->vm_prev;647648 if (start > vma->vm_start)648649 prev = vma;649650
-2
mm/migrate.c
···839839 if (!newpage)840840 return -ENOMEM;841841842842- mem_cgroup_reset_owner(newpage);843843-844842 if (page_count(page) == 1) {845843 /* page was freed from under us. So we are done. */846844 goto out;
···300300 new_page = alloc_page_vma(gfp_mask, vma, addr);301301 if (!new_page)302302 break; /* Out of memory */303303- /*304304- * The memcg-specific accounting when moving305305- * pages around the LRU lists relies on the306306- * page's owner (memcg) to be valid. Usually,307307- * pages are assigned to a new owner before308308- * being put on the LRU list, but since this309309- * is not the case here, the stale owner from310310- * a previous allocation cycle must be reset.311311- */312312- mem_cgroup_reset_owner(new_page);313303 }314304315305 /*
···13351335 const char *base, char __user *ubase)13361336{13371337 char __user *hlp = ubase + ((char *)m - base);13381338- if (copy_to_user(hlp, m->u.match->name, EBT_FUNCTION_MAXNAMELEN))13381338+ char name[EBT_FUNCTION_MAXNAMELEN] = {};13391339+13401340+ /* ebtables expects 32 bytes long names but xt_match names are 29 bytes13411341+ long. Copy 29 bytes and fill remaining bytes with zeroes. */13421342+ strncpy(name, m->u.match->name, sizeof(name));13431343+ if (copy_to_user(hlp, name, EBT_FUNCTION_MAXNAMELEN))13391344 return -EFAULT;13401345 return 0;13411346}···13491344 const char *base, char __user *ubase)13501345{13511346 char __user *hlp = ubase + ((char *)w - base);13521352- if (copy_to_user(hlp , w->u.watcher->name, EBT_FUNCTION_MAXNAMELEN))13471347+ char name[EBT_FUNCTION_MAXNAMELEN] = {};13481348+13491349+ strncpy(name, w->u.watcher->name, sizeof(name));13501350+ if (copy_to_user(hlp , name, EBT_FUNCTION_MAXNAMELEN))13531351 return -EFAULT;13541352 return 0;13551353}···13631355 int ret;13641356 char __user *hlp;13651357 const struct ebt_entry_target *t;13581358+ char name[EBT_FUNCTION_MAXNAMELEN] = {};1366135913671360 if (e->bitmask == 0)13681361 return 0;···13771368 ret = EBT_WATCHER_ITERATE(e, ebt_make_watchername, base, ubase);13781369 if (ret != 0)13791370 return ret;13801380- if (copy_to_user(hlp, t->u.target->name, EBT_FUNCTION_MAXNAMELEN))13711371+ strncpy(name, t->u.target->name, sizeof(name));13721372+ if (copy_to_user(hlp, name, EBT_FUNCTION_MAXNAMELEN))13811373 return -EFAULT;13821374 return 0;13831375}···1903189319041894 switch (compat_mwt) {19051895 case EBT_COMPAT_MATCH:19061906- match = try_then_request_module(xt_find_match(NFPROTO_BRIDGE,19071907- name, 0), "ebt_%s", name);19081908- if (match == NULL)19091909- return -ENOENT;18961896+ match = xt_request_find_match(NFPROTO_BRIDGE, name, 0);19101897 if (IS_ERR(match))19111898 return PTR_ERR(match);19121899···19221915 break;19231916 case EBT_COMPAT_WATCHER: /* fallthrough */19241917 case EBT_COMPAT_TARGET:19251925- wt = try_then_request_module(xt_find_target(NFPROTO_BRIDGE,19261926- name, 0), "ebt_%s", name);19271927- if (wt == NULL)19281928- return -ENOENT;19181918+ wt = xt_request_find_target(NFPROTO_BRIDGE, name, 0);19291919 if (IS_ERR(wt))19301920 return PTR_ERR(wt);19311921 off = xt_compat_target_offset(wt);
+10-8
net/core/rtnetlink.c
···10601060 rcu_read_lock();10611061 cb->seq = net->dev_base_seq;1062106210631063- nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,10641064- ifla_policy);10631063+ if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,10641064+ ifla_policy) >= 0) {1065106510661066- if (tb[IFLA_EXT_MASK])10671067- ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);10661066+ if (tb[IFLA_EXT_MASK])10671067+ ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);10681068+ }1068106910691070 for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {10701071 idx = 0;···19011900 u32 ext_filter_mask = 0;19021901 u16 min_ifinfo_dump_size = 0;1903190219041904- nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX, ifla_policy);19051905-19061906- if (tb[IFLA_EXT_MASK])19071907- ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);19031903+ if (nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,19041904+ ifla_policy) >= 0) {19051905+ if (tb[IFLA_EXT_MASK])19061906+ ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);19071907+ }1908190819091909 if (!ext_filter_mask)19101910 return NLMSG_GOODSIZE;
+79-2
net/ipv4/inetpeer.c
···1717#include <linux/kernel.h>1818#include <linux/mm.h>1919#include <linux/net.h>2020+#include <linux/workqueue.h>2021#include <net/ip.h>2122#include <net/inetpeer.h>2223#include <net/secure_seq.h>···67666867static struct kmem_cache *peer_cachep __read_mostly;69686969+static LIST_HEAD(gc_list);7070+static const int gc_delay = 60 * HZ;7171+static struct delayed_work gc_work;7272+static DEFINE_SPINLOCK(gc_lock);7373+7074#define node_height(x) x->avl_height71757276#define peer_avl_empty ((struct inet_peer *)&peer_fake_node)···108102int inet_peer_minttl __read_mostly = 120 * HZ; /* TTL under high load: 120 sec */109103int inet_peer_maxttl __read_mostly = 10 * 60 * HZ; /* usual time to live: 10 min */110104105105+static void inetpeer_gc_worker(struct work_struct *work)106106+{107107+ struct inet_peer *p, *n;108108+ LIST_HEAD(list);109109+110110+ spin_lock_bh(&gc_lock);111111+ list_replace_init(&gc_list, &list);112112+ spin_unlock_bh(&gc_lock);113113+114114+ if (list_empty(&list))115115+ return;116116+117117+ list_for_each_entry_safe(p, n, &list, gc_list) {118118+119119+ if(need_resched())120120+ cond_resched();121121+122122+ if (p->avl_left != peer_avl_empty) {123123+ list_add_tail(&p->avl_left->gc_list, &list);124124+ p->avl_left = peer_avl_empty;125125+ }126126+127127+ if (p->avl_right != peer_avl_empty) {128128+ list_add_tail(&p->avl_right->gc_list, &list);129129+ p->avl_right = peer_avl_empty;130130+ }131131+132132+ n = list_entry(p->gc_list.next, struct inet_peer, gc_list);133133+134134+ if (!atomic_read(&p->refcnt)) {135135+ list_del(&p->gc_list);136136+ kmem_cache_free(peer_cachep, p);137137+ }138138+ }139139+140140+ if (list_empty(&list))141141+ return;142142+143143+ spin_lock_bh(&gc_lock);144144+ list_splice(&list, &gc_list);145145+ spin_unlock_bh(&gc_lock);146146+147147+ schedule_delayed_work(&gc_work, gc_delay);148148+}111149112150/* Called from ip_output.c:ip_init */113151void __init inet_initpeers(void)···176126 0, SLAB_HWCACHE_ALIGN | SLAB_PANIC,177127 NULL);178128129129+ INIT_DELAYED_WORK_DEFERRABLE(&gc_work, inetpeer_gc_worker);179130}180131181132static int addr_compare(const struct inetpeer_addr *a,···498447 p->rate_last = 0;499448 p->pmtu_expires = 0;500449 p->pmtu_orig = 0;501501- p->redirect_genid = 0;502450 memset(&p->redirect_learned, 0, sizeof(p->redirect_learned));503503-451451+ INIT_LIST_HEAD(&p->gc_list);504452505453 /* Link the node. */506454 link_to_pool(p, base);···559509 return rc;560510}561511EXPORT_SYMBOL(inet_peer_xrlim_allow);512512+513513+void inetpeer_invalidate_tree(int family)514514+{515515+ struct inet_peer *old, *new, *prev;516516+ struct inet_peer_base *base = family_to_base(family);517517+518518+ write_seqlock_bh(&base->lock);519519+520520+ old = base->root;521521+ if (old == peer_avl_empty_rcu)522522+ goto out;523523+524524+ new = peer_avl_empty_rcu;525525+526526+ prev = cmpxchg(&base->root, old, new);527527+ if (prev == old) {528528+ base->total = 0;529529+ spin_lock(&gc_lock);530530+ list_add_tail(&prev->gc_list, &gc_list);531531+ spin_unlock(&gc_lock);532532+ schedule_delayed_work(&gc_work, gc_delay);533533+ }534534+535535+out:536536+ write_sequnlock_bh(&base->lock);537537+}538538+EXPORT_SYMBOL(inetpeer_invalidate_tree);
+3-9
net/ipv4/route.c
···132132static int ip_rt_min_pmtu __read_mostly = 512 + 20 + 20;133133static int ip_rt_min_advmss __read_mostly = 256;134134static int rt_chain_length_max __read_mostly = 20;135135-static int redirect_genid;136135137136static struct delayed_work expires_work;138137static unsigned long expires_ljiffies;···936937937938 get_random_bytes(&shuffle, sizeof(shuffle));938939 atomic_add(shuffle + 1U, &net->ipv4.rt_genid);939939- redirect_genid++;940940+ inetpeer_invalidate_tree(AF_INET);940941}941942942943/*···1484148514851486 peer = rt->peer;14861487 if (peer) {14871487- if (peer->redirect_learned.a4 != new_gw ||14881488- peer->redirect_genid != redirect_genid) {14881488+ if (peer->redirect_learned.a4 != new_gw) {14891489 peer->redirect_learned.a4 = new_gw;14901490- peer->redirect_genid = redirect_genid;14911490 atomic_inc(&__rt_peer_genid);14921491 }14931492 check_peer_redir(&rt->dst, peer);···17901793 if (peer) {17911794 check_peer_pmtu(&rt->dst, peer);1792179517931793- if (peer->redirect_genid != redirect_genid)17941794- peer->redirect_learned.a4 = 0;17951796 if (peer->redirect_learned.a4 &&17961797 peer->redirect_learned.a4 != rt->rt_gateway)17971798 check_peer_redir(&rt->dst, peer);···19531958 dst_init_metrics(&rt->dst, peer->metrics, false);1954195919551960 check_peer_pmtu(&rt->dst, peer);19561956- if (peer->redirect_genid != redirect_genid)19571957- peer->redirect_learned.a4 = 0;19611961+19581962 if (peer->redirect_learned.a4 &&19591963 peer->redirect_learned.a4 != rt->rt_gateway) {19601964 rt->rt_gateway = peer->redirect_learned.a4;
+15-8
net/ipv4/tcp_input.c
···1403140314041404 BUG_ON(!pcount);1405140514061406- /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */14071407- if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint))14061406+ /* Adjust counters and hints for the newly sacked sequence14071407+ * range but discard the return value since prev is already14081408+ * marked. We must tag the range first because the seq14091409+ * advancement below implicitly advances14101410+ * tcp_highest_sack_seq() when skb is highest_sack.14111411+ */14121412+ tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,14131413+ start_seq, end_seq, dup_sack, pcount);14141414+14151415+ if (skb == tp->lost_skb_hint)14081416 tp->lost_cnt_hint += pcount;1409141714101418 TCP_SKB_CB(prev)->end_seq += shifted;···14371429 skb_shinfo(skb)->gso_size = 0;14381430 skb_shinfo(skb)->gso_type = 0;14391431 }14401440-14411441- /* Adjust counters and hints for the newly sacked sequence range but14421442- * discard the return value since prev is already marked.14431443- */14441444- tcp_sacktag_one(sk, state, TCP_SKB_CB(skb)->sacked,14451445- start_seq, end_seq, dup_sack, pcount);1446143214471433 /* Difference in this won't matter, both ACKed by the same cumul. ACK */14481434 TCP_SKB_CB(prev)->sacked |= (TCP_SKB_CB(skb)->sacked & TCPCB_EVER_RETRANS);···15841582 len = pcount * mss;15851583 }15861584 }15851585+15861586+ /* tcp_sacktag_one() won't SACK-tag ranges below snd_una */15871587+ if (!after(TCP_SKB_CB(skb)->seq + len, tp->snd_una))15881588+ goto fallback;1587158915881590 if (!skb_shift(prev, skb, len))15891591 goto fallback;···2573256725742568 if (cnt > packets) {25752569 if ((tcp_is_sack(tp) && !tcp_is_fack(tp)) ||25702570+ (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) ||25762571 (oldcnt >= packets))25772572 break;25782573
+4
net/ipv6/addrconf.c
···434434 /* Join all-node multicast group */435435 ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);436436437437+ /* Join all-router multicast group if forwarding is set */438438+ if (ndev->cnf.forwarding && dev && (dev->flags & IFF_MULTICAST))439439+ ipv6_dev_mc_inc(dev, &in6addr_linklocal_allrouters);440440+437441 return ndev;438442}439443
+3
net/mac80211/iface.c
···13321332 hw_roc = true;1333133313341334 list_for_each_entry(sdata, &local->interfaces, list) {13351335+ if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||13361336+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN)13371337+ continue;13351338 if (sdata->old_idle == sdata->vif.bss_conf.idle)13361339 continue;13371340 if (!ieee80211_sdata_running(sdata))
+1-1
net/mac80211/rate.c
···344344 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {345345 info->control.rates[i].idx = -1;346346 info->control.rates[i].flags = 0;347347- info->control.rates[i].count = 1;347347+ info->control.rates[i].count = 0;348348 }349349350350 if (sdata->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)
+6-2
net/netfilter/nf_conntrack_core.c
···635635636636 if (del_timer(&ct->timeout)) {637637 death_by_timeout((unsigned long)ct);638638- dropped = 1;639639- NF_CT_STAT_INC_ATOMIC(net, early_drop);638638+ /* Check if we indeed killed this entry. Reliable event639639+ delivery may have inserted it into the dying list. */640640+ if (test_bit(IPS_DYING_BIT, &ct->status)) {641641+ dropped = 1;642642+ NF_CT_STAT_INC_ATOMIC(net, early_drop);643643+ }640644 }641645 nf_ct_put(ct);642646 return dropped;
-3
net/netfilter/nf_conntrack_netlink.c
···10411041 if (!parse_nat_setup) {10421042#ifdef CONFIG_MODULES10431043 rcu_read_unlock();10441044- spin_unlock_bh(&nf_conntrack_lock);10451044 nfnl_unlock();10461045 if (request_module("nf-nat-ipv4") < 0) {10471046 nfnl_lock();10481048- spin_lock_bh(&nf_conntrack_lock);10491047 rcu_read_lock();10501048 return -EOPNOTSUPP;10511049 }10521050 nfnl_lock();10531053- spin_lock_bh(&nf_conntrack_lock);10541051 rcu_read_lock();10551052 if (nfnetlink_parse_nat_setup_hook)10561053 return -EAGAIN;
+32-12
net/openvswitch/actions.c
···11/*22- * Copyright (c) 2007-2011 Nicira Networks.22+ * Copyright (c) 2007-2012 Nicira Networks.33 *44 * This program is free software; you can redistribute it and/or55 * modify it under the terms of version 2 of the GNU General Public···145145 inet_proto_csum_replace4(&tcp_hdr(skb)->check, skb,146146 *addr, new_addr, 1);147147 } else if (nh->protocol == IPPROTO_UDP) {148148- if (likely(transport_len >= sizeof(struct udphdr)))149149- inet_proto_csum_replace4(&udp_hdr(skb)->check, skb,150150- *addr, new_addr, 1);148148+ if (likely(transport_len >= sizeof(struct udphdr))) {149149+ struct udphdr *uh = udp_hdr(skb);150150+151151+ if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) {152152+ inet_proto_csum_replace4(&uh->check, skb,153153+ *addr, new_addr, 1);154154+ if (!uh->check)155155+ uh->check = CSUM_MANGLED_0;156156+ }157157+ }151158 }152159153160 csum_replace4(&nh->check, *addr, new_addr);···204197 skb->rxhash = 0;205198}206199207207-static int set_udp_port(struct sk_buff *skb,208208- const struct ovs_key_udp *udp_port_key)200200+static void set_udp_port(struct sk_buff *skb, __be16 *port, __be16 new_port)201201+{202202+ struct udphdr *uh = udp_hdr(skb);203203+204204+ if (uh->check && skb->ip_summed != CHECKSUM_PARTIAL) {205205+ set_tp_port(skb, port, new_port, &uh->check);206206+207207+ if (!uh->check)208208+ uh->check = CSUM_MANGLED_0;209209+ } else {210210+ *port = new_port;211211+ skb->rxhash = 0;212212+ }213213+}214214+215215+static int set_udp(struct sk_buff *skb, const struct ovs_key_udp *udp_port_key)209216{210217 struct udphdr *uh;211218 int err;···231210232211 uh = udp_hdr(skb);233212 if (udp_port_key->udp_src != uh->source)234234- set_tp_port(skb, &uh->source, udp_port_key->udp_src, &uh->check);213213+ set_udp_port(skb, &uh->source, udp_port_key->udp_src);235214236215 if (udp_port_key->udp_dst != uh->dest)237237- set_tp_port(skb, &uh->dest, udp_port_key->udp_dst, &uh->check);216216+ set_udp_port(skb, &uh->dest, udp_port_key->udp_dst);238217239218 return 0;240219}241220242242-static int set_tcp_port(struct sk_buff *skb,243243- const struct ovs_key_tcp *tcp_port_key)221221+static int set_tcp(struct sk_buff *skb, const struct ovs_key_tcp *tcp_port_key)244222{245223 struct tcphdr *th;246224 int err;···348328 break;349329350330 case OVS_KEY_ATTR_TCP:351351- err = set_tcp_port(skb, nla_data(nested_attr));331331+ err = set_tcp(skb, nla_data(nested_attr));352332 break;353333354334 case OVS_KEY_ATTR_UDP:355355- err = set_udp_port(skb, nla_data(nested_attr));335335+ err = set_udp(skb, nla_data(nested_attr));356336 break;357337 }358338
+3
net/openvswitch/datapath.c
···15211521 vport = ovs_vport_locate(nla_data(a[OVS_VPORT_ATTR_NAME]));15221522 if (!vport)15231523 return ERR_PTR(-ENODEV);15241524+ if (ovs_header->dp_ifindex &&15251525+ ovs_header->dp_ifindex != get_dpifindex(vport->dp))15261526+ return ERR_PTR(-ENODEV);15241527 return vport;15251528 } else if (a[OVS_VPORT_ATTR_PORT_NO]) {15261529 u32 port_no = nla_get_u32(a[OVS_VPORT_ATTR_PORT_NO]);
···46294629 unsigned int val = AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN;46304630 if (no_hp_sensing(spec, i))46314631 continue;46324632- if (presence)46324632+ if (1 /*presence*/)46334633 stac92xx_set_pinctl(codec, cfg->hp_pins[i], val);46344634#if 0 /* FIXME */46354635/* Resetting the pinctl like below may lead to (a sort of) regressions
···112112 break;113113 case SND_SOC_DAIFMT_DSP_A:114114 /* data on rising edge of bclk, frame high 1clk before data */115115- strcr |= SSI_STCR_TFSL | SSI_STCR_TEFS;115115+ strcr |= SSI_STCR_TFSL | SSI_STCR_TXBIT0 | SSI_STCR_TEFS;116116 break;117117 }118118