diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-11 01:48:37 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-11 01:48:37 -0400 |
| commit | 1a04392bd6439876b1552793389cbb5be356ea54 (patch) | |
| tree | 12af7b77e3b0848127f2d2871778c9c1f315578a /kernel | |
| parent | 68399bb5080c1d96f2110b0a040b39d3ccd7a18a (diff) | |
| parent | 3c92c2ba33cd7d666c5f83cc32aa590e794e91b0 (diff) | |
Merge branch 'master'
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/audit.c | 2 | ||||
| -rw-r--r-- | kernel/cpuset.c | 2 | ||||
| -rw-r--r-- | kernel/kfifo.c | 4 | ||||
| -rw-r--r-- | kernel/power/swsusp.c | 7 | ||||
| -rw-r--r-- | kernel/signal.c | 39 |
5 files changed, 45 insertions, 9 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index 83096b67510a..aefa73a8a586 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
| @@ -560,7 +560,7 @@ static void audit_buffer_free(struct audit_buffer *ab) | |||
| 560 | } | 560 | } |
| 561 | 561 | ||
| 562 | static struct audit_buffer * audit_buffer_alloc(struct audit_context *ctx, | 562 | static struct audit_buffer * audit_buffer_alloc(struct audit_context *ctx, |
| 563 | unsigned int __nocast gfp_mask, int type) | 563 | gfp_t gfp_mask, int type) |
| 564 | { | 564 | { |
| 565 | unsigned long flags; | 565 | unsigned long flags; |
| 566 | struct audit_buffer *ab = NULL; | 566 | struct audit_buffer *ab = NULL; |
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 45a5719a0104..28176d083f7b 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
| @@ -1670,7 +1670,7 @@ static const struct cpuset *nearest_exclusive_ancestor(const struct cpuset *cs) | |||
| 1670 | * GFP_USER - only nodes in current tasks mems allowed ok. | 1670 | * GFP_USER - only nodes in current tasks mems allowed ok. |
| 1671 | **/ | 1671 | **/ |
| 1672 | 1672 | ||
| 1673 | int cpuset_zone_allowed(struct zone *z, unsigned int __nocast gfp_mask) | 1673 | int cpuset_zone_allowed(struct zone *z, gfp_t gfp_mask) |
| 1674 | { | 1674 | { |
| 1675 | int node; /* node that zone z is on */ | 1675 | int node; /* node that zone z is on */ |
| 1676 | const struct cpuset *cs; /* current cpuset ancestors */ | 1676 | const struct cpuset *cs; /* current cpuset ancestors */ |
diff --git a/kernel/kfifo.c b/kernel/kfifo.c index 179baafcdd96..64ab045c3d9d 100644 --- a/kernel/kfifo.c +++ b/kernel/kfifo.c | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | * struct kfifo with kfree(). | 36 | * struct kfifo with kfree(). |
| 37 | */ | 37 | */ |
| 38 | struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, | 38 | struct kfifo *kfifo_init(unsigned char *buffer, unsigned int size, |
| 39 | unsigned int __nocast gfp_mask, spinlock_t *lock) | 39 | gfp_t gfp_mask, spinlock_t *lock) |
| 40 | { | 40 | { |
| 41 | struct kfifo *fifo; | 41 | struct kfifo *fifo; |
| 42 | 42 | ||
| @@ -64,7 +64,7 @@ EXPORT_SYMBOL(kfifo_init); | |||
| 64 | * | 64 | * |
| 65 | * The size will be rounded-up to a power of 2. | 65 | * The size will be rounded-up to a power of 2. |
| 66 | */ | 66 | */ |
| 67 | struct kfifo *kfifo_alloc(unsigned int size, unsigned int __nocast gfp_mask, spinlock_t *lock) | 67 | struct kfifo *kfifo_alloc(unsigned int size, gfp_t gfp_mask, spinlock_t *lock) |
| 68 | { | 68 | { |
| 69 | unsigned char *buffer; | 69 | unsigned char *buffer; |
| 70 | struct kfifo *ret; | 70 | struct kfifo *ret; |
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index acf79ac1cb6d..2d5c45676442 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
| @@ -1095,7 +1095,7 @@ static inline void eat_page(void *page) | |||
| 1095 | *eaten_memory = c; | 1095 | *eaten_memory = c; |
| 1096 | } | 1096 | } |
| 1097 | 1097 | ||
| 1098 | static unsigned long get_usable_page(unsigned gfp_mask) | 1098 | unsigned long get_usable_page(unsigned gfp_mask) |
| 1099 | { | 1099 | { |
| 1100 | unsigned long m; | 1100 | unsigned long m; |
| 1101 | 1101 | ||
| @@ -1109,7 +1109,7 @@ static unsigned long get_usable_page(unsigned gfp_mask) | |||
| 1109 | return m; | 1109 | return m; |
| 1110 | } | 1110 | } |
| 1111 | 1111 | ||
| 1112 | static void free_eaten_memory(void) | 1112 | void free_eaten_memory(void) |
| 1113 | { | 1113 | { |
| 1114 | unsigned long m; | 1114 | unsigned long m; |
| 1115 | void **c; | 1115 | void **c; |
| @@ -1481,11 +1481,12 @@ static int read_suspend_image(void) | |||
| 1481 | /* Allocate memory for the image and read the data from swap */ | 1481 | /* Allocate memory for the image and read the data from swap */ |
| 1482 | 1482 | ||
| 1483 | error = check_pagedir(pagedir_nosave); | 1483 | error = check_pagedir(pagedir_nosave); |
| 1484 | free_eaten_memory(); | 1484 | |
| 1485 | if (!error) | 1485 | if (!error) |
| 1486 | error = data_read(pagedir_nosave); | 1486 | error = data_read(pagedir_nosave); |
| 1487 | 1487 | ||
| 1488 | if (error) { /* We fail cleanly */ | 1488 | if (error) { /* We fail cleanly */ |
| 1489 | free_eaten_memory(); | ||
| 1489 | for_each_pbe (p, pagedir_nosave) | 1490 | for_each_pbe (p, pagedir_nosave) |
| 1490 | if (p->address) { | 1491 | if (p->address) { |
| 1491 | free_page(p->address); | 1492 | free_page(p->address); |
diff --git a/kernel/signal.c b/kernel/signal.c index 619b027e92b5..50c992643771 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
| @@ -262,7 +262,7 @@ next_signal(struct sigpending *pending, sigset_t *mask) | |||
| 262 | return sig; | 262 | return sig; |
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | static struct sigqueue *__sigqueue_alloc(struct task_struct *t, unsigned int __nocast flags, | 265 | static struct sigqueue *__sigqueue_alloc(struct task_struct *t, gfp_t flags, |
| 266 | int override_rlimit) | 266 | int override_rlimit) |
| 267 | { | 267 | { |
| 268 | struct sigqueue *q = NULL; | 268 | struct sigqueue *q = NULL; |
| @@ -578,7 +578,8 @@ int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info) | |||
| 578 | * is to alert stop-signal processing code when another | 578 | * is to alert stop-signal processing code when another |
| 579 | * processor has come along and cleared the flag. | 579 | * processor has come along and cleared the flag. |
| 580 | */ | 580 | */ |
| 581 | tsk->signal->flags |= SIGNAL_STOP_DEQUEUED; | 581 | if (!(tsk->signal->flags & SIGNAL_GROUP_EXIT)) |
| 582 | tsk->signal->flags |= SIGNAL_STOP_DEQUEUED; | ||
| 582 | } | 583 | } |
| 583 | if ( signr && | 584 | if ( signr && |
| 584 | ((info->si_code & __SI_MASK) == __SI_TIMER) && | 585 | ((info->si_code & __SI_MASK) == __SI_TIMER) && |
| @@ -1192,6 +1193,40 @@ kill_proc_info(int sig, struct siginfo *info, pid_t pid) | |||
| 1192 | return error; | 1193 | return error; |
| 1193 | } | 1194 | } |
| 1194 | 1195 | ||
| 1196 | /* like kill_proc_info(), but doesn't use uid/euid of "current" */ | ||
| 1197 | int kill_proc_info_as_uid(int sig, struct siginfo *info, pid_t pid, | ||
| 1198 | uid_t uid, uid_t euid) | ||
| 1199 | { | ||
| 1200 | int ret = -EINVAL; | ||
| 1201 | struct task_struct *p; | ||
| 1202 | |||
| 1203 | if (!valid_signal(sig)) | ||
| 1204 | return ret; | ||
| 1205 | |||
| 1206 | read_lock(&tasklist_lock); | ||
| 1207 | p = find_task_by_pid(pid); | ||
| 1208 | if (!p) { | ||
| 1209 | ret = -ESRCH; | ||
| 1210 | goto out_unlock; | ||
| 1211 | } | ||
| 1212 | if ((!info || ((unsigned long)info != 1 && | ||
| 1213 | (unsigned long)info != 2 && SI_FROMUSER(info))) | ||
| 1214 | && (euid != p->suid) && (euid != p->uid) | ||
| 1215 | && (uid != p->suid) && (uid != p->uid)) { | ||
| 1216 | ret = -EPERM; | ||
| 1217 | goto out_unlock; | ||
| 1218 | } | ||
| 1219 | if (sig && p->sighand) { | ||
| 1220 | unsigned long flags; | ||
| 1221 | spin_lock_irqsave(&p->sighand->siglock, flags); | ||
| 1222 | ret = __group_send_sig_info(sig, info, p); | ||
| 1223 | spin_unlock_irqrestore(&p->sighand->siglock, flags); | ||
| 1224 | } | ||
| 1225 | out_unlock: | ||
| 1226 | read_unlock(&tasklist_lock); | ||
| 1227 | return ret; | ||
| 1228 | } | ||
| 1229 | EXPORT_SYMBOL_GPL(kill_proc_info_as_uid); | ||
| 1195 | 1230 | ||
| 1196 | /* | 1231 | /* |
| 1197 | * kill_something_info() interprets pid in interesting ways just like kill(2). | 1232 | * kill_something_info() interprets pid in interesting ways just like kill(2). |
