1. 05 Jan, 2009 7 commits
    • WANG Cong's avatar
      230e40fb
    • Hannes Eder's avatar
      proc: fix sparse warning · dfe6b7d9
      Hannes Eder authored
      fs/proc/base.c:312:4: warning: do-while statement is not a compound statement
      Signed-off-by: default avatarHannes Eder <hannes@hanneseder.net>
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      dfe6b7d9
    • Ken Chen's avatar
      proc: add /proc/*/stack · 2ec220e2
      Ken Chen authored
      /proc/*/stack adds the ability to query a task's stack trace. It is more
      useful than /proc/*/wchan as it provides full stack trace instead of single
      depth. Example output:
      
      	$ cat /proc/self/stack
      	[<c010a271>] save_stack_trace_tsk+0x17/0x35
      	[<c01827b4>] proc_pid_stack+0x4a/0x76
      	[<c018312d>] proc_single_show+0x4a/0x5e
      	[<c016bdec>] seq_read+0xf3/0x29f
      	[<c015a004>] vfs_read+0x6d/0x91
      	[<c015a0c1>] sys_read+0x3b/0x60
      	[<c0102eda>] syscall_call+0x7/0xb
      	[<ffffffff>] 0xffffffff
      
      [add save_stack_trace_tsk() on mips, ACK Ralf --adobriyan]
      Signed-off-by: default avatarKen Chen <kenchen@google.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      2ec220e2
    • Alexey Dobriyan's avatar
      proc: remove '##' usage · 631f9c18
      Alexey Dobriyan authored
      Inability to jump to /proc/*/foo handlers with ctags is annoying.
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      631f9c18
    • Alexey Dobriyan's avatar
      proc: remove useless WARN_ONs · ecae934e
      Alexey Dobriyan authored
      NULL "struct inode *" means VFS passed NULL inode to ->open.
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      ecae934e
    • Alexey Dobriyan's avatar
      proc: stop using BKL · b4df2b92
      Alexey Dobriyan authored
      There are four BKL users in proc: de_put(), proc_lookup_de(),
      proc_readdir_de(), proc_root_readdir(),
      
      1) de_put()
      -----------
      de_put() is classic atomic_dec_and_test() refcount wrapper -- no BKL
      needed. BKL doesn't matter to possible refcount leak as well.
      
      2) proc_lookup_de()
      -------------------
      Walking PDE list is protected by proc_subdir_lock(), proc_get_inode() is
      potentially blocking, all callers of proc_lookup_de() eventually end up
      from ->lookup hooks which is protected by directory's ->i_mutex -- BKL
      doesn't protect anything.
      
      3) proc_readdir_de()
      --------------------
      "." and ".." part doesn't need BKL, walking PDE list is under
      proc_subdir_lock, calling filldir callback is potentially blocking
      because it writes to luserspace. All proc_readdir_de() callers
      eventually come from ->readdir hook which is under directory's
      ->i_mutex -- BKL doesn't protect anything.
      
      4) proc_root_readdir_de()
      -------------------------
      proc_root_readdir_de is ->readdir hook, see (3).
      
      Since readdir hooks doesn't use BKL anymore, switch to
      generic_file_llseek, since it also takes directory's i_mutex.
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      b4df2b92
    • Linus Torvalds's avatar
      Merge branch 'audit.b61' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current · fe0bdec6
      Linus Torvalds authored
      * 'audit.b61' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
        audit: validate comparison operations, store them in sane form
        clean up audit_rule_{add,del} a bit
        make sure that filterkey of task,always rules is reported
        audit rules ordering, part 2
        fixing audit rule ordering mess, part 1
        audit_update_lsm_rules() misses the audit_inode_hash[] ones
        sanitize audit_log_capset()
        sanitize audit_fd_pair()
        sanitize audit_mq_open()
        sanitize AUDIT_MQ_SENDRECV
        sanitize audit_mq_notify()
        sanitize audit_mq_getsetattr()
        sanitize audit_ipc_set_perm()
        sanitize audit_ipc_obj()
        sanitize audit_socketcall
        don't reallocate buffer in every audit_sockaddr()
      fe0bdec6
  2. 04 Jan, 2009 23 commits
  3. 03 Jan, 2009 10 commits
    • Linus Torvalds's avatar
      Merge branch 'cpus4096-for-linus-3' of... · 7d3b56ba
      Linus Torvalds authored
      Merge branch 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
      
      * 'cpus4096-for-linus-3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (77 commits)
        x86: setup_per_cpu_areas() cleanup
        cpumask: fix compile error when CONFIG_NR_CPUS is not defined
        cpumask: use alloc_cpumask_var_node where appropriate
        cpumask: convert shared_cpu_map in acpi_processor* structs to cpumask_var_t
        x86: use cpumask_var_t in acpi/boot.c
        x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids
        sched: put back some stack hog changes that were undone in kernel/sched.c
        x86: enable cpus display of kernel_max and offlined cpus
        ia64: cpumask fix for is_affinity_mask_valid()
        cpumask: convert RCU implementations, fix
        xtensa: define __fls
        mn10300: define __fls
        m32r: define __fls
        h8300: define __fls
        frv: define __fls
        cris: define __fls
        cpumask: CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS
        cpumask: zero extra bits in alloc_cpumask_var_node
        cpumask: replace for_each_cpu_mask_nr with for_each_cpu in kernel/time/
        cpumask: convert mm/
        ...
      7d3b56ba
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu · 269b0123
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu: (89 commits)
        AMD IOMMU: remove now unnecessary #ifdefs
        AMD IOMMU: prealloc_protection_domains should be static
        kvm/iommu: fix compile warning
        AMD IOMMU: add statistics about total number of map requests
        AMD IOMMU: add statistics about allocated io memory
        AMD IOMMU: add stats counter for domain tlb flushes
        AMD IOMMU: add stats counter for single iommu domain tlb flushes
        AMD IOMMU: add stats counter for cross-page request
        AMD IOMMU: add stats counter for free_coherent requests
        AMD IOMMU: add stats counter for alloc_coherent requests
        AMD IOMMU: add stats counter for unmap_sg requests
        AMD IOMMU: add stats counter for map_sg requests
        AMD IOMMU: add stats counter for unmap_single requests
        AMD IOMMU: add stats counter for map_single requests
        AMD IOMMU: add stats counter for completion wait events
        AMD IOMMU: add init code for statistic collection
        AMD IOMMU: add necessary header defines for stats counting
        AMD IOMMU: add Kconfig entry for statistic collection code
        AMD IOMMU: use dev_name in iommu_enable function
        AMD IOMMU: use calc_devid in prealloc_protection_domains
        ...
      269b0123
    • Linus Torvalds's avatar
      Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 · f60a0a79
      Linus Torvalds authored
      * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (34 commits)
        V4L/DVB (10173): Missing v4l2_prio_close in radio_release
        V4L/DVB (10172): add DVB_DEVICE_TYPE= to uevent
        V4L/DVB (10171): Use usb_set_intfdata
        V4L/DVB (10170): tuner-simple: prevent possible OOPS caused by divide by zero error
        V4L/DVB (10168): sms1xxx: fix inverted gpio for lna control on tiger r2
        V4L/DVB (10167): sms1xxx: add support for inverted gpio
        V4L/DVB (10166): dvb frontend: stop using non-C99 compliant comments
        V4L/DVB (10165): Add FE_CAN_2G_MODULATION flag to frontends that support DVB-S2
        V4L/DVB (10164): Add missing S2 caps flag to S2API
        V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev
        V4L/DVB (10162): tuner-simple: Fix tuner type set message
        V4L/DVB (10161): saa7134: fix autodetection for AVer TV GO 007 FM Plus
        V4L/DVB (10160): em28xx: update chip id for em2710
        V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme
        V4L/DVB (10156): saa7134: Add support for Avermedia AVer TV GO 007 FM Plus
        V4L/DVB (10155): Add TEA5764 radio driver
        V4L/DVB (10154): saa7134: fix a merge conflict on Behold H6 board
        V4L/DVB (10153): Add the Beholder H6 card to DVB-T part of sources.
        V4L/DVB (10152): Change configuration of the Beholder H6 card
        V4L/DVB (10151): Fix I2C bridge error in zl10353
        ...
      f60a0a79
    • Yinghai Lu's avatar
      sparseirq: move set/get_timer_rand_state back to .c · 2f983570
      Yinghai Lu authored
      those two functions only used in that C file
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2f983570
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc · e9e67a8b
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
        mmc: warn about voltage mismatches
        mmc_spi: Add support for OpenFirmware bindings
        pxamci: fix dma_unmap_sg length
        mmc_block: ensure all sectors that do not have errors are read
        drivers/mmc: Move a dereference below a NULL test
        sdhci: handle built-in sdhci with modular leds class
        mmc: balanc pci_iomap with pci_iounmap
        mmc_block: print better error messages
        mmc: Add mmc_vddrange_to_ocrmask() helper function
        ricoh_mmc: Handle newer models of Ricoh controllers
        mmc: Add 8-bit bus width support
        sdhci: activate led support also when module
        mmc: trivial annotation of 'blocks'
        pci: use pci_ioremap_bar() in drivers/mmc
        sdricoh_cs: Add support for Bay Controller devices
        mmc: at91_mci: reorder timer setup and mmc_add_host() call
      e9e67a8b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog · ad6b646f
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
        [WATCHDOG] Add support for the WM8350 watchdog
        [WATCHDOG] Add SMSC SCH311x Watchdog Timer.
        [WATCHDOG] ib700wdt - add timeout parameter
      ad6b646f
    • Linus Torvalds's avatar
      Merge branch 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6 · 61420f59
      Linus Torvalds authored
      * 'cputime' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
        [PATCH] fast vdso implementation for CLOCK_THREAD_CPUTIME_ID
        [PATCH] improve idle cputime accounting
        [PATCH] improve precision of idle time detection.
        [PATCH] improve precision of process accounting.
        [PATCH] idle cputime accounting
        [PATCH] fix scaled & unscaled cputime accounting
      61420f59
    • Linus Torvalds's avatar
      Make %p print '(null)' for NULL pointers · d97106ab
      Linus Torvalds authored
      Before, when we only ever printed out the pointer value itself, a NULL
      pointer would never cause issues and might as well be printed out as
      just its numeric value.
      
      However, with the extended %p formats, especially %pR, we might validly
      want to print out resources for debugging.  And sometimes they don't
      even exist, and the resource pointer is just NULL.  Print it out as
      such, rather than oopsing.
      
      This is a more generic version of a patch done by Trent Piepho (catching
      all %p cases rather than just %pR, and using "(null)" instead of
      "[NULL]" to match glibc).
      Requested-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
      Acked-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d97106ab
    • Al Viro's avatar
      get rid of special-casing the /sbin/loader on alpha · 3bfacef4
      Al Viro authored
      ... just make it a binfmt handler like #! one.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3bfacef4
    • Al Viro's avatar
      sanitize ifdefs in binfmt_aout · 17580d7f
      Al Viro authored
      They are actually alpha vs.  i386/arm/m68k i.e. ecoff vs. aout.
      
      In the only place where we actually tried to handle arm and i386/m68k in
      different ways (START_DATA() in coredump handling), the arm variant
      works for all of them (i386 and m68k have u.start_code set to 0).
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      17580d7f