]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branch 'pcc' into release
authorLen Brown <len.brown@intel.com>
Tue, 23 Feb 2010 05:39:00 +0000 (00:39 -0500)
committerLen Brown <len.brown@intel.com>
Tue, 23 Feb 2010 05:39:00 +0000 (00:39 -0500)
69 files changed:
Documentation/kernel-parameters.txt
MAINTAINERS
arch/arm/include/asm/cacheflush.h
arch/arm/kernel/setup.c
arch/arm/mach-gemini/gpio.c
arch/arm/mach-omap2/mux.c
arch/arm/mm/alignment.c
arch/arm/tools/mach-types
arch/mips/bcm47xx/prom.c
arch/mips/mm/highmem.c
arch/parisc/Kconfig
arch/sparc/include/asm/stat.h
arch/sparc/kernel/kstack.h
arch/sparc/kernel/of_device_32.c
arch/sparc/kernel/pci.c
arch/sparc/kernel/tsb.S
arch/x86/include/asm/processor.h
arch/x86/kernel/hw_breakpoint.c
arch/x86/kernel/ptrace.c
drivers/acpi/processor_idle.c
drivers/clocksource/cs5535-clockevt.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/radeon/r600_cp.c
drivers/gpu/drm/radeon/radeon_atombios.c
drivers/gpu/drm/radeon/radeon_connectors.c
drivers/gpu/drm/radeon/radeon_drv.h
drivers/gpu/drm/radeon/radeon_ring.c
drivers/gpu/drm/radeon/rv770.c
drivers/gpu/drm/ttm/ttm_tt.c
drivers/gpu/vga/vgaarb.c
drivers/input/input-polldev.c
drivers/input/touchscreen/usbtouchscreen.c
drivers/media/dvb/dvb-usb/Kconfig
drivers/media/dvb/frontends/l64781.c
drivers/media/video/bt8xx/bttv-driver.c
drivers/media/video/bt8xx/bttv-i2c.c
drivers/media/video/bt8xx/bttvp.h
drivers/media/video/mt9t112.c
drivers/media/video/pwc/pwc-ctrl.c
drivers/net/sfc/falcon_boards.c
drivers/net/sfc/mcdi.c
drivers/platform/x86/acer-wmi.c
drivers/scsi/arm/fas216.c
drivers/scsi/fcoe/fcoe.c
drivers/scsi/fcoe/libfcoe.c
drivers/scsi/libfc/fc_exch.c
drivers/scsi/libfc/fc_fcp.c
drivers/scsi/libfc/fc_lport.c
drivers/scsi/libfc/fc_rport.c
drivers/scsi/libiscsi_tcp.c
drivers/scsi/megaraid/megaraid_sas.c
drivers/video/efifb.c
drivers/watchdog/bfin_wdt.c
fs/cachefiles/namei.c
fs/exec.c
fs/namei.c
fs/nfsd/vfs.c
fs/proc/base.c
include/linux/amba/bus.h
include/linux/fs.h
kernel/perf_event.c
kernel/sys.c
lib/idr.c
mm/migrate.c
mm/oom_kill.c
net/core/net-sysfs.c
net/ipv4/devinet.c
net/ipv6/addrconf.c
tools/perf/util/probe-event.c

index 826b6e1483166d499ed9de7c2240dc35eb7d990a..e7848a0d99ebc8b04e9df1346a424827c31234cc 100644 (file)
@@ -315,6 +315,11 @@ and is between 256 and 4096 characters. It is defined in the file
        aic79xx=        [HW,SCSI]
                        See Documentation/scsi/aic79xx.txt.
 
+       alignment=      [KNL,ARM]
+                       Allow the default userspace alignment fault handler
+                       behaviour to be specified.  Bit 0 enables warnings,
+                       bit 1 enables fixups, and bit 2 sends a segfault.
+
        amd_iommu=      [HW,X86-84]
                        Pass parameters to the AMD IOMMU driver in the system.
                        Possible values are:
index 8ed3d0a8b3f4dbba1c8d5bbbe372759924b80ae9..c95f727236e1ce04d77e0d34484f44f70b8e020c 100644 (file)
@@ -616,10 +616,10 @@ M:        Richard Purdie <rpurdie@rpsys.net>
 S:     Maintained
 
 ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE
-M:     Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+M:     Paulius Zaleckas <paulius.zaleckas@gmail.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 T:     git git://gitorious.org/linux-gemini/mainline.git
-S:     Maintained
+S:     Odd Fixes
 F:     arch/arm/mach-gemini/
 
 ARM/EBSA110 MACHINE SUPPORT
@@ -641,9 +641,9 @@ T:  topgit git://git.openezx.org/openezx.git
 F:     arch/arm/mach-pxa/ezx.c
 
 ARM/FARADAY FA526 PORT
-M:     Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
+M:     Paulius Zaleckas <paulius.zaleckas@gmail.com>
 L:     linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
-S:     Maintained
+S:     Odd Fixes
 F:     arch/arm/mm/*-fa*
 
 ARM/FOOTBRIDGE ARCHITECTURE
index c77d2fa1f6e5c1151a4ffca7cc7182e34da9b32a..8113bb5fb66eb6f92378ad43ce0d2607fda3b08c 100644 (file)
@@ -42,7 +42,8 @@
 #endif
 
 #if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \
-    defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020)
+    defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) || \
+    defined(CONFIG_CPU_ARM1026)
 # define MULTI_CACHE 1
 #endif
 
index c6c57b640b6bfe5c1129251d0f0e6a497ebc1700..621acad8ea43c274b948c275c9de46177a42542e 100644 (file)
@@ -102,6 +102,7 @@ struct cpu_cache_fns cpu_cache;
 #endif
 #ifdef CONFIG_OUTER_CACHE
 struct outer_cache_fns outer_cache;
+EXPORT_SYMBOL(outer_cache);
 #endif
 
 struct stack {
index e7263854bc7b8ce1107757b13d3c17a6188677c9..fe3bd5ac8b10dd03b6841a028b035821b7c65fbf 100644 (file)
@@ -86,7 +86,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type)
        unsigned int reg_both, reg_level, reg_type;
 
        reg_type = __raw_readl(base + GPIO_INT_TYPE);
-       reg_level = __raw_readl(base + GPIO_INT_BOTH_EDGE);
+       reg_level = __raw_readl(base + GPIO_INT_LEVEL);
        reg_both = __raw_readl(base + GPIO_INT_BOTH_EDGE);
 
        switch (type) {
@@ -117,7 +117,7 @@ static int gpio_set_irq_type(unsigned int irq, unsigned int type)
        }
 
        __raw_writel(reg_type, base + GPIO_INT_TYPE);
-       __raw_writel(reg_level, base + GPIO_INT_BOTH_EDGE);
+       __raw_writel(reg_level, base + GPIO_INT_LEVEL);
        __raw_writel(reg_both, base + GPIO_INT_BOTH_EDGE);
 
        gpio_ack_irq(irq);
index 5fedc50c58e4ff05028397dde2f325d7773a0c3d..5fef73f4743dfc033d264e6f37b06d74f951ac28 100644 (file)
@@ -961,16 +961,14 @@ static void __init omap_mux_init_list(struct omap_mux *superset)
        while (superset->reg_offset !=  OMAP_MUX_TERMINATOR) {
                struct omap_mux *entry;
 
-#ifndef CONFIG_OMAP_MUX
-               /* Skip pins that are not muxed as GPIO by bootloader */
-               if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
+#ifdef CONFIG_OMAP_MUX
+               if (!superset->muxnames || !superset->muxnames[0]) {
                        superset++;
                        continue;
                }
-#endif
-
-#if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS)
-               if (!superset->muxnames || !superset->muxnames[0]) {
+#else
+               /* Skip pins that are not muxed as GPIO by bootloader */
+               if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) {
                        superset++;
                        continue;
                }
index b270d6228fe26ab7dea9a8e4d4c1f1bdeb804667..62820eda84d9ea89bb1ec729b8934c626a74c20a 100644 (file)
@@ -11,6 +11,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/moduleparam.h>
 #include <linux/compiler.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -77,6 +78,8 @@ static unsigned long ai_dword;
 static unsigned long ai_multi;
 static int ai_usermode;
 
+core_param(alignment, ai_usermode, int, 0600);
+
 #define UM_WARN                (1 << 0)
 #define UM_FIXUP       (1 << 1)
 #define UM_SIGNAL      (1 << 2)
index 5a79fc6ee818da483f543bef73b808ad3a1d4b0a..31c2f4c30a95b94631bc9e9568247e644b9d0eb2 100644 (file)
@@ -12,7 +12,7 @@
 #
 #   http://www.arm.linux.org.uk/developer/machines/?action=new
 #
-# Last update: Thu Jan 28 22:15:54 2010
+# Last update: Sat Feb 20 14:16:15 2010
 #
 # machine_is_xxx       CONFIG_xxxx             MACH_TYPE_xxx           number
 #
@@ -2257,7 +2257,7 @@ oratisalog                MACH_ORATISALOG         ORATISALOG              2268
 oratismadi             MACH_ORATISMADI         ORATISMADI              2269
 oratisot16             MACH_ORATISOT16         ORATISOT16              2270
 oratisdesk             MACH_ORATISDESK         ORATISDESK              2271
-v2_ca9                 MACH_V2P_CA9            V2P_CA9                 2272
+vexpress               MACH_VEXPRESS           VEXPRESS                2272
 sintexo                        MACH_SINTEXO            SINTEXO                 2273
 cm3389                 MACH_CM3389             CM3389                  2274
 omap3_cio              MACH_OMAP3_CIO          OMAP3_CIO               2275
@@ -2636,3 +2636,45 @@ hw90240                  MACH_HW90240            HW90240                 2648
 dm365_leopard          MACH_DM365_LEOPARD      DM365_LEOPARD           2649
 mityomapl138           MACH_MITYOMAPL138       MITYOMAPL138            2650
 scat110                        MACH_SCAT110            SCAT110                 2651
+acer_a1                        MACH_ACER_A1            ACER_A1                 2652
+cmcontrol              MACH_CMCONTROL          CMCONTROL               2653
+pelco_lamar            MACH_PELCO_LAMAR        PELCO_LAMAR             2654
+rfp43                  MACH_RFP43              RFP43                   2655
+sk86r0301              MACH_SK86R0301          SK86R0301               2656
+ctpxa                  MACH_CTPXA              CTPXA                   2657
+epb_arm9_a             MACH_EPB_ARM9_A         EPB_ARM9_A              2658
+guruplug               MACH_GURUPLUG           GURUPLUG                2659
+spear310               MACH_SPEAR310           SPEAR310                2660
+spear320               MACH_SPEAR320           SPEAR320                2661
+robotx                 MACH_ROBOTX             ROBOTX                  2662
+lsxhl                  MACH_LSXHL              LSXHL                   2663
+smartlite              MACH_SMARTLITE          SMARTLITE               2664
+cws2                   MACH_CWS2               CWS2                    2665
+m619                   MACH_M619               M619                    2666
+smartview              MACH_SMARTVIEW          SMARTVIEW               2667
+lsa_salsa              MACH_LSA_SALSA          LSA_SALSA               2668
+kizbox                 MACH_KIZBOX             KIZBOX                  2669
+htccharmer             MACH_HTCCHARMER         HTCCHARMER              2670
+guf_neso_lt            MACH_GUF_NESO_LT        GUF_NESO_LT             2671
+pm9g45                 MACH_PM9G45             PM9G45                  2672
+htcpanther             MACH_HTCPANTHER         HTCPANTHER              2673
+htcpanther_cdma                MACH_HTCPANTHER_CDMA    HTCPANTHER_CDMA         2674
+reb01                  MACH_REB01              REB01                   2675
+aquila                 MACH_AQUILA             AQUILA                  2676
+spark_sls_hw2          MACH_SPARK_SLS_HW2      SPARK_SLS_HW2           2677
+sheeva_esata           MACH_ESATA_SHEEVAPLUG   ESATA_SHEEVAPLUG        2678
+surf7x30               MACH_SURF7X30           SURF7X30                2679
+micro2440              MACH_MICRO2440          MICRO2440               2680
+am2440                 MACH_AM2440             AM2440                  2681
+tq2440                 MACH_TQ2440             TQ2440                  2682
+lpc2478oem             MACH_LPC2478OEM         LPC2478OEM              2683
+ak880x                 MACH_AK880X             AK880X                  2684
+cobra3530              MACH_COBRA3530          COBRA3530               2685
+pmppb                  MACH_PMPPB              PMPPB                   2686
+u6715                  MACH_U6715              U6715                   2687
+axar1500_sender                MACH_AXAR1500_SENDER    AXAR1500_SENDER         2688
+g30_dvb                        MACH_G30_DVB            G30_DVB                 2689
+vc088x                 MACH_VC088X             VC088X                  2690
+mioa702                        MACH_MIOA702            MIOA702                 2691
+hpmin                  MACH_HPMIN              HPMIN                   2692
+ak880xak               MACH_AK880XAK           AK880XAK                2693
index c51405e5792117d868b99dc2fe21c30c8f06061d..29d3cbf9555feae7f96e4faf6b076f797d5b14c4 100644 (file)
@@ -141,6 +141,14 @@ static __init void prom_init_mem(void)
                        break;
        }
 
+       /* Ignoring the last page when ddr size is 128M. Cached
+        * accesses to last page is causing the processor to prefetch
+        * using address above 128M stepping out of the ddr address
+        * space.
+        */
+       if (mem == 0x8000000)
+               mem -= 0x1000;
+
        add_memory_region(0, mem, BOOT_MEM_RAM);
 }
 
index e274fda329f4e5bc9ef0a90484972b650390e2b0..127d732474bf0ceb63dd38c75db8d0cfde1312c0 100644 (file)
@@ -1,5 +1,6 @@
 #include <linux/module.h>
 #include <linux/highmem.h>
+#include <linux/sched.h>
 #include <linux/smp.h>
 #include <asm/fixmap.h>
 #include <asm/tlbflush.h>
index 524d9352f17e56a4120008d601d219590fad6a23..f388dc68f60544cf941dfd66267b2a6f7167db1f 100644 (file)
@@ -18,7 +18,6 @@ config PARISC
        select BUG
        select HAVE_PERF_EVENTS
        select GENERIC_ATOMIC64 if !64BIT
-       select HAVE_ARCH_TRACEHOOK
        help
          The PA-RISC microprocessor is designed by Hewlett-Packard and used
          in many of their workstations & servers (HP9000 700 and 800 series,
index 55db5eca08e25da163b4c2156c51783b5b036f74..39327d6a57eb3b60b50d5bd47473c9f14223581c 100644 (file)
@@ -53,8 +53,8 @@ struct stat {
        ino_t           st_ino;
        mode_t          st_mode;
        short           st_nlink;
-       uid_t           st_uid;
-       gid_t           st_gid;
+       uid16_t         st_uid;
+       gid16_t         st_gid;
        unsigned short  st_rdev;
        off_t           st_size;
        time_t          st_atime;
index 4248d969272f1f92a7470a15bc631c72bd628f24..5247283d1c03e57c94d40ebfea4074cdf7db3100 100644 (file)
@@ -11,6 +11,10 @@ static inline bool kstack_valid(struct thread_info *tp, unsigned long sp)
 {
        unsigned long base = (unsigned long) tp;
 
+       /* Stack pointer must be 16-byte aligned.  */
+       if (sp & (16UL - 1))
+               return false;
+
        if (sp >= (base + sizeof(struct thread_info)) &&
            sp <= (base + THREAD_SIZE - sizeof(struct sparc_stackf)))
                return true;
index 4c26eb59e742ae0cd301ce0a982a8190dd7af6d6..53a58b34984910630ec44aac5ad5f44036447a75 100644 (file)
@@ -105,7 +105,7 @@ static unsigned long of_bus_sbus_get_flags(const u32 *addr, unsigned long flags)
 
 static int of_bus_ambapp_match(struct device_node *np)
 {
-       return !strcmp(np->name, "ambapp");
+       return !strcmp(np->type, "ambapp");
 }
 
 static void of_bus_ambapp_count_cells(struct device_node *child,
index 539e83f8e087a56bda4e0749ebb39329ea7eab93..592b03d85167231656812bb3e3df6a9dba462285 100644 (file)
@@ -247,6 +247,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
                                         struct pci_bus *bus, int devfn)
 {
        struct dev_archdata *sd;
+       struct pci_slot *slot;
        struct of_device *op;
        struct pci_dev *dev;
        const char *type;
@@ -286,6 +287,11 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
        dev->dev.bus = &pci_bus_type;
        dev->devfn = devfn;
        dev->multifunction = 0;         /* maybe a lie? */
+       set_pcie_port_type(dev);
+
+       list_for_each_entry(slot, &dev->bus->slots, list)
+               if (PCI_SLOT(dev->devfn) == slot->number)
+                       dev->slot = slot;
 
        dev->vendor = of_getintprop_default(node, "vendor-id", 0xffff);
        dev->device = of_getintprop_default(node, "device-id", 0xffff);
@@ -322,6 +328,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
 
        dev->current_state = 4;         /* unknown power state */
        dev->error_state = pci_channel_io_normal;
+       dev->dma_mask = 0xffffffff;
 
        if (!strcmp(node->name, "pci")) {
                /* a PCI-PCI bridge */
index 8c91d9b29a2f24023849498a41f440b5ec1e6938..db15d123f05447f9eac74c5fd168c14084eb25a3 100644 (file)
@@ -191,10 +191,12 @@ tsb_dtlb_load:
 
 tsb_itlb_load:
        /* Executable bit must be set.  */
-661:   andcc           %g5, _PAGE_EXEC_4U, %g0
-       .section        .sun4v_1insn_patch, "ax"
+661:   sethi           %hi(_PAGE_EXEC_4U), %g4
+       andcc           %g5, %g4, %g0
+       .section        .sun4v_2insn_patch, "ax"
        .word           661b
        andcc           %g5, _PAGE_EXEC_4V, %g0
+       nop
        .previous
 
        be,pn           %xcc, tsb_do_fault
index fc801bab1b3b7683f39d6e38e3a6fc17003e7da1..b753ea59703a114f056b32d9b1455622d7b131a9 100644 (file)
@@ -450,6 +450,8 @@ struct thread_struct {
        struct perf_event       *ptrace_bps[HBP_NUM];
        /* Debug status used for traps, single steps, etc... */
        unsigned long           debugreg6;
+       /* Keep track of the exact dr7 value set by the user */
+       unsigned long           ptrace_dr7;
        /* Fault info: */
        unsigned long           cr2;
        unsigned long           trap_no;
index 05d5fec64a9475855e224012dbb54a9d82b1ee4c..bb6006e3e295c1d554c0c442a04413a8ad92acd3 100644 (file)
@@ -212,25 +212,6 @@ static int arch_check_va_in_kernelspace(unsigned long va, u8 hbp_len)
        return (va >= TASK_SIZE) && ((va + len - 1) >= TASK_SIZE);
 }
 
-/*
- * Store a breakpoint's encoded address, length, and type.
- */
-static int arch_store_info(struct perf_event *bp)
-{
-       struct arch_hw_breakpoint *info = counter_arch_bp(bp);
-       /*
-        * For kernel-addresses, either the address or symbol name can be
-        * specified.
-        */
-       if (info->name)
-               info->address = (unsigned long)
-                               kallsyms_lookup_name(info->name);
-       if (info->address)
-               return 0;
-
-       return -EINVAL;
-}
-
 int arch_bp_generic_fields(int x86_len, int x86_type,
                           int *gen_len, int *gen_type)
 {
@@ -362,10 +343,13 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp,
                return ret;
        }
 
-       ret = arch_store_info(bp);
-
-       if (ret < 0)
-               return ret;
+       /*
+        * For kernel-addresses, either the address or symbol name can be
+        * specified.
+        */
+       if (info->name)
+               info->address = (unsigned long)
+                               kallsyms_lookup_name(info->name);
        /*
         * Check that the low-order bits of the address are appropriate
         * for the alignment implied by len.
index 017d937639fef87694eea7cd3cbbf95efb163d37..0c1033d61e59c07bd5a99b0a2c6f9c246352f61e 100644 (file)
@@ -702,7 +702,7 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n)
        } else if (n == 6) {
                val = thread->debugreg6;
         } else if (n == 7) {
-               val = ptrace_get_dr7(thread->ptrace_bps);
+               val = thread->ptrace_dr7;
        }
        return val;
 }
@@ -778,8 +778,11 @@ int ptrace_set_debugreg(struct task_struct *tsk, int n, unsigned long val)
                        return rc;
        }
        /* All that's left is DR7 */
-       if (n == 7)
+       if (n == 7) {
                rc = ptrace_write_dr7(tsk, val);
+               if (!rc)
+                       thread->ptrace_dr7 = val;
+       }
 
 ret_path:
        return rc;
index e88e8ae04fdbe5a9ecd8fe44c8128e65ab7f96bf..cc978a8c00b797d6c5e9d4300a857a7fa612d6ea 100644 (file)
@@ -880,12 +880,14 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev,
                return(acpi_idle_enter_c1(dev, state));
 
        local_irq_disable();
-       current_thread_info()->status &= ~TS_POLLING;
-       /*
-        * TS_POLLING-cleared state must be visible before we test
-        * NEED_RESCHED:
-        */
-       smp_mb();
+       if (cx->entry_method != ACPI_CSTATE_FFH) {
+               current_thread_info()->status &= ~TS_POLLING;
+               /*
+                * TS_POLLING-cleared state must be visible before we test
+                * NEED_RESCHED:
+                */
+               smp_mb();
+       }
 
        if (unlikely(need_resched())) {
                current_thread_info()->status |= TS_POLLING;
@@ -965,12 +967,14 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
        }
 
        local_irq_disable();
-       current_thread_info()->status &= ~TS_POLLING;
-       /*
-        * TS_POLLING-cleared state must be visible before we test
-        * NEED_RESCHED:
-        */
-       smp_mb();
+       if (cx->entry_method != ACPI_CSTATE_FFH) {
+               current_thread_info()->status &= ~TS_POLLING;
+               /*
+                * TS_POLLING-cleared state must be visible before we test
+                * NEED_RESCHED:
+                */
+               smp_mb();
+       }
 
        if (unlikely(need_resched())) {
                current_thread_info()->status |= TS_POLLING;
index 27d20fac19d153a9fca968fb169dbed9c1490e3f..b314a999aabea67ad637b6ebfde64beef6cb3aaa 100644 (file)
@@ -21,7 +21,7 @@
 
 #define DRV_NAME "cs5535-clockevt"
 
-static int timer_irq = CONFIG_CS5535_MFGPT_DEFAULT_IRQ;
+static int timer_irq;
 module_param_named(irq, timer_irq, int, 0644);
 MODULE_PARM_DESC(irq, "Which IRQ to use for the clock source MFGPT ticks.");
 
index 79beffcf5936cb2e0ab1fa51a19e29a9a09c3ea7..cf4cb3e9a0c22a5a244350db95f8d846b05e3fdb 100644 (file)
@@ -176,6 +176,8 @@ MODULE_DEVICE_TABLE(pci, pciidlist);
 
 static int i915_drm_freeze(struct drm_device *dev)
 {
+       struct drm_i915_private *dev_priv = dev->dev_private;
+
        pci_save_state(dev->pdev);
 
        /* If KMS is active, we do the leavevt stuff here */
@@ -191,17 +193,12 @@ static int i915_drm_freeze(struct drm_device *dev)
 
        i915_save_state(dev);
 
-       return 0;
-}
-
-static void i915_drm_suspend(struct drm_device *dev)
-{
-       struct drm_i915_private *dev_priv = dev->dev_private;
-
        intel_opregion_free(dev, 1);
 
        /* Modeset on resume, not lid events */
        dev_priv->modeset_on_lid = 0;
+
+       return 0;
 }
 
 static int i915_suspend(struct drm_device *dev, pm_message_t state)
@@ -221,8 +218,6 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
        if (error)
                return error;
 
-       i915_drm_suspend(dev);
-
        if (state.event == PM_EVENT_SUSPEND) {
                /* Shut down the device */
                pci_disable_device(dev->pdev);
@@ -237,6 +232,10 @@ static int i915_drm_thaw(struct drm_device *dev)
        struct drm_i915_private *dev_priv = dev->dev_private;
        int error = 0;
 
+       i915_restore_state(dev);
+
+       intel_opregion_init(dev, 1);
+
        /* KMS EnterVT equivalent */
        if (drm_core_check_feature(dev, DRIVER_MODESET)) {
                mutex_lock(&dev->struct_mutex);
@@ -263,10 +262,6 @@ static int i915_resume(struct drm_device *dev)
 
        pci_set_master(dev->pdev);
 
-       i915_restore_state(dev);
-
-       intel_opregion_init(dev, 1);
-
        return i915_drm_thaw(dev);
 }
 
@@ -423,8 +418,6 @@ static int i915_pm_suspend(struct device *dev)
        if (error)
                return error;
 
-       i915_drm_suspend(drm_dev);
-
        pci_disable_device(pdev);
        pci_set_power_state(pdev, PCI_D3hot);
 
@@ -464,13 +457,8 @@ static int i915_pm_poweroff(struct device *dev)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
        struct drm_device *drm_dev = pci_get_drvdata(pdev);
-       int error;
-
-       error = i915_drm_freeze(drm_dev);
-       if (!error)
-               i915_drm_suspend(drm_dev);
 
-       return error;
+       return i915_drm_freeze(drm_dev);
 }
 
 const struct dev_pm_ops i915_pm_ops = {
index 6d5a711c2e91c63818c5a86ca1a6e4e194b418ff..75bcf35a09312437f0df3c77ffb51e2548218aa8 100644 (file)
@@ -1428,9 +1428,12 @@ static void r700_gfx_init(struct drm_device *dev,
 
        gb_tiling_config |= R600_BANK_SWAPS(1);
 
-       backend_map = r700_get_tile_pipe_to_backend_map(dev_priv->r600_max_tile_pipes,
-                                                       dev_priv->r600_max_backends,
-                                                       (0xff << dev_priv->r600_max_backends) & 0xff);
+       if ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV740)
+               backend_map = 0x28;
+       else
+               backend_map = r700_get_tile_pipe_to_backend_map(dev_priv->r600_max_tile_pipes,
+                                                               dev_priv->r600_max_backends,
+                                                               (0xff << dev_priv->r600_max_backends) & 0xff);
        gb_tiling_config |= R600_BACKEND_MAP(backend_map);
 
        cc_gc_shader_pipe_config =
index 2dcda6115874065b40a3e56240c6a42db01b0e0f..4d8831548a5fc6f6b8e6f1522836853cf2e10832 100644 (file)
@@ -206,6 +206,15 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
                        *connector_type = DRM_MODE_CONNECTOR_DVID;
        }
 
+       /* Asrock RS600 board lists the DVI port as HDMI */
+       if ((dev->pdev->device == 0x7941) &&
+           (dev->pdev->subsystem_vendor == 0x1849) &&
+           (dev->pdev->subsystem_device == 0x7941)) {
+               if ((*connector_type == DRM_MODE_CONNECTOR_HDMIA) &&
+                   (supported_device == ATOM_DEVICE_DFP3_SUPPORT))
+                       *connector_type = DRM_MODE_CONNECTOR_DVID;
+       }
+
        /* a-bit f-i90hd - ciaranm on #radeonhd - this board has no DVI */
        if ((dev->pdev->device == 0x7941) &&
            (dev->pdev->subsystem_vendor == 0x147b) &&
index 23818854001771bd56d3e463180f193a41b9a61b..65f81942f3994684e829b79bec2a7a7b1d9422b1 100644 (file)
@@ -780,7 +780,7 @@ static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connect
                         * connected and the DVI port disconnected.  If the edid doesn't
                         * say HDMI, vice versa.
                         */
-                       if (radeon_connector->shared_ddc && connector_status_connected) {
+                       if (radeon_connector->shared_ddc && (ret == connector_status_connected)) {
                                struct drm_device *dev = connector->dev;
                                struct drm_connector *list_connector;
                                struct radeon_connector *list_radeon_connector;
@@ -1060,8 +1060,7 @@ radeon_add_atom_connector(struct drm_device *dev,
                        return;
                }
                if (radeon_connector->ddc_bus && i2c_bus->valid) {
-                       if (memcmp(&radeon_connector->ddc_bus->rec, i2c_bus,
-                                   sizeof(struct radeon_i2c_bus_rec)) == 0) {
+                       if (radeon_connector->ddc_bus->rec.i2c_id == i2c_bus->i2c_id) {
                                radeon_connector->shared_ddc = true;
                                shared_ddc = true;
                        }
index e13785282a825bbdbae44bb65fa02e3c93b8173b..c57ad606504dfcb3cee7b66103aac1ab834daec9 100644 (file)
  * 1.29- R500 3D cmd buffer support
  * 1.30- Add support for occlusion queries
  * 1.31- Add support for num Z pipes from GET_PARAM
+ * 1.32- fixes for rv740 setup
  */
 #define DRIVER_MAJOR           1
-#define DRIVER_MINOR           31
+#define DRIVER_MINOR           32
 #define DRIVER_PATCHLEVEL      0
 
 enum radeon_cp_microcode_version {
index 694799f6fac1e7fd75c60d79398216d34e249de2..6579eb4c1f287007a3f22179c4593db621d12228 100644 (file)
@@ -100,6 +100,8 @@ void radeon_ib_free(struct radeon_device *rdev, struct radeon_ib **ib)
        if (tmp == NULL) {
                return;
        }
+       if (!tmp->fence->emited)
+               radeon_fence_unref(&tmp->fence);
        mutex_lock(&rdev->ib_pool.mutex);
        tmp->free = true;
        mutex_unlock(&rdev->ib_pool.mutex);
index 5943d561fd1e2685803175c176c0624912ff9b99..03021674d097bac2605debedfff0987bfda7377b 100644 (file)
@@ -549,9 +549,12 @@ static void rv770_gpu_init(struct radeon_device *rdev)
 
        gb_tiling_config |= BANK_SWAPS(1);
 
-       backend_map = r700_get_tile_pipe_to_backend_map(rdev->config.rv770.max_tile_pipes,
-                                                       rdev->config.rv770.max_backends,
-                                                       (0xff << rdev->config.rv770.max_backends) & 0xff);
+       if (rdev->family == CHIP_RV740)
+               backend_map = 0x28;
+       else
+               backend_map = r700_get_tile_pipe_to_backend_map(rdev->config.rv770.max_tile_pipes,
+                                                               rdev->config.rv770.max_backends,
+                                                               (0xff << rdev->config.rv770.max_backends) & 0xff);
        gb_tiling_config |= BACKEND_MAP(backend_map);
 
        cc_gc_shader_pipe_config =
index e2123af7775aa63482b59e4510998fe9573ceb18..3d47a2c12322173fa3621e9cb5886408dcb1c19e 100644 (file)
@@ -196,14 +196,15 @@ EXPORT_SYMBOL(ttm_tt_populate);
 
 #ifdef CONFIG_X86
 static inline int ttm_tt_set_page_caching(struct page *p,
-                                         enum ttm_caching_state c_state)
+                                         enum ttm_caching_state c_old,
+                                         enum ttm_caching_state c_new)
 {
        int ret = 0;
 
        if (PageHighMem(p))
                return 0;
 
-       if (get_page_memtype(p) != -1) {
+       if (c_old != tt_cached) {
                /* p isn't in the default caching state, set it to
                 * writeback first to free its current memtype. */
 
@@ -212,16 +213,17 @@ static inline int ttm_tt_set_page_caching(struct page *p,
                        return ret;
        }
 
-       if (c_state == tt_wc)
+       if (c_new == tt_wc)
                ret = set_memory_wc((unsigned long) page_address(p), 1);
-       else if (c_state == tt_uncached)
+       else if (c_new == tt_uncached)
                ret = set_pages_uc(p, 1);
 
        return ret;
 }
 #else /* CONFIG_X86 */
 static inline int ttm_tt_set_page_caching(struct page *p,
-                                         enum ttm_caching_state c_state)
+                                         enum ttm_caching_state c_old,
+                                         enum ttm_caching_state c_new)
 {
        return 0;
 }
@@ -254,7 +256,9 @@ static int ttm_tt_set_caching(struct ttm_tt *ttm,
        for (i = 0; i < ttm->num_pages; ++i) {
                cur_page = ttm->pages[i];
                if (likely(cur_page != NULL)) {
-                       ret = ttm_tt_set_page_caching(cur_page, c_state);
+                       ret = ttm_tt_set_page_caching(cur_page,
+                                                     ttm->caching_state,
+                                                     c_state);
                        if (unlikely(ret != 0))
                                goto out_err;
                }
@@ -268,7 +272,7 @@ out_err:
        for (j = 0; j < i; ++j) {
                cur_page = ttm->pages[j];
                if (likely(cur_page != NULL)) {
-                       (void)ttm_tt_set_page_caching(cur_page,
+                       (void)ttm_tt_set_page_caching(cur_page, c_state,
                                                      ttm->caching_state);
                }
        }
index 24b56dc5459730d47b6c7b606324ec13a64b5804..2f6cf69ecb394ce324c6a5c5090e5cbf046e1ccf 100644 (file)
@@ -961,7 +961,7 @@ static ssize_t vga_arb_write(struct file *file, const char __user * buf,
                remaining -= 7;
                pr_devel("client 0x%p called 'target'\n", priv);
                /* if target is default */
-               if (!strncmp(kbuf, "default", 7))
+               if (!strncmp(curr_pos, "default", 7))
                        pdev = pci_dev_get(vga_default_device());
                else {
                        if (!vga_pci_str_to_vars(curr_pos, remaining,
index aa6713b4a9888e64ed99a92f78e1e1cd2bb9ca56..291d9393d359c8e0e7f82a0d20e4a2cfc0f2e8a6 100644 (file)
@@ -100,6 +100,12 @@ static void input_close_polled_device(struct input_dev *input)
        struct input_polled_dev *dev = input_get_drvdata(input);
 
        cancel_delayed_work_sync(&dev->work);
+       /*
+        * Clean up work struct to remove references to the workqueue.
+        * It may be destroyed by the next call. This causes problems
+        * at next device open-close in case of poll_interval == 0.
+        */
+       INIT_DELAYED_WORK(&dev->work, dev->work.work.func);
        input_polldev_stop_workqueue();
 
        if (dev->close)
index 09a5e7341bd5a7633166dbd8c2a5f17d00cf6da3..5256123a52285c35ed352d980ec7ad4641f941ee 100644 (file)
@@ -618,8 +618,8 @@ static int idealtek_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 #ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
 static int general_touch_read_data(struct usbtouch_usb *dev, unsigned char *pkt)
 {
-       dev->x = ((pkt[2] & 0x0F) << 8) | pkt[1] ;
-       dev->y = ((pkt[4] & 0x0F) << 8) | pkt[3] ;
+       dev->x = (pkt[2] << 8) | pkt[1];
+       dev->y = (pkt[4] << 8) | pkt[3];
        dev->press = pkt[5] & 0xff;
        dev->touch = pkt[0] & 0x01;
 
@@ -809,9 +809,9 @@ static struct usbtouch_device_info usbtouch_dev_info[] = {
 #ifdef CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH
        [DEVTYPE_GENERAL_TOUCH] = {
                .min_xc         = 0x0,
-               .max_xc         = 0x0500,
+               .max_xc         = 0x7fff,
                .min_yc         = 0x0,
-               .max_yc         = 0x0500,
+               .max_yc         = 0x7fff,
                .rept_size      = 7,
                .read_data      = general_touch_read_data,
        },
index 1b249897c9fbecf6c82fa9017e562d94b5909e46..465295b1d14b261f578fb14d4088dd719f66c8e9 100644 (file)
@@ -112,11 +112,13 @@ config DVB_USB_CXUSB
        select DVB_MT352 if !DVB_FE_CUSTOMISE
        select DVB_ZL10353 if !DVB_FE_CUSTOMISE
        select DVB_DIB7000P if !DVB_FE_CUSTOMISE
-       select DVB_LGS8GL5 if !DVB_FE_CUSTOMISE
        select DVB_TUNER_DIB0070 if !DVB_FE_CUSTOMISE
+       select DVB_ATBM8830 if !DVB_FE_CUSTOMISE
+       select DVB_LGS8GXX if !DVB_FE_CUSTOMISE
        select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMISE
        select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMISE
        select MEDIA_TUNER_MXL5005S if !MEDIA_TUNER_CUSTOMISE
+       select MEDIA_TUNER_MAX2165 if !MEDIA_TUNER_CUSTOMISE
        help
          Say Y here to support the Conexant USB2.0 hybrid reference design.
          Currently, only DVB and ATSC modes are supported, analog mode
index 3051b64aa17c6bd3c8d7b3fbaad1727908d92b26..445fa10680644c9d546d5aa8644947e6b5587573 100644 (file)
@@ -192,8 +192,8 @@ static int apply_frontend_param (struct dvb_frontend* fe, struct dvb_frontend_pa
        spi_bias *= qam_tab[p->constellation];
        spi_bias /= p->code_rate_HP + 1;
        spi_bias /= (guard_tab[p->guard_interval] + 32);
-       spi_bias *= 1000ULL;
-       spi_bias /= 1000ULL + ppm/1000;
+       spi_bias *= 1000;
+       spi_bias /= 1000 + ppm/1000;
        spi_bias *= p->code_rate_HP;
 
        val0x04 = (p->transmission_mode << 2) | p->guard_interval;
index 3182a406bdd1ad11ae7f3ba41bd44fa543dd764a..ae08b077fd04b017fe1966041d0f3cd851a4577e 100644 (file)
@@ -4461,6 +4461,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
                request_modules(btv);
        }
 
+       init_bttv_i2c_ir(btv);
        bttv_input_init(btv);
 
        /* everything is fine */
index 63aa31a041e848846998515f1b1dc825ebc62c5a..407fa61e4cdab12269358063b562157b1c6c0a31 100644 (file)
@@ -388,7 +388,12 @@ int __devinit init_bttv_i2c(struct bttv *btv)
        if (0 == btv->i2c_rc && i2c_scan)
                do_i2c_scan(btv->c.v4l2_dev.name, &btv->i2c_client);
 
-       /* Instantiate the IR receiver device, if present */
+       return btv->i2c_rc;
+}
+
+/* Instantiate the I2C IR receiver device, if present */
+void __devinit init_bttv_i2c_ir(struct bttv *btv)
+{
        if (0 == btv->i2c_rc) {
                struct i2c_board_info info;
                /* The external IR receiver is at i2c address 0x34 (0x35 for
@@ -408,7 +413,6 @@ int __devinit init_bttv_i2c(struct bttv *btv)
                strlcpy(info.type, "ir_video", I2C_NAME_SIZE);
                i2c_new_probed_device(&btv->c.i2c_adap, &info, addr_list);
        }
-       return btv->i2c_rc;
 }
 
 int __devexit fini_bttv_i2c(struct bttv *btv)
index a1d0e9c9f2866ea3a11b24f4357ac31547899b4b..6cccc2a17eee074f121fee7aabbb581223df1905 100644 (file)
@@ -279,6 +279,7 @@ extern unsigned int bttv_debug;
 extern unsigned int bttv_gpio;
 extern void bttv_gpio_tracking(struct bttv *btv, char *comment);
 extern int init_bttv_i2c(struct bttv *btv);
+extern void init_bttv_i2c_ir(struct bttv *btv);
 extern int fini_bttv_i2c(struct bttv *btv);
 
 #define bttv_printk if (bttv_verbose) printk
index fc4dd6045720a0bcabafa3f91b14b7e5366ec461..7438f8d775ba7fa09fb32f9ad2f0a8934606afb5 100644 (file)
@@ -514,7 +514,7 @@ static int mt9t112_init_pll(const struct i2c_client *client)
        /* poll to verify out of standby. Must Poll this bit */
        for (i = 0; i < 100; i++) {
                mt9t112_reg_read(data, client, 0x0018);
-               if (0x4000 & data)
+               if (!(0x4000 & data))
                        break;
 
                mdelay(10);
index 50b415e07edaba9280516850d8856a487cc29d44..f7f7e04cf4853e02a5c0cd11d051433e6387f1a5 100644 (file)
@@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_device *pdev, int mode, int value)
                buf[0] = 0xff; /* fixed */
 
        ret = send_control_msg(pdev,
-               SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf));
+               SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1);
 
        if (!mode && ret >= 0) {
                if (value < 0)
index bf0b96af5334d80eafe634e38b65938259d23446..5712fddd72f2ea839985c3a4cd5f3a05729dc0c1 100644 (file)
 #define FALCON_BOARD_SFN4111T 0x51
 #define FALCON_BOARD_SFN4112F 0x52
 
+/* Board temperature is about 15°C above ambient when air flow is
+ * limited. */
+#define FALCON_BOARD_TEMP_BIAS 15
+
+/* SFC4000 datasheet says: 'The maximum permitted junction temperature
+ * is 125°C; the thermal design of the environment for the SFC4000
+ * should aim to keep this well below 100°C.' */
+#define FALCON_JUNC_TEMP_MAX   90
+
 /*****************************************************************************
  * Support for LM87 sensor chip used on several boards
  */
@@ -548,16 +557,16 @@ fail_hwmon:
 static u8 sfe4002_lm87_channel = 0x03; /* use AIN not FAN inputs */
 
 static const u8 sfe4002_lm87_regs[] = {
-       LM87_IN_LIMITS(0, 0x83, 0x91),          /* 2.5V:  1.8V +/- 5% */
-       LM87_IN_LIMITS(1, 0x51, 0x5a),          /* Vccp1: 1.2V +/- 5% */
-       LM87_IN_LIMITS(2, 0xb6, 0xca),          /* 3.3V:  3.3V +/- 5% */
-       LM87_IN_LIMITS(3, 0xb0, 0xc9),          /* 5V:    4.6-5.2V */
-       LM87_IN_LIMITS(4, 0xb0, 0xe0),          /* 12V:   11-14V */
-       LM87_IN_LIMITS(5, 0x44, 0x4b),          /* Vccp2: 1.0V +/- 5% */
-       LM87_AIN_LIMITS(0, 0xa0, 0xb2),         /* AIN1:  1.66V +/- 5% */
-       LM87_AIN_LIMITS(1, 0x91, 0xa1),         /* AIN2:  1.5V +/- 5% */
-       LM87_TEMP_INT_LIMITS(10, 60),           /* board */
-       LM87_TEMP_EXT1_LIMITS(10, 70),          /* Falcon */
+       LM87_IN_LIMITS(0, 0x7c, 0x99),          /* 2.5V:  1.8V +/- 10% */
+       LM87_IN_LIMITS(1, 0x4c, 0x5e),          /* Vccp1: 1.2V +/- 10% */
+       LM87_IN_LIMITS(2, 0xac, 0xd4),          /* 3.3V:  3.3V +/- 10% */
+       LM87_IN_LIMITS(3, 0xac, 0xd4),          /* 5V:    5.0V +/- 10% */
+       LM87_IN_LIMITS(4, 0xac, 0xe0),          /* 12V:   10.8-14V */
+       LM87_IN_LIMITS(5, 0x3f, 0x4f),          /* Vccp2: 1.0V +/- 10% */
+       LM87_AIN_LIMITS(0, 0x98, 0xbb),         /* AIN1:  1.66V +/- 10% */
+       LM87_AIN_LIMITS(1, 0x8a, 0xa9),         /* AIN2:  1.5V +/- 10% */
+       LM87_TEMP_INT_LIMITS(0, 80 + FALCON_BOARD_TEMP_BIAS),
+       LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX),
        0
 };
 
@@ -619,14 +628,14 @@ static int sfe4002_init(struct efx_nic *efx)
 static u8 sfn4112f_lm87_channel = 0x03; /* use AIN not FAN inputs */
 
 static const u8 sfn4112f_lm87_regs[] = {
-       LM87_IN_LIMITS(0, 0x83, 0x91),          /* 2.5V:  1.8V +/- 5% */
-       LM87_IN_LIMITS(1, 0x51, 0x5a),          /* Vccp1: 1.2V +/- 5% */
-       LM87_IN_LIMITS(2, 0xb6, 0xca),          /* 3.3V:  3.3V +/- 5% */
-       LM87_IN_LIMITS(4, 0xb0, 0xe0),          /* 12V:   11-14V */
-       LM87_IN_LIMITS(5, 0x44, 0x4b),          /* Vccp2: 1.0V +/- 5% */
-       LM87_AIN_LIMITS(1, 0x91, 0xa1),         /* AIN2:  1.5V +/- 5% */
-       LM87_TEMP_INT_LIMITS(10, 60),           /* board */
-       LM87_TEMP_EXT1_LIMITS(10, 70),          /* Falcon */
+       LM87_IN_LIMITS(0, 0x7c, 0x99),          /* 2.5V:  1.8V +/- 10% */
+       LM87_IN_LIMITS(1, 0x4c, 0x5e),          /* Vccp1: 1.2V +/- 10% */
+       LM87_IN_LIMITS(2, 0xac, 0xd4),          /* 3.3V:  3.3V +/- 10% */
+       LM87_IN_LIMITS(4, 0xac, 0xe0),          /* 12V:   10.8-14V */
+       LM87_IN_LIMITS(5, 0x3f, 0x4f),          /* Vccp2: 1.0V +/- 10% */
+       LM87_AIN_LIMITS(1, 0x8a, 0xa9),         /* AIN2:  1.5V +/- 10% */
+       LM87_TEMP_INT_LIMITS(0, 60 + FALCON_BOARD_TEMP_BIAS),
+       LM87_TEMP_EXT1_LIMITS(0, FALCON_JUNC_TEMP_MAX),
        0
 };
 
index 9f035b9f03503245ca38c44d058cf350958d3884..f66b3da6ddffbecc236a7d2e6a83506bb0b71a34 100644 (file)
@@ -127,7 +127,7 @@ static int efx_mcdi_poll(struct efx_nic *efx)
        efx_dword_t reg;
 
        /* Check for a reboot atomically with respect to efx_mcdi_copyout() */
-       rc = efx_mcdi_poll_reboot(efx);
+       rc = -efx_mcdi_poll_reboot(efx);
        if (rc)
                goto out;
 
index 07d14dfdf0b42f01caab15df68123f023219517c..226b3e93498c45d8f63fc2f67544950a512b20cd 100644 (file)
@@ -934,7 +934,7 @@ static int __devinit acer_backlight_init(struct device *dev)
        acer_backlight_device = bd;
 
        bd->props.power = FB_BLANK_UNBLANK;
-       bd->props.brightness = max_brightness;
+       bd->props.brightness = read_brightness(bd);
        bd->props.max_brightness = max_brightness;
        backlight_update_status(bd);
        return 0;
index 477542602284661dbcb7d0d65d65223d612d3ec4..9e71ac611146ab86432664af1c2a40c7d2070ea0 100644 (file)
@@ -2516,7 +2516,7 @@ int fas216_eh_device_reset(struct scsi_cmnd *SCpnt)
                if (info->scsi.phase == PHASE_IDLE)
                        fas216_kick(info);
 
-               mod_timer(&info->eh_timer, 30 * HZ);
+               mod_timer(&info->eh_timer, jiffies + 30 * HZ);
                spin_unlock_irqrestore(&info->host_lock, flags);
 
                /*
index 10be9f36a4cc01b3ce9ce14a0d78f88dd1a6a30a..2f47ae7cce91a21069d4335b603bc26aa6320613 100644 (file)
@@ -2009,6 +2009,8 @@ static int fcoe_destroy(const char *buffer, struct kernel_param *kp)
        fcoe_interface_cleanup(fcoe);
        rtnl_unlock();
        fcoe_if_destroy(fcoe->ctlr.lp);
+       module_put(THIS_MODULE);
+
 out_putdev:
        dev_put(netdev);
 out_nodev:
@@ -2059,6 +2061,11 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp)
        }
 #endif
 
+       if (!try_module_get(THIS_MODULE)) {
+               rc = -EINVAL;
+               goto out_nomod;
+       }
+
        rtnl_lock();
        netdev = fcoe_if_to_netdev(buffer);
        if (!netdev) {
@@ -2099,17 +2106,24 @@ static int fcoe_create(const char *buffer, struct kernel_param *kp)
        if (!fcoe_link_ok(lport))
                fcoe_ctlr_link_up(&fcoe->ctlr);
 
-       rc = 0;
-out_free:
        /*
         * Release from init in fcoe_interface_create(), on success lport
         * should be holding a reference taken in fcoe_if_create().
         */
        fcoe_interface_put(fcoe);
+       dev_put(netdev);
+       rtnl_unlock();
+       mutex_unlock(&fcoe_config_mutex);
+
+       return 0;
+out_free:
+       fcoe_interface_put(fcoe);
 out_putdev:
        dev_put(netdev);
 out_nodev:
        rtnl_unlock();
+       module_put(THIS_MODULE);
+out_nomod:
        mutex_unlock(&fcoe_config_mutex);
        return rc;
 }
index 9823291395ad677578c79d26fb3cdb67da46391b..511cb6b371eec6429b92cd7a9bfd7c626a1d0357 100644 (file)
@@ -1187,7 +1187,7 @@ static void fcoe_ctlr_timeout(unsigned long arg)
                        next_timer = fip->ctlr_ka_time;
 
                if (time_after_eq(jiffies, fip->port_ka_time)) {
-                       fip->port_ka_time += jiffies +
+                       fip->port_ka_time = jiffies +
                                msecs_to_jiffies(FIP_VN_KA_PERIOD);
                        fip->send_port_ka = 1;
                }
index 19d711cb938c72e7b2a096bde9eca85662e9c3f9..7f4364770e4a5b90050e28fbc5cbe8fb634e8e88 100644 (file)
@@ -1890,7 +1890,7 @@ static struct fc_seq *fc_exch_seq_send(struct fc_lport *lport,
        fc_exch_setup_hdr(ep, fp, ep->f_ctl);
        sp->cnt++;
 
-       if (ep->xid <= lport->lro_xid)
+       if (ep->xid <= lport->lro_xid && fh->fh_r_ctl == FC_RCTL_DD_UNSOL_CMD)
                fc_fcp_ddp_setup(fr_fsp(fp), ep->xid);
 
        if (unlikely(lport->tt.frame_send(lport, fp)))
index 881d5dfe8c74f5a37c58474690c832d1d1ac1a78..6fde2fabfd9bd920864ab18335093c03588ed8d7 100644 (file)
@@ -298,9 +298,6 @@ void fc_fcp_ddp_setup(struct fc_fcp_pkt *fsp, u16 xid)
 {
        struct fc_lport *lport;
 
-       if (!fsp)
-               return;
-
        lport = fsp->lp;
        if ((fsp->req_flags & FC_SRB_READ) &&
            (lport->lro_enabled) && (lport->tt.ddp_setup)) {
index 0b165024a2196a2458f546296bd3471b6e9dd8e3..7ec8ce75007c06ba4bcbe02b3dd81071818c394e 100644 (file)
@@ -1800,7 +1800,8 @@ int fc_lport_bsg_request(struct fc_bsg_job *job)
        u32 did;
 
        job->reply->reply_payload_rcv_len = 0;
-       rsp->resid_len = job->reply_payload.payload_len;
+       if (rsp)
+               rsp->resid_len = job->reply_payload.payload_len;
 
        mutex_lock(&lport->lp_mutex);
 
index 02300523b2341c77d9c4015bafab120f96d229ce..97923bb07765e60cc43c121666c0e9b19a4734fb 100644 (file)
@@ -623,7 +623,7 @@ static void fc_rport_plogi_resp(struct fc_seq *sp, struct fc_frame *fp,
 
                tov = ntohl(plp->fl_csp.sp_e_d_tov);
                if (ntohs(plp->fl_csp.sp_features) & FC_SP_FT_EDTR)
-                       tov /= 1000;
+                       tov /= 1000000;
                if (tov > rdata->e_d_tov)
                        rdata->e_d_tov = tov;
                csp_seq = ntohs(plp->fl_csp.sp_tot_seq);
index db6856c138fcd9d28af1c422bc2c0333540de328..4ad87fd74ddd926be593e684ca3d9c0f37bb9917 100644 (file)
@@ -992,12 +992,10 @@ static struct iscsi_r2t_info *iscsi_tcp_get_curr_r2t(struct iscsi_task *task)
                if (r2t == NULL) {
                        if (kfifo_out(&tcp_task->r2tqueue,
                            (void *)&tcp_task->r2t, sizeof(void *)) !=
-                           sizeof(void *)) {
-                               WARN_ONCE(1, "unexpected fifo state");
+                           sizeof(void *))
                                r2t = NULL;
-                       }
-
-                       r2t = tcp_task->r2t;
+                       else
+                               r2t = tcp_task->r2t;
                }
                spin_unlock_bh(&session->lock);
        }
index 708ea3157b60295cd0ae806404ab4dd4e9bd3640..d9b8ca5116bc3d80935df266674127761ad27d9b 100644 (file)
@@ -3781,6 +3781,7 @@ static int megasas_mgmt_compat_ioctl_fw(struct file *file, unsigned long arg)
            compat_alloc_user_space(sizeof(struct megasas_iocpacket));
        int i;
        int error = 0;
+       compat_uptr_t ptr;
 
        if (clear_user(ioc, sizeof(*ioc)))
                return -EFAULT;
@@ -3793,9 +3794,22 @@ static int megasas_mgmt_compat_ioctl_fw(struct file *file, unsigned long arg)
            copy_in_user(&ioc->sge_count, &cioc->sge_count, sizeof(u32)))
                return -EFAULT;
 
-       for (i = 0; i < MAX_IOCTL_SGE; i++) {
-               compat_uptr_t ptr;
+       /*
+        * The sense_ptr is used in megasas_mgmt_fw_ioctl only when
+        * sense_len is not null, so prepare the 64bit value under
+        * the same condition.
+        */
+       if (ioc->sense_len) {
+               void __user **sense_ioc_ptr =
+                       (void __user **)(ioc->frame.raw + ioc->sense_off);
+               compat_uptr_t *sense_cioc_ptr =
+                       (compat_uptr_t *)(cioc->frame.raw + cioc->sense_off);
+               if (get_user(ptr, sense_cioc_ptr) ||
+                   put_user(compat_ptr(ptr), sense_ioc_ptr))
+                       return -EFAULT;
+       }
 
+       for (i = 0; i < MAX_IOCTL_SGE; i++) {
                if (get_user(ptr, &cioc->sgl[i].iov_base) ||
                    put_user(compat_ptr(ptr), &ioc->sgl[i].iov_base) ||
                    copy_in_user(&ioc->sgl[i].iov_len,
index eb12182b20598861937b46496b8716efcae1e366..d25df51bb0d2b3160efe478fb4e64f968014ea04 100644 (file)
@@ -161,8 +161,17 @@ static int efifb_setcolreg(unsigned regno, unsigned red, unsigned green,
        return 0;
 }
 
+static void efifb_destroy(struct fb_info *info)
+{
+       if (info->screen_base)
+               iounmap(info->screen_base);
+       release_mem_region(info->aperture_base, info->aperture_size);
+       framebuffer_release(info);
+}
+
 static struct fb_ops efifb_ops = {
        .owner          = THIS_MODULE,
+       .fb_destroy     = efifb_destroy,
        .fb_setcolreg   = efifb_setcolreg,
        .fb_fillrect    = cfb_fillrect,
        .fb_copyarea    = cfb_copyarea,
@@ -281,7 +290,7 @@ static int __init efifb_probe(struct platform_device *dev)
        info->par = NULL;
 
        info->aperture_base = efifb_fix.smem_start;
-       info->aperture_size = size_total;
+       info->aperture_size = size_remap;
 
        info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len);
        if (!info->screen_base) {
index c7b3f9df2317387401961450f9746ed093a97e27..2159e668751cd7db5e9ddfb39c96984573801539 100644 (file)
@@ -1,9 +1,8 @@
 /*
  * Blackfin On-Chip Watchdog Driver
- *  Supports BF53[123]/BF53[467]/BF54[2489]/BF561
  *
  * Originally based on softdog.c
- * Copyright 2006-2007 Analog Devices Inc.
+ * Copyright 2006-2010 Analog Devices Inc.
  * Copyright 2006-2007 Michele d'Amico
  * Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
@@ -137,13 +136,15 @@ static int bfin_wdt_running(void)
  */
 static int bfin_wdt_set_timeout(unsigned long t)
 {
-       u32 cnt;
+       u32 cnt, max_t, sclk;
        unsigned long flags;
 
-       stampit();
+       sclk = get_sclk();
+       max_t = -1 / sclk;
+       cnt = t * sclk;
+       stamp("maxtimeout=%us newtimeout=%lus (cnt=%#x)", max_t, t, cnt);
 
-       cnt = t * get_sclk();
-       if (cnt < get_sclk()) {
+       if (t > max_t) {
                printk(KERN_WARNING PFX "timeout value is too large\n");
                return -EINVAL;
        }
index 14ac4806e2913f8c37e76d95dc1d0274f4bbd027..eeb4986ea7db7cbb65b0b48685ae0a0d3f6a1a7e 100644 (file)
@@ -348,7 +348,17 @@ int cachefiles_delete_object(struct cachefiles_cache *cache,
        dir = dget_parent(object->dentry);
 
        mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
-       ret = cachefiles_bury_object(cache, dir, object->dentry);
+
+       /* we need to check that our parent is _still_ our parent - it may have
+        * been renamed */
+       if (dir == object->dentry->d_parent) {
+               ret = cachefiles_bury_object(cache, dir, object->dentry);
+       } else {
+               /* it got moved, presumably by cachefilesd culling it, so it's
+                * no longer in the key path and we can ignore it */
+               mutex_unlock(&dir->d_inode->i_mutex);
+               ret = 0;
+       }
 
        dput(dir);
        _leave(" = %d", ret);
index e95c692ef0e4acb3434e6d9386a56954907226c8..cce6bbdbdbb11705afbe6c729007ede3b8714e92 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -637,7 +637,6 @@ int setup_arg_pages(struct linux_binprm *bprm,
         * will align it up.
         */
        rlim_stack = rlimit(RLIMIT_STACK) & PAGE_MASK;
-       rlim_stack = min(rlim_stack, stack_size);
 #ifdef CONFIG_STACK_GROWSUP
        if (stack_size + stack_expand > rlim_stack)
                stack_base = vma->vm_start + rlim_stack;
index d62fdc875f22800a3d5c1a8c0a2532b0b6d51cc6..a4855af776a8b6670b753aa3af71203519de94a7 100644 (file)
@@ -822,6 +822,17 @@ fail:
        return PTR_ERR(dentry);
 }
 
+/*
+ * This is a temporary kludge to deal with "automount" symlinks; proper
+ * solution is to trigger them on follow_mount(), so that do_lookup()
+ * would DTRT.  To be killed before 2.6.34-final.
+ */
+static inline int follow_on_final(struct inode *inode, unsigned lookup_flags)
+{
+       return inode && unlikely(inode->i_op->follow_link) &&
+               ((lookup_flags & LOOKUP_FOLLOW) || S_ISDIR(inode->i_mode));
+}
+
 /*
  * Name resolution.
  * This is the basic name resolution function, turning a pathname into
@@ -942,8 +953,7 @@ last_component:
                if (err)
                        break;
                inode = next.dentry->d_inode;
-               if ((lookup_flags & LOOKUP_FOLLOW)
-                   && inode && inode->i_op->follow_link) {
+               if (follow_on_final(inode, lookup_flags)) {
                        err = do_follow_link(&next, nd);
                        if (err)
                                goto return_err;
index 97d79eff6b7f65af66688d52e96ed6b6a9217ec3..8715d194561aa626bff1d18991a2ac667be00715 100644 (file)
@@ -752,7 +752,8 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
                            flags, current_cred());
        if (IS_ERR(*filp))
                host_err = PTR_ERR(*filp);
-       host_err = ima_file_check(*filp, access);
+       else
+               host_err = ima_file_check(*filp, access);
 out_nfserr:
        err = nfserrno(host_err);
 out:
index e42bbd843ed13793e93a9af193e8b14136013d31..58324c299165751120e82a6827af278093f414ac 100644 (file)
@@ -2369,16 +2369,30 @@ static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct pid_namespace *ns = dentry->d_sb->s_fs_info;
        pid_t tgid = task_tgid_nr_ns(current, ns);
-       char tmp[PROC_NUMBUF];
-       if (!tgid)
-               return ERR_PTR(-ENOENT);
-       sprintf(tmp, "%d", task_tgid_nr_ns(current, ns));
-       return ERR_PTR(vfs_follow_link(nd,tmp));
+       char *name = ERR_PTR(-ENOENT);
+       if (tgid) {
+               name = __getname();
+               if (!name)
+                       name = ERR_PTR(-ENOMEM);
+               else
+                       sprintf(name, "%d", tgid);
+       }
+       nd_set_link(nd, name);
+       return NULL;
+}
+
+static void proc_self_put_link(struct dentry *dentry, struct nameidata *nd,
+                               void *cookie)
+{
+       char *s = nd_get_link(nd);
+       if (!IS_ERR(s))
+               __putname(s);
 }
 
 static const struct inode_operations proc_self_inode_operations = {
        .readlink       = proc_self_readlink,
        .follow_link    = proc_self_follow_link,
+       .put_link       = proc_self_put_link,
 };
 
 /*
index ab94335b4bb9e55d661df26a7aca0a8d4b44c86d..6816be6c3f7798bd64ec1d05a27d95f4b9e27c80 100644 (file)
@@ -1,5 +1,9 @@
 /*
- *  linux/include/asm-arm/hardware/amba.h
+ *  linux/include/amba/bus.h
+ *
+ *  This device type deals with ARM PrimeCells and anything else that
+ *  presents a proper CID (0xB105F00D) at the end of the I/O register
+ *  region or that is derived from a PrimeCell.
  *
  *  Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved.
  *
index b1bcb275b596962ececfc157ee8d78e7ea61a090..ebb1cd5bc2419c7fad8b421178021d52ac005fea 100644 (file)
@@ -729,6 +729,7 @@ struct inode {
        uid_t                   i_uid;
        gid_t                   i_gid;
        dev_t                   i_rdev;
+       unsigned int            i_blkbits;
        u64                     i_version;
        loff_t                  i_size;
 #ifdef __NEED_I_SIZE_ORDERED
@@ -738,7 +739,6 @@ struct inode {
        struct timespec         i_mtime;
        struct timespec         i_ctime;
        blkcnt_t                i_blocks;
-       unsigned int            i_blkbits;
        unsigned short          i_bytes;
        umode_t                 i_mode;
        spinlock_t              i_lock; /* i_blocks, i_bytes, maybe i_size */
index 2b19297742cb5761141e509732c0efdab63a4f9a..2ae7409bf38f80cc7cbd5dbd472f614c3d694d37 100644 (file)
@@ -3259,8 +3259,6 @@ static void perf_event_task_output(struct perf_event *event,
        task_event->event_id.tid = perf_event_tid(event, task);
        task_event->event_id.ptid = perf_event_tid(event, current);
 
-       task_event->event_id.time = perf_clock();
-
        perf_output_put(&handle, task_event->event_id);
 
        perf_output_end(&handle);
@@ -3268,7 +3266,7 @@ static void perf_event_task_output(struct perf_event *event,
 
 static int perf_event_task_match(struct perf_event *event)
 {
-       if (event->state != PERF_EVENT_STATE_ACTIVE)
+       if (event->state < PERF_EVENT_STATE_INACTIVE)
                return 0;
 
        if (event->cpu != -1 && event->cpu != smp_processor_id())
@@ -3300,7 +3298,7 @@ static void perf_event_task_event(struct perf_task_event *task_event)
        cpuctx = &get_cpu_var(perf_cpu_context);
        perf_event_task_ctx(&cpuctx->ctx, task_event);
        if (!ctx)
-               ctx = rcu_dereference(task_event->task->perf_event_ctxp);
+               ctx = rcu_dereference(current->perf_event_ctxp);
        if (ctx)
                perf_event_task_ctx(ctx, task_event);
        put_cpu_var(perf_cpu_context);
@@ -3331,6 +3329,7 @@ static void perf_event_task(struct task_struct *task,
                        /* .ppid */
                        /* .tid  */
                        /* .ptid */
+                       .time = perf_clock(),
                },
        };
 
@@ -3380,7 +3379,7 @@ static void perf_event_comm_output(struct perf_event *event,
 
 static int perf_event_comm_match(struct perf_event *event)
 {
-       if (event->state != PERF_EVENT_STATE_ACTIVE)
+       if (event->state < PERF_EVENT_STATE_INACTIVE)
                return 0;
 
        if (event->cpu != -1 && event->cpu != smp_processor_id())
@@ -3500,7 +3499,7 @@ static void perf_event_mmap_output(struct perf_event *event,
 static int perf_event_mmap_match(struct perf_event *event,
                                   struct perf_mmap_event *mmap_event)
 {
-       if (event->state != PERF_EVENT_STATE_ACTIVE)
+       if (event->state < PERF_EVENT_STATE_INACTIVE)
                return 0;
 
        if (event->cpu != -1 && event->cpu != smp_processor_id())
index 26a6b73a6b85bbc2a4ee1e1392d3aa86d1e9a850..18bde979f346c46a8af621b62171912a1db98f5a 100644 (file)
@@ -222,6 +222,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
        if (which > PRIO_USER || which < PRIO_PROCESS)
                return -EINVAL;
 
+       rcu_read_lock();
        read_lock(&tasklist_lock);
        switch (which) {
                case PRIO_PROCESS:
@@ -267,6 +268,7 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
        }
 out_unlock:
        read_unlock(&tasklist_lock);
+       rcu_read_unlock();
 
        return retval;
 }
index 1cac726c44bc17cc6fa1a7b5ab6358279a0c9a5d..0dc782216d4b94dc423c2d62d1ac70a2b6d30ddc 100644 (file)
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -156,10 +156,12 @@ static int sub_alloc(struct idr *idp, int *starting_id, struct idr_layer **pa)
                        id = (id | ((1 << (IDR_BITS * l)) - 1)) + 1;
 
                        /* if already at the top layer, we need to grow */
-                       if (!(p = pa[l])) {
+                       if (id >= 1 << (idp->layers * IDR_BITS)) {
                                *starting_id = id;
                                return IDR_NEED_TO_GROW;
                        }
+                       p = pa[l];
+                       BUG_ON(!p);
 
                        /* If we need to go up one layer, continue the
                         * loop; otherwise, restart from the top.
index 9a0db5bbabe4c93c0fce3ee7c24f13f2fbf84dc0..880bd592d38ea47af36f5f9b64323e8814d09f24 100644 (file)
@@ -1002,33 +1002,27 @@ static int do_pages_stat(struct mm_struct *mm, unsigned long nr_pages,
 #define DO_PAGES_STAT_CHUNK_NR 16
        const void __user *chunk_pages[DO_PAGES_STAT_CHUNK_NR];
        int chunk_status[DO_PAGES_STAT_CHUNK_NR];
-       unsigned long i, chunk_nr = DO_PAGES_STAT_CHUNK_NR;
-       int err;
 
-       for (i = 0; i < nr_pages; i += chunk_nr) {
-               if (chunk_nr > nr_pages - i)
-                       chunk_nr = nr_pages - i;
+       while (nr_pages) {
+               unsigned long chunk_nr;
 
-               err = copy_from_user(chunk_pages, &pages[i],
-                                    chunk_nr * sizeof(*chunk_pages));
-               if (err) {
-                       err = -EFAULT;
-                       goto out;
-               }
+               chunk_nr = nr_pages;
+               if (chunk_nr > DO_PAGES_STAT_CHUNK_NR)
+                       chunk_nr = DO_PAGES_STAT_CHUNK_NR;
+
+               if (copy_from_user(chunk_pages, pages, chunk_nr * sizeof(*chunk_pages)))
+                       break;
 
                do_pages_stat_array(mm, chunk_nr, chunk_pages, chunk_status);
 
-               err = copy_to_user(&status[i], chunk_status,
-                                  chunk_nr * sizeof(*chunk_status));
-               if (err) {
-                       err = -EFAULT;
-                       goto out;
-               }
-       }
-       err = 0;
+               if (copy_to_user(status, chunk_status, chunk_nr * sizeof(*status)))
+                       break;
 
-out:
-       return err;
+               pages += chunk_nr;
+               status += chunk_nr;
+               nr_pages -= chunk_nr;
+       }
+       return nr_pages ? -EFAULT : 0;
 }
 
 /*
index f52481b1c1e5442c9a5b16b06b22221b75b9bb7c..237050478f28f46fc59c5c9984337f1c3d60de08 100644 (file)
@@ -459,6 +459,8 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
        list_for_each_entry(c, &p->children, sibling) {
                if (c->mm == p->mm)
                        continue;
+               if (mem && !task_in_mem_cgroup(c, mem))
+                       continue;
                if (!oom_kill_task(c))
                        return 0;
        }
index fbc1c7472c5e4cafffb5f1455895907c45ade25e..099c753c4213ae814b51bf4e149eeb4f79836224 100644 (file)
@@ -410,7 +410,8 @@ static ssize_t wireless_show(struct device *d, char *buf,
        const struct iw_statistics *iw;
        ssize_t ret = -EINVAL;
 
-       rtnl_lock();
+       if (!rtnl_trylock())
+               return restart_syscall();
        if (dev_isalive(dev)) {
                iw = get_wireless_stats(dev);
                if (iw)
index 040c4f05b65321b6b2c6023bb0eba66eecb7c26a..26dec2be96152aa88b3b8893f1fe175a9eb8a418 100644 (file)
@@ -1317,14 +1317,19 @@ static int devinet_sysctl_forward(ctl_table *ctl, int write,
 {
        int *valp = ctl->data;
        int val = *valp;
+       loff_t pos = *ppos;
        int ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
 
        if (write && *valp != val) {
                struct net *net = ctl->extra2;
 
                if (valp != &IPV4_DEVCONF_DFLT(net, FORWARDING)) {
-                       if (!rtnl_trylock())
+                       if (!rtnl_trylock()) {
+                               /* Restore the original values before restarting */
+                               *valp = val;
+                               *ppos = pos;
                                return restart_syscall();
+                       }
                        if (valp == &IPV4_DEVCONF_ALL(net, FORWARDING)) {
                                inet_forward_change(net);
                        } else if (*valp) {
index de7a194a64ab4fa0cf864d1fe3f83a3974e3b727..143791da062c5118656f826033bb673435ab09f2 100644 (file)
@@ -502,8 +502,11 @@ static int addrconf_fixup_forwarding(struct ctl_table *table, int *p, int old)
        if (p == &net->ipv6.devconf_dflt->forwarding)
                return 0;
 
-       if (!rtnl_trylock())
+       if (!rtnl_trylock()) {
+               /* Restore the original values before restarting */
+               *p = old;
                return restart_syscall();
+       }
 
        if (p == &net->ipv6.devconf_all->forwarding) {
                __s32 newf = net->ipv6.devconf_all->forwarding;
@@ -4028,12 +4031,15 @@ int addrconf_sysctl_forward(ctl_table *ctl, int write,
 {
        int *valp = ctl->data;
        int val = *valp;
+       loff_t pos = *ppos;
        int ret;
 
        ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
 
        if (write)
                ret = addrconf_fixup_forwarding(ctl, valp, val);
+       if (ret)
+               *ppos = pos;
        return ret;
 }
 
@@ -4075,8 +4081,11 @@ static int addrconf_disable_ipv6(struct ctl_table *table, int *p, int old)
        if (p == &net->ipv6.devconf_dflt->disable_ipv6)
                return 0;
 
-       if (!rtnl_trylock())
+       if (!rtnl_trylock()) {
+               /* Restore the original values before restarting */
+               *p = old;
                return restart_syscall();
+       }
 
        if (p == &net->ipv6.devconf_all->disable_ipv6) {
                __s32 newf = net->ipv6.devconf_all->disable_ipv6;
@@ -4095,12 +4104,15 @@ int addrconf_sysctl_disable(ctl_table *ctl, int write,
 {
        int *valp = ctl->data;
        int val = *valp;
+       loff_t pos = *ppos;
        int ret;
 
        ret = proc_dointvec(ctl, write, buffer, lenp, ppos);
 
        if (write)
                ret = addrconf_disable_ipv6(ctl, valp, val);
+       if (ret)
+               *ppos = pos;
        return ret;
 }
 
index 29465d440043587462c61cb7dc3483bc68203b07..fde17b090a47d30873238ea16efe71722e851d8f 100644 (file)
@@ -272,6 +272,7 @@ int synthesize_perf_probe_point(struct probe_point *pp)
        int ret;
 
        pp->probes[0] = buf = zalloc(MAX_CMDLEN);
+       pp->found = 1;
        if (!buf)
                die("Failed to allocate memory by zalloc.");
        if (pp->offset) {
@@ -294,6 +295,7 @@ int synthesize_perf_probe_point(struct probe_point *pp)
 error:
                free(pp->probes[0]);
                pp->probes[0] = NULL;
+               pp->found = 0;
        }
        return ret;
 }
@@ -455,6 +457,7 @@ void show_perf_probe_events(void)
        struct strlist *rawlist;
        struct str_node *ent;
 
+       memset(&pp, 0, sizeof(pp));
        fd = open_kprobe_events(O_RDONLY, 0);
        rawlist = get_trace_kprobe_event_rawlist(fd);
        close(fd);