13 Nov, 2007

1 commit

  • While a signal is blocked, it must be posted even if its action is
    SIG_IGN or is SIG_DFL with the default action to ignore. This works
    right most of the time, but is broken when a sigwait (rt_sigtimedwait)
    is in progress. This changes the early-discard check to respect
    real_blocked. ~blocked is the set to check for "should wake up now",
    but ~(blocked|real_blocked) is the set for "blocked" semantics as
    defined by POSIX.

    This fixes bugzilla entry 9347, see

    http://bugzilla.kernel.org/show_bug.cgi?id=9347

    Signed-off-by: Roland McGrath
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

30 Oct, 2007

1 commit


29 Oct, 2007

1 commit

  • Don't undef __i386__/__x86_64__ in uml anymore, make sure that (few) places
    that required adjusting the ifdefs got those.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

20 Oct, 2007

8 commits

  • The task_struct->pid member is going to be deprecated, so start
    using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in
    the kernel.

    The first thing to start with is the pid, printed to dmesg - in
    this case we may safely use task_pid_nr(). Besides, printks produce
    more (much more) than a half of all the explicit pid usage.

    [akpm@linux-foundation.org: git-drm went and changed lots of stuff]
    Signed-off-by: Pavel Emelyanov
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • With pid namespaces this field is now dangerous to use explicitly, so hide
    it behind the helpers.

    Also the pid and pgrp fields o task_struct and signal_struct are to be
    deprecated. Unfortunately this patch cannot be sent right now as this
    leads to tons of warnings, so start isolating them, and deprecate later.

    Actually the p->tgid == pid has to be changed to has_group_leader_pid(),
    but Oleg pointed out that in case of posix cpu timers this is the same, and
    thread_group_leader() is more preferable.

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

    Pavel Emelyanov
     
  • The find_task_by_something is a set of macros are used to find task by pid
    depending on what kind of pid is proposed - global or virtual one. All of
    them are wrappers above the most generic one - find_task_by_pid_type_ns() -
    and just substitute some args for it.

    It turned out, that dereferencing the current->nsproxy->pid_ns construction
    and pushing one more argument on the stack inline cause kernel text size to
    grow.

    This patch moves all this stuff out-of-line into kernel/pid.c. Together
    with the next patch it saves a bit less than 400 bytes from the .text
    section.

    Signed-off-by: Pavel Emelyanov
    Cc: Sukadev Bhattiprolu
    Cc: Oleg Nesterov
    Cc: Paul Menage
    Cc: "Eric W. Biederman"
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • This is the largest patch in the set. Make all (I hope) the places where
    the pid is shown to or get from user operate on the virtual pids.

    The idea is:
    - all in-kernel data structures must store either struct pid itself
    or the pid's global nr, obtained with pid_nr() call;
    - when seeking the task from kernel code with the stored id one
    should use find_task_by_pid() call that works with global pids;
    - when showing pid's numerical value to the user the virtual one
    should be used, but however when one shows task's pid outside this
    task's namespace the global one is to be used;
    - when getting the pid from userspace one need to consider this as
    the virtual one and use appropriate task/pid-searching functions.

    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: nuther build fix]
    [akpm@linux-foundation.org: yet nuther build fix]
    [akpm@linux-foundation.org: remove unneeded casts]
    Signed-off-by: Pavel Emelyanov
    Signed-off-by: Alexey Dobriyan
    Cc: Sukadev Bhattiprolu
    Cc: Oleg Nesterov
    Cc: Paul Menage
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     
  • Only the global-init process must be special - any other cgroup-init
    process must be killable to prevent run-away processes in the system.

    TODO: Ideally we should allow killing the cgroup-init only from parent
    cgroup and prevent it being killed from within the cgroup.
    But that is a more complex change and will be addressed by a follow-on
    patch. For now allow the cgroup-init to be terminated by any process
    with sufficient privileges.

    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Pavel Emelyanov
    Cc: Oleg Nesterov
    Cc: Sukadev Bhattiprolu
    Cc: Paul Menage
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • is_init() is an ambiguous name for the pid==1 check. Split it into
    is_global_init() and is_container_init().

    A cgroup init has it's tsk->pid == 1.

    A global init also has it's tsk->pid == 1 and it's active pid namespace
    is the init_pid_ns. But rather than check the active pid namespace,
    compare the task structure with 'init_pid_ns.child_reaper', which is
    initialized during boot to the /sbin/init process and never changes.

    Changelog:

    2.6.22-rc4-mm2-pidns1:
    - Use 'init_pid_ns.child_reaper' to determine if a given task is the
    global init (/sbin/init) process. This would improve performance
    and remove dependence on the task_pid().

    2.6.21-mm2-pidns2:

    - [Sukadev Bhattiprolu] Changed is_container_init() calls in {powerpc,
    ppc,avr32}/traps.c for the _exception() call to is_global_init().
    This way, we kill only the cgroup if the cgroup's init has a
    bug rather than force a kernel panic.

    [akpm@linux-foundation.org: fix comment]
    [sukadev@us.ibm.com: Use is_global_init() in arch/m32r/mm/fault.c]
    [bunk@stusta.de: kernel/pid.c: remove unused exports]
    [sukadev@us.ibm.com: Fix capability.c to work with threaded init]
    Signed-off-by: Serge E. Hallyn
    Signed-off-by: Sukadev Bhattiprolu
    Acked-by: Pavel Emelianov
    Cc: Eric W. Biederman
    Cc: Cedric Le Goater
    Cc: Dave Hansen
    Cc: Herbert Poetzel
    Cc: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Serge E. Hallyn
     
  • Rename the child_reaper() function to task_child_reaper() to be similar to
    other task_* functions and to distinguish the function from 'struct
    pid_namspace.child_reaper'.

    Signed-off-by: Sukadev Bhattiprolu
    Cc: Pavel Emelianov
    Cc: Eric W. Biederman
    Cc: Cedric Le Goater
    Cc: Dave Hansen
    Cc: Serge Hallyn
    Cc: Herbert Poetzel
    Cc: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sukadev Bhattiprolu
     
  • The set of functions process_session, task_session, process_group and
    task_pgrp is confusing, as the names can be mixed with each other when looking
    at the code for a long time.

    The proposals are to
    * equip the functions that return the integer with _nr suffix to
    represent that fact,
    * and to make all functions work with task (not process) by making
    the common prefix of the same name.

    For monotony the routines signal_session() and set_signal_session() are
    replaced with task_session_nr() and set_task_session(), especially since they
    are only used with the explicit task->signal dereference.

    Signed-off-by: Pavel Emelianov
    Acked-by: Serge E. Hallyn
    Cc: Kirill Korotaev
    Cc: "Eric W. Biederman"
    Cc: Cedric Le Goater
    Cc: Herbert Poetzl
    Cc: Sukadev Bhattiprolu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     

19 Oct, 2007

1 commit

  • The freezer should not send signals to kernel threads, since that may lead to
    subtle problems. In particular, commit
    b74d0deb968e1f85942f17080eace015ce3c332c has changed recalc_sigpending_tsk()
    so that it doesn't clear TIF_SIGPENDING. For this reason, if the freezer
    continues to send fake signals to kernel threads and the freezing of kernel
    threads fails, some of them may be running with TIF_SIGPENDING set forever.

    Accordingly, recalc_sigpending_tsk() shouldn't set the task's TIF_SIGPENDING
    flag if TIF_FREEZE is set.

    Signed-off-by: Rafael J. Wysocki
    Cc: Nigel Cunningham
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     

17 Oct, 2007

4 commits

  • do_sigaction() returns -ERESTARTNOINTR if signal_pending(). The comment says:

    * If there might be a fatal signal pending on multiple
    * threads, make sure we take it before changing the action.

    I think this is not needed. We should only worry about SIGNAL_GROUP_EXIT case,
    bit it implies a pending SIGKILL which can't be cleared by do_sigaction.

    Kill this special case.

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Cleanup. __group_complete_signal() wakes up ->group_exit_task twice. The
    second wakeup's state includes TASK_UNINTERRUPTIBLE, which is not very
    appropriate.

    Change the code to pass the "correct" argument to signal_wake_up() and kill
    now unneeded wake_up_process().

    Signed-off-by: Oleg Nesterov
    Cc: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Nowadays thread_group_empty() and next_thread() are simple list operations,
    this optimization doesn't make sense: we are doing exactly same check one
    line below.

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • With the recent changes, do_sigaction()->recalc_sigpending_and_wake() can
    never clear TIF_SIGPENDING. Instead, it can set this flag and wake up the
    thread without any reason. Harmless, but unneeded and wastes CPU.

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

08 Oct, 2007

1 commit

  • Async signals should not be reported as sent by current in audit log. As
    it is, we call audit_signal_info() too early in check_kill_permission().
    Note that check_kill_permission() has that test already - it needs to know
    if it should apply current-based permission checks. So the solution is to
    move the call of audit_signal_info() between those.

    Bogosity in question is easily reproduced - add a rule watching for e.g.
    kill(2) from specific process (so that audit_signal_info() would not
    short-circuit to nothing), say load_policy, watch the bogus OBJ_PID entry
    in audit logs claiming that write(2) on selinuxfs file issued by
    load_policy(8) had somehow managed to send a signal to syslogd...

    Signed-off-by: Al Viro
    Acked-by: Steve Grubb
    Acked-by: Eric Paris
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Al Viro
     

21 Sep, 2007

1 commit

  • This simplifies signalfd code, by avoiding it to remain attached to the
    sighand during its lifetime.

    In this way, the signalfd remain attached to the sighand only during
    poll(2) (and select and epoll) and read(2). This also allows to remove
    all the custom "tsk == current" checks in kernel/signal.c, since
    dequeue_signal() will only be called by "current".

    I think this is also what Ben was suggesting time ago.

    The external effect of this, is that a thread can extract only its own
    private signals and the group ones. I think this is an acceptable
    behaviour, in that those are the signals the thread would be able to
    fetch w/out signalfd.

    Signed-off-by: Davide Libenzi
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     

31 Aug, 2007

1 commit

  • Spotted by taoyue and Jeremy Katz .

    collect_signal: sigqueue_free:

    list_del_init(&first->list);
    if (!list_empty(&q->list)) {
    // not taken
    }
    q->flags &= ~SIGQUEUE_PREALLOC;

    __sigqueue_free(first); __sigqueue_free(q);

    Now, __sigqueue_free() is called twice on the same "struct sigqueue" with the
    obviously bad implications.

    In particular, this double free breaks the array_cache->avail logic, so the
    same sigqueue could be "allocated" twice, and the bug can manifest itself via
    the "impossible" BUG_ON(!SIGQUEUE_PREALLOC) in sigqueue_free/send_sigqueue.

    Hopefully this can explain these mysterious bug-reports, see

    http://marc.info/?t=118766926500003
    http://marc.info/?t=118466273000005

    Alexey Dobriyan reports this patch makes the difference for the testcase, but
    nobody has an access to the application which opened the problems originally.

    Also, this patch removes tasklist lock/unlock, ->siglock is enough.

    Signed-off-by: Oleg Nesterov
    Cc: taoyue
    Cc: Jeremy Katz
    Cc: Sukadev Bhattiprolu
    Cc: Alexey Dobriyan
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Roland McGrath
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

23 Aug, 2007

1 commit

  • dequeue_signal:

    if (__SI_TIMER) {
    spin_unlock(&tsk->sighand->siglock);
    do_schedule_next_timer(info);
    spin_lock(&tsk->sighand->siglock);
    }

    Unless tsk == curent, this is absolutely unsafe: nothing prevents tsk from
    exiting. If signalfd was passed to another process, do_schedule_next_timer()
    is just wrong.

    Add yet another "tsk == current" check into dequeue_signal().

    This patch fixes an oopsable bug, but breaks the scheduling of posix timers
    if the shared __SI_TIMER signal was fetched via signalfd attached to another
    sub-thread. Mostly fixed by the next patch.

    Signed-off-by: Oleg Nesterov
    Cc: Benjamin Herrenschmidt
    Cc: Davide Libenzi
    Cc: Ingo Molnar
    Cc: Michael Kerrisk
    Cc: Roland McGrath
    Cc: Thomas Gleixner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

04 Aug, 2007

1 commit

  • There is a couple of subtle checks which were needed to handle ptracing from
    the same thread group. This was deprecated a long ago, imho this code just
    complicates the understanding.

    And, the "->parent->signal->flags & SIGNAL_GROUP_EXIT" check in exit_notify()
    is not right. SIGNAL_GROUP_EXIT can mean exec(), not exit_group(). This means
    ptracer can lose a ptraced zombie on exec(). Minor problem, but still the bug.

    Signed-off-by: Oleg Nesterov
    Acked-by: Roland McGrath
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     

23 Jul, 2007

1 commit

  • This patch makes the i386 behave the same way that x86_64 does when a
    segfault happens. A line gets printed to the kernel log so that tools
    that need to check for failures can behave more uniformly between
    debug.show_unhandled_signals sysctl variable to 0 (or by doing echo 0 >
    /proc/sys/debug/exception-trace)

    Also, all of the lines being printed are now using printk_ratelimit() to
    deny the ability of DoS from a local user with a program like the
    following:

    main()
    {
    while (1)
    if (!fork()) *(int *)0 = 0;
    }

    This new revision also includes the fix that Andrew did which got rid of
    new sysctl that was added to the system in earlier versions of this.
    Also, 'show-unhandled-signals' sysctl has been renamed back to the old
    'exception-trace' to avoid breakage of people's scripts.

    AK: Enabling by default for i386 will be likely controversal, but let's see what happens
    AK: Really folks, before complaining just fix your segfaults
    AK: I bet this will find a lot of silent issues

    Signed-off-by: Masoud Sharbiani
    Signed-off-by: Andi Kleen
    [ Personally, I've found the complaints useful on x86-64, so I'm all for
    this. That said, I wonder if we could do it more prettily.. -Linus ]
    Signed-off-by: Linus Torvalds

    Masoud Asgharifard Sharbiani
     

17 Jul, 2007

1 commit

  • Add the print-fatal-signals=1 boot option and the
    /proc/sys/kernel/print-fatal-signals runtime switch.

    This feature prints some minimal information about userspace segfaults to
    the kernel console. This is useful to find early bootup bugs where
    userspace debugging is very hard.

    Defaults to off.

    [akpm@linux-foundation.org: Don't add new sysctl numbers]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

19 Jun, 2007

1 commit


07 Jun, 2007

1 commit

  • This patch should get a few birds. It prevents sigaction calls from
    clearing TIF_SIGPENDING in other threads, which could leak -ERESTART*.
    And It fixes ptrace_stop not to clear it, which done at the syscall exit
    stop could leak -ERESTART*. It probably removes the harm from signalfd,
    at least assuming it never calls dequeue_signal on kernel threads that
    might have used block_all_signals.

    Signed-off-by: Roland McGrath
    Cc: Andrew Morton
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Satoru Takeuchi
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

24 May, 2007

1 commit

  • Steve Hawkes discovered a problem where recalc_sigpending_tsk was called in
    do_sigaction but no signal_wake_up call was made, preventing later signals
    from waking up blocked threads with TIF_SIGPENDING already set.

    In fact, the few other calls to recalc_sigpending_tsk outside the signals
    code are also subject to this problem in other race conditions.

    This change makes recalc_sigpending_tsk private to the signals code. It
    changes the outside calls, as well as do_sigaction, to use the new
    recalc_sigpending_and_wake instead.

    Signed-off-by: Roland McGrath
    Cc:
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

12 May, 2007

1 commit


11 May, 2007

2 commits

  • This patch series implements the new signalfd() system call.

    I took part of the original Linus code (and you know how badly it can be
    broken :), and I added even more breakage ;) Signals are fetched from the same
    signal queue used by the process, so signalfd will compete with standard
    kernel delivery in dequeue_signal(). If you want to reliably fetch signals on
    the signalfd file, you need to block them with sigprocmask(SIG_BLOCK). This
    seems to be working fine on my Dual Opteron machine. I made a quick test
    program for it:

    http://www.xmailserver.org/signafd-test.c

    The signalfd() system call implements signal delivery into a file descriptor
    receiver. The signalfd file descriptor if created with the following API:

    int signalfd(int ufd, const sigset_t *mask, size_t masksize);

    The "ufd" parameter allows to change an existing signalfd sigmask, w/out going
    to close/create cycle (Linus idea). Use "ufd" == -1 if you want a brand new
    signalfd file.

    The "mask" allows to specify the signal mask of signals that we are interested
    in. The "masksize" parameter is the size of "mask".

    The signalfd fd supports the poll(2) and read(2) system calls. The poll(2)
    will return POLLIN when signals are available to be dequeued. As a direct
    consequence of supporting the Linux poll subsystem, the signalfd fd can use
    used together with epoll(2) too.

    The read(2) system call will return a "struct signalfd_siginfo" structure in
    the userspace supplied buffer. The return value is the number of bytes copied
    in the supplied buffer, or -1 in case of error. The read(2) call can also
    return 0, in case the sighand structure to which the signalfd was attached,
    has been orphaned. The O_NONBLOCK flag is also supported, and read(2) will
    return -EAGAIN in case no signal is available.

    If the size of the buffer passed to read(2) is lower than sizeof(struct
    signalfd_siginfo), -EINVAL is returned. A read from the signalfd can also
    return -ERESTARTSYS in case a signal hits the process. The format of the
    struct signalfd_siginfo is, and the valid fields depends of the (->code &
    __SI_MASK) value, in the same way a struct siginfo would:

    struct signalfd_siginfo {
    __u32 signo; /* si_signo */
    __s32 err; /* si_errno */
    __s32 code; /* si_code */
    __u32 pid; /* si_pid */
    __u32 uid; /* si_uid */
    __s32 fd; /* si_fd */
    __u32 tid; /* si_fd */
    __u32 band; /* si_band */
    __u32 overrun; /* si_overrun */
    __u32 trapno; /* si_trapno */
    __s32 status; /* si_status */
    __s32 svint; /* si_int */
    __u64 svptr; /* si_ptr */
    __u64 utime; /* si_utime */
    __u64 stime; /* si_stime */
    __u64 addr; /* si_addr */
    };

    [akpm@linux-foundation.org: fix signalfd_copyinfo() on i386]
    Signed-off-by: Davide Libenzi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • When auditing syscalls that send signals, log the pid and security
    context for each target process. Optimize the data collection by
    adding a counter for signal-related rules, and avoiding allocating an
    aux struct unless we have more than one target process. For process
    groups, collect pid/context data in blocks of 16. Move the
    audit_signal_info() hook up in check_kill_permission() so we audit
    attempts where permission is denied.

    Signed-off-by: Amy Griffis
    Signed-off-by: Al Viro

    Amy Griffis
     

10 May, 2007

3 commits

  • Currently kernel threads use sigprocmask(SIG_BLOCK) to protect against
    signals. This doesn't prevent the signal delivery, this only blocks
    signal_wake_up(). Every "killall -33 kthreadd" means a "struct siginfo"
    leak.

    Change kthreadd_setup() to set all handlers to SIG_IGN instead of blocking
    them (make a new helper ignore_signals() for that). If the kernel thread
    needs some signal, it should use allow_signal() anyway, and in that case it
    should not use CLONE_SIGHAND.

    Note that we can't change daemonize() (should die!) in the same way,
    because it can be used along with CLONE_SIGHAND. This means that
    allow_signal() still should unblock the signal to work correctly with
    daemonize()ed threads.

    However, disallow_signal() doesn't block the signal any longer but ignores
    it.

    NOTE: with or without this patch the kernel threads are not protected from
    handle_stop_signal(), this seems harmless, but not good.

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

    Oleg Nesterov
     
  • We already depend on fact that all sub-threads have ->exit_signal == -1, no
    need to set it in zap_other_threads().

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • This patch moves the sig_kernel_* and related macros from kernel/signal.c
    to linux/signal.h, and cleans them up slightly. I need the sig_kernel_*
    macros for default signal behavior in the utrace code, and want to avoid
    duplication or overhead to share the knowledge.

    Signed-off-by: Roland McGrath
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     

09 May, 2007

1 commit


08 May, 2007

1 commit

  • This patch provides a new macro

    KMEM_CACHE(, )

    to simplify slab creation. KMEM_CACHE creates a slab with the name of the
    struct, with the size of the struct and with the alignment of the struct.
    Additional slab flags may be specified if necessary.

    Example

    struct test_slab {
    int a,b,c;
    struct list_head;
    } __cacheline_aligned_in_smp;

    test_slab_cache = KMEM_CACHE(test_slab, SLAB_PANIC)

    will create a new slab named "test_slab" of the size sizeof(struct
    test_slab) and aligned to the alignment of test slab. If it fails then we
    panic.

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

27 Feb, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
    [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
    [PARISC] Add missing statfs64 and fstatfs64 syscalls
    Revert "[PARISC] Optimize TLB flush on SMP systems"
    [PARISC] Compat signal fixes for 64-bit parisc
    [PARISC] Reorder syscalls to match unistd.h
    Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
    [PARISC] fix sys_rt_sigqueueinfo
    [PARISC] fix section mismatch warnings in harmony sound driver
    [PARISC] do not export get_register/set_register
    [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
    [PARISC] convert to use CONFIG_64BIT instead of __LP64__
    [PARISC] use CONFIG_64BIT instead of __LP64__
    [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
    [PARISC] more ENTRY(), ENDPROC(), END() conversions
    [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
    [PARISC] Fixes /proc/cpuinfo cache output on B160L
    [PARISC] implement standard ENTRY(), END() and ENDPROC()
    [PARISC] kill ENTRY_SYS_CPUS
    [PARISC] clean up debugging printks in smp.c
    [PARISC] factor syscall_restart code out of do_signal
    ...

    Fix conflict in include/linux/sched.h due to kill_proc_info() being made
    publicly available to PARISC again.

    Linus Torvalds
     

17 Feb, 2007

2 commits


13 Feb, 2007

3 commits

  • Now that I have changed all of the in-tree users remove the old version of
    these functions. This should make it clear to any out of tree users that they
    should be using kill_pgrp kill_pgrp_info or __kill_pgrp_info instead.

    Signed-off-by: Eric W. Biederman
    Cc: Alan Cox
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Every call to is_orphaned_pgrp passed in process_group(current) which is racy
    with respect to another thread changing our process group. It didn't bite us
    because we were dealing with integers and the worse we would get would be a
    stale answer.

    In switching the checks to use struct pid to be a little more efficient and
    prepare the way for pid namespaces this race became apparent.

    So I simplified the calls to the more specialized is_current_pgrp_orphaned so
    I didn't have to worry about making logic changes to avoid the race.

    Signed-off-by: Eric W. Biederman
    Cc: Alan Cox
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • The goal is to remove users of the old signal helper functions so they can be
    removed.

    Signed-off-by: Eric W. Biederman
    Cc: Alan Cox
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman