Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310111
b: refs/heads/master
c: 855f80c
h: refs/heads/master
i:
  310109: 6426872
  310107: 52d25bd
  310103: 6dbb4f9
  310095: 8157437
  310079: 31090bc
v: v3
  • Loading branch information
Lee Jones authored and Arnd Bergmann committed Jun 1, 2012
1 parent b21d676 commit 17dd129
Show file tree
Hide file tree
Showing 444 changed files with 6,349 additions and 18,832 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ded7acfddb3d8dad4a1490a3a75e9d8bc975c35
refs/heads/master: 855f80cd1683179b251b01d232b3ae228c614766
2 changes: 0 additions & 2 deletions trunk/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,3 @@ Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Yusuke Goda <goda.yusuke@renesas.com>
Gustavo Padovan <gustavo@las.ic.unicamp.br>
Gustavo Padovan <padovan@profusion.mobi>
16 changes: 2 additions & 14 deletions trunk/Documentation/CodingStyle
Original file line number Diff line number Diff line change
Expand Up @@ -671,9 +671,8 @@ ones already enabled by DEBUG.
Chapter 14: Allocating memory

The kernel provides the following general purpose memory allocators:
kmalloc(), kzalloc(), kmalloc_array(), kcalloc(), vmalloc(), and
vzalloc(). Please refer to the API documentation for further information
about them.
kmalloc(), kzalloc(), kcalloc(), vmalloc(), and vzalloc(). Please refer to
the API documentation for further information about them.

The preferred form for passing a size of a struct is the following:

Expand All @@ -687,17 +686,6 @@ Casting the return value which is a void pointer is redundant. The conversion
from void pointer to any other pointer type is guaranteed by the C programming
language.

The preferred form for allocating an array is the following:

p = kmalloc_array(n, sizeof(...), ...);

The preferred form for allocating a zeroed array is the following:

p = kcalloc(n, sizeof(...), ...);

Both forms check for overflow on the allocation size n * sizeof(...),
and return NULL if that occurred.


Chapter 15: The inline disease

Expand Down
3 changes: 0 additions & 3 deletions trunk/Documentation/filesystems/Locking
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ ata *);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
int (*removexattr) (struct dentry *, const char *);
int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);
void (*update_time)(struct inode *, struct timespec *, int);

locking rules:
all may block
Expand All @@ -88,8 +87,6 @@ getxattr: no
listxattr: no
removexattr: yes
fiemap: no
update_time: no

Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
victim.
cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
Expand Down
23 changes: 0 additions & 23 deletions trunk/Documentation/filesystems/proc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Table of Contents
3.4 /proc/<pid>/coredump_filter - Core dump filtering settings
3.5 /proc/<pid>/mountinfo - Information about mounts
3.6 /proc/<pid>/comm & /proc/<pid>/task/<tid>/comm
3.7 /proc/<pid>/task/<tid>/children - Information about task children

4 Configuring procfs
4.1 Mount options
Expand Down Expand Up @@ -311,11 +310,6 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
start_data address above which program data+bss is placed
end_data address below which program data+bss is placed
start_brk address above which program heap can be expanded with brk()
arg_start address above which program command line is placed
arg_end address below which program command line is placed
env_start address above which program environment is placed
env_end address below which program environment is placed
exit_code the thread's exit_code in the form reported by the waitpid system call
..............................................................................

The /proc/PID/maps file containing the currently mapped memory regions and
Expand Down Expand Up @@ -1584,23 +1578,6 @@ then the kernel's TASK_COMM_LEN (currently 16 chars) will result in a truncated
comm value.


3.7 /proc/<pid>/task/<tid>/children - Information about task children
-------------------------------------------------------------------------
This file provides a fast way to retrieve first level children pids
of a task pointed by <pid>/<tid> pair. The format is a space separated
stream of pids.

Note the "first level" here -- if a child has own children they will
not be listed here, one needs to read /proc/<children-pid>/task/<tid>/children
to obtain the descendants.

Since this interface is intended to be fast and cheap it doesn't
guarantee to provide precise results and some children might be
skipped, especially if they've exited right after we printed their
pids, so one need to either stop or freeze processes being inspected
if precise results are needed.


------------------------------------------------------------------------------
Configuring procfs
------------------------------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions trunk/Documentation/filesystems/vfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ struct inode_operations {
ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
int (*removexattr) (struct dentry *, const char *);
void (*update_time)(struct inode *, struct timespec *, int);
};

Again, all methods are called without any locks being held, unless
Expand Down Expand Up @@ -472,9 +471,6 @@ otherwise noted.
removexattr: called by the VFS to remove an extended attribute from
a file. This method is called by removexattr(2) system call.

update_time: called by the VFS to update a specific time or the i_version of
an inode. If this is not defined the VFS will update the inode itself
and call mark_inode_dirty_sync.

The Address Space Object
========================
Expand Down
7 changes: 0 additions & 7 deletions trunk/Documentation/sysctl/fs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,6 @@ a queue must be less or equal then msg_max.
maximum message size value (it is every message queue's attribute set during
its creation).

/proc/sys/fs/mqueue/msg_default is a read/write file for setting/getting the
default number of messages in a queue value if attr parameter of mq_open(2) is
NULL. If it exceed msg_max, the default value is initialized msg_max.

/proc/sys/fs/mqueue/msgsize_default is a read/write file for setting/getting
the default message size value if attr parameter of mq_open(2) is NULL. If it
exceed msgsize_max, the default value is initialized msgsize_max.

4. /proc/sys/fs/epoll - Configuration options for the epoll interface
--------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion trunk/Documentation/vm/pagemap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ There are three components to pagemap:
* Bits 0-4 swap type if swapped
* Bits 5-54 swap offset if swapped
* Bits 55-60 page shift (page size = 1<<page shift)
* Bit 61 page is file-page or shared-anon
* Bit 61 reserved for future use
* Bit 62 page swapped
* Bit 63 page present

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/alpha/include/asm/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
typedef unsigned int __kernel_ino_t;
#define __kernel_ino_t __kernel_ino_t

typedef unsigned int __kernel_nlink_t;
#define __kernel_nlink_t __kernel_nlink_t

typedef unsigned long __kernel_sigset_t; /* at least 32 bits */

#include <asm-generic/posix_types.h>
Expand Down
20 changes: 17 additions & 3 deletions trunk/arch/alpha/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ do_sigreturn(struct sigcontext __user *sc, struct pt_regs *regs,
if (__get_user(set.sig[0], &sc->sc_mask))
goto give_sigsegv;

sigdelsetmask(&set, ~_BLOCKABLE);
set_current_blocked(&set);

if (restore_sigcontext(sc, regs, sw))
Expand Down Expand Up @@ -260,6 +261,7 @@ do_rt_sigreturn(struct rt_sigframe __user *frame, struct pt_regs *regs,
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
goto give_sigsegv;

sigdelsetmask(&set, ~_BLOCKABLE);
set_current_blocked(&set);

if (restore_sigcontext(&frame->uc.uc_mcontext, regs, sw))
Expand Down Expand Up @@ -466,9 +468,12 @@ static inline void
handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
struct pt_regs * regs, struct switch_stack *sw)
{
sigset_t *oldset = sigmask_to_save();
sigset_t *oldset = &current->blocked;
int ret;

if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = &current->saved_sigmask;

if (ka->sa.sa_flags & SA_SIGINFO)
ret = setup_rt_frame(sig, ka, info, oldset, regs, sw);
else
Expand All @@ -478,7 +483,12 @@ handle_signal(int sig, struct k_sigaction *ka, siginfo_t *info,
force_sigsegv(sig, current);
return;
}
signal_delivered(sig, info, ka, regs, 0);
block_sigmask(ka, sig);
/* A signal was successfully delivered, and the
saved sigmask was stored on the signal frame,
and will be restored by sigreturn. So we can
simply clear the restore sigmask flag. */
clear_thread_flag(TIF_RESTORE_SIGMASK);
}

static inline void
Expand Down Expand Up @@ -562,7 +572,9 @@ do_signal(struct pt_regs * regs, struct switch_stack * sw,
}

/* If there's no signal to deliver, we just restore the saved mask. */
restore_saved_sigmask();
if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK))
set_current_blocked(&current->saved_sigmask);

if (single_stepping)
ptrace_set_bpt(current); /* re-set breakpoint */
}
Expand All @@ -578,5 +590,7 @@ do_notify_resume(struct pt_regs *regs, struct switch_stack *sw,
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
if (current->replacement_session_keyring)
key_replace_session_keyring();
}
}
3 changes: 3 additions & 0 deletions trunk/arch/arm/include/asm/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
typedef unsigned short __kernel_mode_t;
#define __kernel_mode_t __kernel_mode_t

typedef unsigned short __kernel_nlink_t;
#define __kernel_nlink_t __kernel_nlink_t

typedef unsigned short __kernel_ipc_pid_t;
#define __kernel_ipc_pid_t __kernel_ipc_pid_t

Expand Down
49 changes: 41 additions & 8 deletions trunk/arch/arm/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "signal.h"

#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))

/*
* For ARM syscalls, we encode the syscall number into the instruction.
*/
Expand Down Expand Up @@ -208,8 +210,10 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf)
int err;

err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set));
if (err == 0)
if (err == 0) {
sigdelsetmask(&set, ~_BLOCKABLE);
set_current_blocked(&set);
}

__get_user_error(regs->ARM_r0, &sf->uc.uc_mcontext.arm_r0, err);
__get_user_error(regs->ARM_r1, &sf->uc.uc_mcontext.arm_r1, err);
Expand Down Expand Up @@ -524,13 +528,13 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
/*
* OK, we're invoking a handler
*/
static void
static int
handle_signal(unsigned long sig, struct k_sigaction *ka,
siginfo_t *info, struct pt_regs *regs)
siginfo_t *info, sigset_t *oldset,
struct pt_regs * regs)
{
struct thread_info *thread = current_thread_info();
struct task_struct *tsk = current;
sigset_t *oldset = sigmask_to_save();
int usig = sig;
int ret;

Expand All @@ -555,9 +559,17 @@ handle_signal(unsigned long sig, struct k_sigaction *ka,

if (ret != 0) {
force_sigsegv(sig, tsk);
return;
return ret;
}
signal_delivered(sig, info, ka, regs, 0);

/*
* Block the signal if we were successful.
*/
block_sigmask(ka, sig);

tracehook_signal_handler(sig, info, ka, regs, 0);

return 0;
}

/*
Expand Down Expand Up @@ -605,6 +617,8 @@ static void do_signal(struct pt_regs *regs, int syscall)
*/
signr = get_signal_to_deliver(&info, &ka, regs, NULL);
if (signr > 0) {
sigset_t *oldset;

/*
* Depending on the signal settings we may need to revert the
* decision to restart the system call. But skip this if a
Expand All @@ -621,7 +635,20 @@ static void do_signal(struct pt_regs *regs, int syscall)
clear_thread_flag(TIF_SYSCALL_RESTARTSYS);
}

handle_signal(signr, &ka, &info, regs);
if (test_thread_flag(TIF_RESTORE_SIGMASK))
oldset = &current->saved_sigmask;
else
oldset = &current->blocked;
if (handle_signal(signr, &ka, &info, oldset, regs) == 0) {
/*
* A signal was successfully delivered; the saved
* sigmask will have been stored in the signal frame,
* and will be restored by sigreturn, so we can simply
* clear the TIF_RESTORE_SIGMASK flag.
*/
if (test_thread_flag(TIF_RESTORE_SIGMASK))
clear_thread_flag(TIF_RESTORE_SIGMASK);
}
return;
}

Expand All @@ -636,7 +663,11 @@ static void do_signal(struct pt_regs *regs, int syscall)
set_thread_flag(TIF_SYSCALL_RESTARTSYS);
}

restore_saved_sigmask();
/* If there's no signal to deliver, we just put the saved sigmask
* back.
*/
if (test_and_clear_thread_flag(TIF_RESTORE_SIGMASK))
set_current_blocked(&current->saved_sigmask);
}

asmlinkage void
Expand All @@ -648,5 +679,7 @@ do_notify_resume(struct pt_regs *regs, unsigned int thread_flags, int syscall)
if (thread_flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
if (current->replacement_session_keyring)
key_replace_session_keyring();
}
}
8 changes: 7 additions & 1 deletion trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ static void percpu_timer_stop(void);
int __cpu_disable(void)
{
unsigned int cpu = smp_processor_id();
struct task_struct *p;
int ret;

ret = platform_cpu_disable(cpu);
Expand Down Expand Up @@ -138,7 +139,12 @@ int __cpu_disable(void)
flush_cache_all();
local_flush_tlb_all();

clear_tasks_mm_cpumask(cpu);
read_lock(&tasklist_lock);
for_each_process(p) {
if (p->mm)
cpumask_clear_cpu(cpu, mm_cpumask(p->mm));
}
read_unlock(&tasklist_lock);

return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/avr32/include/asm/posix_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
typedef unsigned short __kernel_mode_t;
#define __kernel_mode_t __kernel_mode_t

typedef unsigned short __kernel_nlink_t;
#define __kernel_nlink_t __kernel_nlink_t

typedef unsigned short __kernel_ipc_pid_t;
#define __kernel_ipc_pid_t __kernel_ipc_pid_t

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/avr32/kernel/entry-avr32b.S
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ syscall_exit_work:
ld.w r1, r0[TI_flags]
rjmp 1b

2: mov r2, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME
2: mov r2, _TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NOTIFY_RESUME
tst r1, r2
breq 3f
unmask_interrupts
Expand Down Expand Up @@ -587,7 +587,7 @@ fault_exit_work:
ld.w r1, r0[TI_flags]
rjmp fault_exit_work

1: mov r2, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME
1: mov r2, _TIF_SIGPENDING | _TIF_RESTORE_SIGMASK
tst r1, r2
breq 2f
unmask_interrupts
Expand Down
Loading

0 comments on commit 17dd129

Please sign in to comment.