26 Jul, 2008

40 commits

  • All the bsdacct-related info will be stored in the area, pointer by this
    one.

    It will be NULL automatically for all new namespaces.

    Signed-off-by: Pavel Emelyanov
    Cc: Balbir Singh
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • It makes many fields initialization implicit helping in auto-setting
    #ifdef-ed fields (bsd-acct related pointer will be such).

    Signed-off-by: Pavel Emelyanov
    Cc: Balbir Singh
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • After I fixed access to task->tgid in kernel/acct.c, Oleg pointed out some
    bad side effects with this accounting vs pid namespaces interaction. I.e.
    when some task in pid namespace sets this accounting up, this blocks all
    the others from doing the same. Restricting this to init namespace only
    could help, but didn't look a graceful solution.

    So here is the approach to make this accounting work with pid namespaces
    properly.

    The idea is simple - when a task dies it accounts itself in each namespace
    it is visible from and which set the accounting up.

    For example here are the commands run and the output of lastcomm from init
    and sub namespaces:

    init_ns# accton pacct
    sub_ns# accton pacct (this is a different file - sub ns is run in
    a chroot-ed environment)
    init_ns# cat /dev/null
    sub_ns# ls /dev/null
    init_ns# accton
    sub_ns# accton

    sub_ns# lastcomm -f pacct
    ls 0 [136,0] 0.00 secs Thu May 15 10:30
    accton 0 [136,0] 0.00 secs Thu May 15 10:30

    init_ns# lastcomm -f pacct
    accton root pts/0 0.00 secs Thu May 15 14:30 << got from sub
    cat root pts/1 0.00 secs Thu May 15 14:30
    ls root pts/0 0.00 secs Thu May 15 14:30 << got from sub
    accton root pts/1 0.00 secs Thu May 15 14:30

    That was the summary, the details are in patches.

    This patch:

    It will be visible in pid_namespace.h file, so fix its name to look better
    outside the acct.c file.

    Signed-off-by: Pavel Emelyanov
    Cc: Balbir Singh
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • Adapt acct_update_integrals() to include user time when calculating the time
    difference. The units of acct_rss_mem1 and acct_vm_mem1 are also changed from
    pages-jiffies to pages-usecs to avoid calling jiffies_to_usecs() in
    xacct_add_tsk() which might overflow.

    Signed-off-by: Jonathan Lim
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Lim
     
  • With the removal of the Solaris binary emulation the export of
    uts_sem became unused.

    Signed-off-by: Adrian Bunk
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • kernel/trace/trace_sysprof.c:164:20: warning: Using plain integer as NULL pointer

    Signed-off-by: Harvey Harrison
    Cc: Mathieu Desnoyers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Harvey Harrison
     
  • rcu_barrier_sched() and call_rcu_sched() were introduced in 2.6.26 for the
    Markers. Change the marker code to use them.

    It can be seen as a fix since the marker code was using an ugly,
    temporary, #ifdef hack to work around CONFIG_PREEMPT_RCU.

    Signed-off-by: Mathieu Desnoyers
    Acked-by: Paul McKenney
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathieu Desnoyers
     
  • ATA over Ethernet: The semaphore emsgs_sema is used for signalling an
    event, convert it in a completion.

    Signed-off-by: Matthias Kaehlcke
    Cc: "Ed L. Cashin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matthias Kaehlcke
     
  • It seems to me that it was a mistake marking this function as deprecated
    and scheduling it for removal, rather than resolutely removing it after
    the last caller's death.

    Anyway - better late, then never.

    Signed-off-by: Pavel Emelyanov
    Cc: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • This one had the only users so far - the kill_proc, which is removed, so
    drop this (invalid in namespaced world) call too.

    And of course - erase all references on it from comments.

    Signed-off-by: Pavel Emelyanov
    Cc: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • This function operated on a pid_t to kill a task, which is no longer valid
    in a containerized system.

    It has finally lost all its users and we can safely remove it from the
    tree.

    Signed-off-by: Pavel Emelyanov
    Cc: Oleg Nesterov
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • When struct pid is built on a 64 bit platform gcc has to insert padding to
    maintain the correct alignment, by simply reordering its members the
    memory usage shrinks from 88 bytes to 80.

    I've successfully run with this patch on my desktop AMD64 machine.

    There are no significant kernel size changes to a default config.X86_64
    on the latest git v2.6.26-rc1

    text data bss dec hex filename
    5404828 976760 734280 7115868 6c945c vmlinux
    5404811 976760 734280 7115851 6c944b vmlinux.pid-patch

    Acked-by: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Kennedy
     
  • This patch adds proper prototypes for pid{hash,map}_init() in
    include/linux/pid_namespace.h

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Extend the permission check for networking sysctl's to allow modification
    when current process has CAP_NET_ADMIN capability and is not root. This
    version uses the until now unused permissions hook to override the mode
    value for /proc/sys/net if accessed by a user with capabilities.

    Found while working with Quagga. It is impossible to turn forwarding
    on/off through the command interface because Quagga uses secure coding
    practice of dropping privledges during initialization and only raising via
    capabilities when necessary. Since the dameon has reset real/effective
    uid after initialization, all attempts to access /proc/sys/net variables
    will fail.

    Signed-off-by: Stephen Hemminger
    Acked-by: "Eric W. Biederman"
    Cc: Chris Wright
    Cc: Alexey Dobriyan
    Cc: Andrew Morgan
    Cc: Pavel Emelyanov
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Hemminger
     
  • Catch, e. g., 644/0644 typo.

    Signed-off-by: Alexey Dobriyan
    Acked-by: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Move EXPORT_SYMBOL right after the func

    Signed-off-by: David Sterba
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Sterba
     
  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • MS_RMT_MASK will unmask changes in do_remount_sb() anyway.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Current two-stage scheme of removing PDE emphasizes one bug in proc:

    open
    rmmod
    remove_proc_entry
    close

    ->release won't be called because ->proc_fops were cleared. In simple
    cases it's small memory leak.

    For every ->open, ->release has to be done. List of openers is introduced
    which is traversed at remove_proc_entry() if neeeded.

    Discussions with Al long ago (sigh).

    Signed-off-by: Alexey Dobriyan
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • This patch moves the extern of struct proc_kmsg_operations to
    fs/proc/internal.h and adds an #include "internal.h" to fs/proc/kmsg.c
    so that the latter sees the former.

    Signed-off-by: Adrian Bunk
    Cc: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • With the removal of the Solaris binary emulation the export of
    proc_clear_tty became unused.

    Signed-off-by: Adrian Bunk
    Acked-by: David S. Miller
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Signed-off-by: Akinobu Mita
    Cc: Abhay Salunke
    Cc: Zhang Rui
    Cc: Matt Domsch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • convert the local Dprintk() compile time debug printk wrappers to the
    generic pr_debug() wrapper.

    Signed-off-by: Thomas Gleixner
    Cc: Matt Domsch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Now that add_partition() has been aught to propagate errors, let's check them.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Abdel Benamrouche
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Abdel Benamrouche
     
  • fs/partitions/check.c:381: warning: ignoring return value of ___device_add___,
    declared with attribute warn_unused_result

    [akpm@linux-foundation.org: multiple-return-statements-per-function are evil]
    Signed-off-by: Abdel Benamrouche
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Abdel Benamrouche
     
  • Signed-off-by: Akinobu Mita
    Cc: Doug Warzecha
    Cc: Zhang Rui
    Cc: Matt Domsch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Signed-off-by: Akinobu Mita
    Cc: Greg Kroah-Hartman
    Cc: Markus Rechberger
    Cc: Kay Sievers
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Tell users that the driver is only for PCI devices to stop asking for
    support of firewire and parallel devices.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • - remove unused macro
    - some whitespace cleanup
    - useless debug prints removal

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Remove a support of ISA addresses predefined at compile time. It is
    unused (filled by zeroes) and prolongs the code. Don't initialize global
    array and add `ioaddr' module param description.

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • - use dev_* for printing in pci probe function
    - move ISA p[rints directly into isa find function, do not postpone it.
    Remove macros bound to it then.
    - prepend some prints by "mxser: " to know what it belongs to

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Update Documentation/moxa-smartio to the later document from the mxser
    package.

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • - remove unused mxvar_diagflag
    - move mxser_msr into the only user/function
    - GMStatus, hmm, fix race-prone access to it. We need only one instance for
    real, not MXSER_PORTS. Move it to MOXA_GETMSTATUS ioctl.
    - mxser_mon_ext, almost the same, but alloc it on heap, since it has more than
    2 kilos.
    - fix indexing, `i' is not the index value, `i * MXSER_PORTS_PER_BOARD + j' is

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • - remove break ctl from ioctl handler, it's never reached, since
    tty_ops->break_ctl is defined (mxser break handling is done in software)
    - mark MOXA_GET_MAJOR as deprecated
    - fix TIOCGICOUNT (some retval non-checks of put_user). Use copy_to_user
    to whole structure instead.

    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Signed-off-by: Akinobu Mita
    Cc: Russell King
    Cc: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Push the BKL down into the driver ioctl methods

    Signed-off-by: Alan Cox
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Signed-off-by: Alan Cox
    Cc: Jiri Kosina
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Signed-off-by: Alan Cox
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Signed-off-by: Alan Cox
    Cc: Nishanth Aravamudan
    Cc: Domen Puncer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Also fix the capability checking for firmware load.

    Signed-off-by: Alan Cox
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox