
From: Chris Wright <chrisw@osdl.org>

Add sigpending field to user_struct, and make sure it's properly initialized.


---

 25-akpm/include/linux/sched.h |    1 +
 25-akpm/kernel/user.c         |    4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff -puN include/linux/sched.h~rlim-add-sigpending-field-to-user_struct include/linux/sched.h
--- 25/include/linux/sched.h~rlim-add-sigpending-field-to-user_struct	2004-05-18 18:31:47.260672008 -0700
+++ 25-akpm/include/linux/sched.h	2004-05-18 18:31:47.265671248 -0700
@@ -322,6 +322,7 @@ struct user_struct {
 	atomic_t __count;	/* reference count */
 	atomic_t processes;	/* How many processes does this user have? */
 	atomic_t files;		/* How many open files does this user have? */
+	atomic_t sigpending;	/* How many pending signals does this user have? */
 
 	/* Hash table maintenance information */
 	struct list_head uidhash_list;
diff -puN kernel/user.c~rlim-add-sigpending-field-to-user_struct kernel/user.c
--- 25/kernel/user.c~rlim-add-sigpending-field-to-user_struct	2004-05-18 18:31:47.261671856 -0700
+++ 25-akpm/kernel/user.c	2004-05-18 18:31:47.266671096 -0700
@@ -30,7 +30,8 @@ static spinlock_t uidhash_lock = SPIN_LO
 struct user_struct root_user = {
 	.__count	= ATOMIC_INIT(1),
 	.processes	= ATOMIC_INIT(1),
-	.files		= ATOMIC_INIT(0)
+	.files		= ATOMIC_INIT(0),
+	.sigpending	= ATOMIC_INIT(0),
 };
 
 /*
@@ -108,6 +109,7 @@ struct user_struct * alloc_uid(uid_t uid
 		atomic_set(&new->__count, 1);
 		atomic_set(&new->processes, 0);
 		atomic_set(&new->files, 0);
+		atomic_set(&new->sigpending, 0);
 
 		/*
 		 * Before adding this, check whether we raced

_
