1. 24 Jul, 2008 19 commits
    • Artem Bityutskiy's avatar
      UBI: add ubi_sync() interface · a5bf6190
      Artem Bityutskiy authored
      To flush MTD device caches.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      a5bf6190
    • Bruce Leonard's avatar
      73789a3d
    • Artem Bityutskiy's avatar
      UBI: fix LEB locking · 23add745
      Artem Bityutskiy authored
      leb_read_unlock() may be called simultaniously by several tasks.
      The would race at the following code:
      
       up_read(&le->mutex);
       if (free)
               kfree(le);
      
      And it is possible that one task frees 'le' before the other tasks
      do 'up_read()'. Fix this by doing up_read and free inside the
      'ubi->ltree' lock. Below it the oops we had because of this:
      
      BUG: spinlock bad magic on CPU#0, integck/7504
      BUG: unable to handle kernel paging request at 6b6b6c4f
      IP: [<c0211221>] spin_bug+0x5c/0xdb
      *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: ubifs ubi nandsim nand nand_ids nand_ecc video output
      
      Pid: 7504, comm: integck Not tainted (2.6.26-rc3ubifs26 #8)
      EIP: 0060:[<c0211221>] EFLAGS: 00010002 CPU: 0
      EIP is at spin_bug+0x5c/0xdb
      EAX: 00000032 EBX: 6b6b6b6b ECX: 6b6b6b6b EDX: f7f7ce30
      ESI: f76491dc EDI: c044f51f EBP: e8a736cc ESP: e8a736a8
      DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      Process integck (pid: 7504, ti=e8a72000 task=f7f7ce30 task.ti=e8a72000)
      Stack: c044f754 c044f51f 00000000 f7f7d024 00001d50 00000001 f76491dc 00000296       f6df50e0 e8a736d8 c02112f0 f76491dc e8a736e8 c039157a f7d9e830 f76491d8       e8a7370c c020b975 f76491dc 00000296 f76491f8 00000000 f76491d8 00000000 Call Trace:
      [<c02112f0>] ? _raw_spin_unlock+0x50/0x7c
      [<c039157a>] ? _spin_unlock_irqrestore+0x20/0x58
      [<c020b975>] ? rwsem_wake+0x4b/0x122
      [<c0390e0a>] ? call_rwsem_wake+0xa/0xc
      [<c0139ee7>] ? up_read+0x28/0x31
      [<f8873b3c>] ? leb_read_unlock+0x73/0x7b [ubi]
      [<f88742a3>] ? ubi_eba_read_leb+0x195/0x2b0 [ubi]
      [<f8872a04>] ? ubi_leb_read+0xaf/0xf8 [ubi]
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      23add745
    • Artem Bityutskiy's avatar
      UBI: fix memory leak on error path · 472018f7
      Artem Bityutskiy authored
      Normally UBI volumes are freed in the release function of
      the struct device object. However, on error path they may
      have to be freed before the struct device objects have been
      initialized.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      472018f7
    • Artem Bityutskiy's avatar
      UBI: do not forget to free internal volumes · 505d1caa
      Artem Bityutskiy authored
      UBI forgets to free internal volumes when detaching MTD device.
      Fix this.
      Pointed-out-by: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      505d1caa
    • Artem Bityutskiy's avatar
      UBI: fix memory leak · abc5e922
      Artem Bityutskiy authored
      ubi_free_volume() function sets ubi->volumes[] to NULL, so
      ubi_eba_close() is useless, it does not free what has to be freed.
      So zap it and free vol->eba_tbl at the volume release function.
      Pointed-out-by: default avatarAdrian Hunter <ext-adrian.hunter@nokia.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      abc5e922
    • Kyungmin Park's avatar
      UBI: avoid unnecessary division operations · cadb40cc
      Kyungmin Park authored
      UBI already checks that @min io size is the power of 2 at io_init.
      It is save to use bit operations then.
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      cadb40cc
    • Kyungmin Park's avatar
      UBI: fix buffer padding · a0fd1efd
      Kyungmin Park authored
      Instead of correctly pad the buffer wich we are writing to the
      eraseblock during update, we used weird construct:
      
      memset(buf + len, 0xFF, len - len);
      
      Fix this.
      Signed-off-by: default avatarKyungmin Park <kmpark@infradead.org>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      a0fd1efd
    • Artem Bityutskiy's avatar
      UBI: add a comment · beeea636
      Artem Bityutskiy authored
      It is not clear why we schedule PEB for scrubbing in case of
      -EBADMSG. Elaborate.
      Requested-by: default avatarKyungmin Park <kmpark@infradead.org>
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      beeea636
    • Artem Bityutskiy's avatar
      UBI: print error code · 979c9296
      Artem Bityutskiy authored
      Print error code if checking failed which is very useful
      to identify problems.
      Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      979c9296
    • Linus Torvalds's avatar
      Merge branch 'x86/auditsc' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland · 338b9bb3
      Linus Torvalds authored
      * 'x86/auditsc' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland:
        i386 syscall audit fast-path
        x86_64 ia32 syscall audit fast-path
        x86_64 syscall audit fast-path
        x86_64: remove bogus optimization in sysret_signal
      338b9bb3
    • Linus Torvalds's avatar
      Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip · 7f9dce38
      Linus Torvalds authored
      * 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        sched: hrtick_enabled() should use cpu_active()
        sched, x86: clean up hrtick implementation
        sched: fix build error, provide partition_sched_domains() unconditionally
        sched: fix warning in inc_rt_tasks() to not declare variable 'rq' if it's not needed
        cpu hotplug: Make cpu_active_map synchronization dependency clear
        cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2)
        sched: rework of "prioritize non-migratable tasks over migratable ones"
        sched: reduce stack size in isolated_cpu_setup()
        Revert parts of "ftrace: do not trace scheduler functions"
      
      Fixed up conflicts in include/asm-x86/thread_info.h (due to the
      TIF_SINGLESTEP unification vs TIF_HRTICK_RESCHED removal) and
      kernel/sched_fair.c (due to cpu_active_map vs for_each_cpu_mask_nr()
      introduction).
      7f9dce38
    • Linus Torvalds's avatar
      Merge branch 'cpus4096-for-linus' of... · 26dcce0f
      Linus Torvalds authored
      Merge branch 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'cpus4096-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
        NR_CPUS: Replace NR_CPUS in speedstep-centrino.c
        cpumask: Provide a generic set of CPUMASK_ALLOC macros, FIXUP
        NR_CPUS: Replace NR_CPUS in cpufreq userspace routines
        NR_CPUS: Replace per_cpu(..., smp_processor_id()) with __get_cpu_var
        NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genapic_flat_64.c
        NR_CPUS: Replace NR_CPUS in arch/x86/kernel/genx2apic_uv_x.c
        NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c
        NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/mcheck/mce_64.c
        cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c, fix
        cpumask: Use optimized CPUMASK_ALLOC macros in the centrino_target
        cpumask: Provide a generic set of CPUMASK_ALLOC macros
        cpumask: Optimize cpumask_of_cpu in lib/smp_processor_id.c
        cpumask: Optimize cpumask_of_cpu in kernel/time/tick-common.c
        cpumask: Optimize cpumask_of_cpu in drivers/misc/sgi-xp/xpc_main.c
        cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/ldt.c
        cpumask: Optimize cpumask_of_cpu in arch/x86/kernel/io_apic_64.c
        cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr
        Revert "cpumask: introduce new APIs"
        cpumask: make for_each_cpu_mask a bit smaller
        net: Pass reference to cpumask variable in net/sunrpc/svc.c
        ...
      
      Fix up trivial conflicts in drivers/cpufreq/cpufreq.c manually
      26dcce0f
    • Linus Torvalds's avatar
      Merge branch 'core/softlockup-for-linus' of... · d7b6de14
      Linus Torvalds authored
      Merge branch 'core/softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'core/softlockup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
        softlockup: fix invalid proc_handler for softlockup_panic
        softlockup: fix watchdog task wakeup frequency
        softlockup: fix watchdog task wakeup frequency
        softlockup: show irqtrace
        softlockup: print a module list on being stuck
        softlockup: fix NMI hangs due to lock race - 2.6.26-rc regression
        softlockup: fix false positives on nohz if CPU is 100% idle for more than 60 seconds
        softlockup: fix softlockup_thresh fix
        softlockup: fix softlockup_thresh unaligned access and disable detection at runtime
        softlockup: allow panic on lockup
      d7b6de14
    • Linus Torvalds's avatar
      Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm · 30d38542
      Linus Torvalds authored
      * 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (85 commits)
        [ARM] pxa: add base support for PXA930 Handheld Platform (aka SAAR)
        [ARM] pxa: add base support for PXA930 Evaluation Board (aka TavorEVB)
        [ARM] pxa: add base support for PXA930 (aka Tavor-P)
        [ARM] Update mach-types
        [ARM] pxa: make littleton to use the new smc91x platform data
        [ARM] pxa: make zylonite to use the new smc91x platform data
        [ARM] pxa: make mainstone to use the new smc91x platform data
        [ARM] pxa: make lubbock to use new smc91x platform data
        [NET] smc91x: prepare SMC_USE_PXA_DMA to be specified in platform data
        [NET] smc91x: prepare for SMC_IO_SHIFT to be a platform configurable variable
        [NET] smc91x: add SMC91X_NOWAIT flag to platform data
        [NET] smc91x: favor the use of SMC91X_USE_* instead of SMC_CAN_USE_*
        [NET] smc91x: remove "irq_flags" from "struct smc91x_platdata"
        [ARM] 5146/1: pxa2xx: convert all boards to call pxa2xx_transceiver_mode helper
        Support for LCD on e740 e750 e400 and e800 e-series PDAs
        E-series UDC support
        PXA UDC - allow use of inverted GPIO for pullup
        Add e350 support
        Fix broken e-series build
        E-series GPIO / IRQ definitions.
        ...
      30d38542
    • Roland McGrath's avatar
      i386 syscall audit fast-path · af0575bb
      Roland McGrath authored
      This adds fast paths for 32-bit syscall entry and exit when
      TIF_SYSCALL_AUDIT is set, but no other kind of syscall tracing.
      These paths does not need to save and restore all registers as
      the general case of tracing does.  Avoiding the iret return path
      when syscall audit is enabled helps performance a lot.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      af0575bb
    • Roland McGrath's avatar
      x86_64 ia32 syscall audit fast-path · 5cbf1565
      Roland McGrath authored
      This adds fast paths for 32-bit syscall entry and exit when
      TIF_SYSCALL_AUDIT is set, but no other kind of syscall tracing.
      These paths does not need to save and restore all registers as
      the general case of tracing does.  Avoiding the iret return path
      when syscall audit is enabled helps performance a lot.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      5cbf1565
    • Roland McGrath's avatar
      x86_64 syscall audit fast-path · 86a1c34a
      Roland McGrath authored
      This adds a fast path for 64-bit syscall entry and exit when
      TIF_SYSCALL_AUDIT is set, but no other kind of syscall tracing.
      This path does not need to save and restore all registers as
      the general case of tracing does.  Avoiding the iret return path
      when syscall audit is enabled helps performance a lot.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      86a1c34a
    • Roland McGrath's avatar
      x86_64: remove bogus optimization in sysret_signal · 15e8f348
      Roland McGrath authored
      This short-circuit path in sysret_signal looks wrong to me.
      AFAICT, in practice the branch is never taken--and if it were,
      it would go wrong.  To wit, try loading a module whose init
      function does set_thread_flag(TIF_IRET), and see insmod crash
      (presumably with a wrong user stack pointer).
      
      This is because the FIXUP_TOP_OF_STACK work hasn't been done yet
      when we jump around the call to ptregscall_common and get to
      int_with_check--where it expects the user RSP,SS,CS and EFLAGS to
      have been stored by FIXUP_TOP_OF_STACK.
      
      I don't think it's normally possible to get to sysret_signal with no
      _TIF_DO_NOTIFY_MASK bits set anyway, so these two instructions are
      already superfluous.  If it ever did happen, it is harmless to call
      do_notify_resume with nothing for it to do.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      15e8f348
  2. 23 Jul, 2008 21 commits