summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2005-05-01 22:26:23 +0000
committerDaniel Drake <dsd@gentoo.org>2005-05-01 22:26:23 +0000
commite775ca0f39026a4d797ace36feb3bb8599b23225 (patch)
treee854fb7bdb79d8fa802a8217bf617525e8de21dd /sys-kernel
parentconf file fix from #90662 (diff)
downloadgentoo-2-e775ca0f39026a4d797ace36feb3bb8599b23225.tar.gz
gentoo-2-e775ca0f39026a4d797ace36feb3bb8599b23225.tar.bz2
gentoo-2-e775ca0f39026a4d797ace36feb3bb8599b23225.zip
Remove old version
(Portage version: 1.589-cvs)
Diffstat (limited to 'sys-kernel')
-rw-r--r--sys-kernel/usermode-sources/files/digest-usermode-sources-2.6.8.1-r93
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.75963.patch32
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.77094.patch142
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.77666.patch170
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.77923.patch31
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.78362.patch73
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.81106.patch32
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.82141.patch191
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.AF_UNIX.SELinux.patch61
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.AF_UNIX.patch24
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1016.patch75
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1056.patch202
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1137.patch77
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1151.patch35
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.binfmt_a.out.patch63
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.binfmt_elf.patch85
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.brk-locked.patch303
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.cmdlineLeak.patch12
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.devPtmx.patch21
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.smbfs.patch93
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources-2.6.vma.patch205
-rw-r--r--sys-kernel/usermode-sources/files/usermode-sources.CAN-2004-0497.patch26
-rw-r--r--sys-kernel/usermode-sources/usermode-sources-2.6.8.1-r9.ebuild49
23 files changed, 0 insertions, 2005 deletions
diff --git a/sys-kernel/usermode-sources/files/digest-usermode-sources-2.6.8.1-r9 b/sys-kernel/usermode-sources/files/digest-usermode-sources-2.6.8.1-r9
deleted file mode 100644
index 700dd6829cb4..000000000000
--- a/sys-kernel/usermode-sources/files/digest-usermode-sources-2.6.8.1-r9
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 9517ca999e822b898fbdc7e72796b1aa linux-2.6.8.1.tar.bz2 35628066
-MD5 71cbf81acbd2a4229024a5cf2f9a7119 uml-patch-2.6.8.1-1.bz2 142306
-MD5 a982d764db8b017f67f9d74912c15b41 linux-2.6.8.1-CAN-2004-0814.patch 130062
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.75963.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.75963.patch
deleted file mode 100644
index 80390f13bd73..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.75963.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- linux-2.6.10/security/dummy.c 2004-12-24 21:34:26.000000000 +0000
-+++ linux-2.6.10.plasmaroo/security/dummy.c 2005-01-07 20:13:50.763073872 +0000
-@@ -74,11 +74,8 @@
-
- static int dummy_capable (struct task_struct *tsk, int cap)
- {
-- if (cap_is_fs_cap (cap) ? tsk->fsuid == 0 : tsk->euid == 0)
-- /* capability granted */
-+ if (cap_raised (tsk->cap_effective, cap))
- return 0;
--
-- /* capability denied */
- return -EPERM;
- }
-
-@@ -191,6 +188,8 @@
-
- current->suid = current->euid = current->fsuid = bprm->e_uid;
- current->sgid = current->egid = current->fsgid = bprm->e_gid;
-+
-+ dummy_capget(current, &current->cap_effective, &current->cap_inheritable, &current->cap_permitted);
- }
-
- static int dummy_bprm_set_security (struct linux_binprm *bprm)
-@@ -550,6 +549,7 @@
-
- static int dummy_task_post_setuid (uid_t id0, uid_t id1, uid_t id2, int flags)
- {
-+ dummy_capget(current, &current->cap_effective, &current->cap_inheritable, &current->cap_permitted);
- return 0;
- }
-
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.77094.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.77094.patch
deleted file mode 100644
index 6b2c7bdb2317..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.77094.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-diff -urp linux-2.6.8.1-r7/drivers/block/scsi_ioctl.c linux-2.6.8.1-r8/drivers/block/scsi_ioctl.c
---- linux-2.6.8.1-r7/drivers/block/scsi_ioctl.c 2004-08-14 11:56:23.000000000 +0100
-+++ linux-2.6.8.1-r8/drivers/block/scsi_ioctl.c 2005-01-09 12:09:55.345308528 +0000
-@@ -304,7 +304,8 @@ static int sg_scsi_ioctl(struct file *fi
- struct gendisk *bd_disk, Scsi_Ioctl_Command __user *sic)
- {
- struct request *rq;
-- int err, in_len, out_len, bytes, opcode, cmdlen;
-+ unsigned int in_len, out_len, bytes, opcode, cmdlen;
-+ int err;
- char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
-
- /*
-diff -urp linux-2.6.8.1-r7/drivers/char/moxa.c linux-2.6.8.1-r8/drivers/char/moxa.c
---- linux-2.6.8.1-r7/drivers/char/moxa.c 2005-01-09 12:06:21.000000000 +0000
-+++ linux-2.6.8.1-r8/drivers/char/moxa.c 2005-01-09 12:09:55.327311264 +0000
-@@ -1687,6 +1687,8 @@ int MoxaDriverIoctl(unsigned int cmd, un
- return -EFAULT;
- if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS)
- return -EINVAL;
-+ if(dltmp.len < 0 || dltmp.len > sizeof(moxaBuff))
-+ return -EINVAL;
-
- switch(cmd)
- {
-@@ -2841,8 +2843,6 @@ static int moxaload320b(int cardno, unsi
- unsigned long baseAddr;
- int i;
-
-- if(len > sizeof(moxaBuff))
-- return -EINVAL;
- if(copy_from_user(moxaBuff, tmp, len))
- return -EFAULT;
- baseAddr = moxaBaseAddr[cardno];
-diff -urp linux-2.6.8.1-r7/drivers/char/random.c linux-2.6.8.1-r8/drivers/char/random.c
---- linux-2.6.8.1-r7/drivers/char/random.c 2004-08-14 11:54:48.000000000 +0100
-+++ linux-2.6.8.1-r8/drivers/char/random.c 2005-01-09 12:09:55.358306552 +0000
-@@ -1917,7 +1917,7 @@ static int poolsize_strategy(ctl_table *
- void __user *oldval, size_t __user *oldlenp,
- void __user *newval, size_t newlen, void **context)
- {
-- int len;
-+ size_t len;
-
- sysctl_poolsize = random_state->poolinfo.POOLBYTES;
-
-diff -urp linux-2.6.8.1-r7/include/linux/writeback.h linux-2.6.8.1-r8/include/linux/writeback.h
---- linux-2.6.8.1-r7/include/linux/writeback.h 2004-08-14 11:54:49.000000000 +0100
-+++ linux-2.6.8.1-r8/include/linux/writeback.h 2005-01-09 12:09:55.000000000 +0000
-@@ -74,6 +74,7 @@ static inline void wait_on_inode(struct
- int wakeup_bdflush(long nr_pages);
- void laptop_io_completion(void);
- void laptop_sync_completion(void);
-+void throttle_vm_writeout(void);
-
- /* These are exported to sysctl. */
- extern int dirty_background_ratio;
-diff -urp linux-2.6.8.1-r7/mm/mmap.c linux-2.6.8.1-r8/mm/mmap.c
---- linux-2.6.8.1-r7/mm/mmap.c 2005-01-09 12:06:23.000000000 +0000
-+++ linux-2.6.8.1-r8/mm/mmap.c 2005-01-09 12:09:55.000000000 +0000
-@@ -1223,6 +1223,13 @@ int expand_stack(struct vm_area_struct *
- vm_unacct_memory(grow);
- return -ENOMEM;
- }
-+ if ((vma->vm_flags & VM_LOCKED) && !capable(CAP_IPC_LOCK) &&
-+ ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
-+ current->rlim[RLIMIT_MEMLOCK].rlim_cur) {
-+ anon_vma_unlock(vma);
-+ vm_unacct_memory(grow);
-+ return -ENOMEM;
-+ }
- vma->vm_end = address;
- vma->vm_mm->total_vm += grow;
- if (vma->vm_flags & VM_LOCKED)
-@@ -1284,6 +1291,13 @@ int expand_stack(struct vm_area_struct *
- vm_unacct_memory(grow);
- return -ENOMEM;
- }
-+ if ((vma->vm_flags & VM_LOCKED) && !capable(CAP_IPC_LOCK) &&
-+ ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
-+ current->rlim[RLIMIT_MEMLOCK].rlim_cur) {
-+ anon_vma_unlock(vma);
-+ vm_unacct_memory(grow);
-+ return -ENOMEM;
-+ }
- vma->vm_start = address;
- vma->vm_pgoff -= grow;
- vma->vm_mm->total_vm += grow;
-diff -urp linux-2.6.8.1-r7/mm/page-writeback.c linux-2.6.8.1-r8/mm/page-writeback.c
---- linux-2.6.8.1-r7/mm/page-writeback.c 2004-08-14 11:55:47.000000000 +0100
-+++ linux-2.6.8.1-r8/mm/page-writeback.c 2005-01-09 12:09:55.000000000 +0000
-@@ -276,6 +276,28 @@ void balance_dirty_pages_ratelimited(str
- }
- EXPORT_SYMBOL(balance_dirty_pages_ratelimited);
-
-+void throttle_vm_writeout(void)
-+{
-+ struct writeback_state wbs;
-+ long background_thresh;
-+ long dirty_thresh;
-+
-+ for ( ; ; ) {
-+ get_dirty_limits(&wbs, &background_thresh, &dirty_thresh);
-+
-+ /*
-+ * Boost the allowable dirty threshold a bit for page
-+ * allocators so they don't get DoS'ed by heavy writers
-+ */
-+ dirty_thresh += dirty_thresh / 10; /* wheeee... */
-+
-+ if (wbs.nr_unstable + wbs.nr_writeback <= dirty_thresh)
-+ break;
-+ blk_congestion_wait(WRITE, HZ/10);
-+ }
-+}
-+
-+
- /*
- * writeback at least _min_pages, and keep writing until the amount of dirty
- * memory is less than the background threshold, or until we're all clean.
-diff -urp linux-2.6.8.1-r7/mm/vmscan.c linux-2.6.8.1-r8/mm/vmscan.c
---- linux-2.6.8.1-r7/mm/vmscan.c 2004-08-14 11:54:50.000000000 +0100
-+++ linux-2.6.8.1-r8/mm/vmscan.c 2005-01-09 12:10:52.000000000 +0000
-@@ -362,9 +362,6 @@ static int shrink_list(struct list_head
-
- BUG_ON(PageActive(page));
-
-- if (PageWriteback(page))
-- goto keep_locked;
--
- sc->nr_scanned++;
- /* Double the slab pressure for mapped and swapcache pages */
- if (page_mapped(page) || PageSwapCache(page))
-@@ -841,6 +838,8 @@ shrink_zone(struct zone *zone, struct sc
- break;
- }
- }
-+
-+ throttle_vm_writeout();
- }
-
- /*
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.77666.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.77666.patch
deleted file mode 100644
index e0d393235123..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.77666.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-diff -urNpX /usr/src/dontdiff linux-2.6.8.1-r9/mm/mmap.c linux-dsd/mm/mmap.c
---- linux-2.6.8.1-r9/mm/mmap.c 2005-03-16 14:56:52.000000000 +0000
-+++ linux-dsd/mm/mmap.c 2005-03-16 15:14:58.000000000 +0000
-@@ -1182,13 +1182,57 @@ out:
- return prev ? prev->vm_next : vma;
- }
-
-+/*
-+ * Verify that the stack growth is acceptable and
-+ * update accounting. This is shared with both the
-+ * grow-up and grow-down cases.
-+ */
-+static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, unsigned long grow)
-+{
-+ struct mm_struct *mm = vma->vm_mm;
-+ struct rlimit *rlim = current->rlim;
-+
-+ /* address space limit tests */
-+ rlim = current->rlim;
-+ if (mm->total_vm + grow > rlim[RLIMIT_AS].rlim_cur >> PAGE_SHIFT)
-+ return -ENOMEM;
-+
-+ /* Stack limit test */
-+ if (size > rlim[RLIMIT_STACK].rlim_cur)
-+ return -ENOMEM;
-+
-+ /* mlock limit tests */
-+ if (vma->vm_flags & VM_LOCKED) {
-+ unsigned long locked;
-+ unsigned long limit;
-+ locked = mm->locked_vm + grow;
-+ limit = rlim[RLIMIT_MEMLOCK].rlim_cur >> PAGE_SHIFT;
-+ if (locked > limit && !capable(CAP_IPC_LOCK))
-+ return -ENOMEM;
-+ }
-+
-+ /*
-+ * Overcommit.. This must be the final test, as it will
-+ * update security statistics.
-+ */
-+ if (security_vm_enough_memory(grow))
-+ return -ENOMEM;
-+
-+ /* Ok, everything looks good - let it rip */
-+ mm->total_vm += grow;
-+ if (vma->vm_flags & VM_LOCKED)
-+ mm->locked_vm += grow;
-+ __vm_stat_account(mm, vma->vm_flags, vma->vm_file, grow);
-+ return 0;
-+}
-+
- #ifdef CONFIG_STACK_GROWSUP
- /*
- * vma is the first one with address > vma->vm_end. Have to extend vma.
- */
- int expand_stack(struct vm_area_struct * vma, unsigned long address)
- {
-- unsigned long grow;
-+ int error;
-
- if (!(vma->vm_flags & VM_GROWSUP))
- return -EFAULT;
-@@ -1208,20 +1252,18 @@ int expand_stack(struct vm_area_struct *
- */
- address += 4 + PAGE_SIZE - 1;
- address &= PAGE_MASK;
-- grow = (address - vma->vm_end) >> PAGE_SHIFT;
-+ error = 0;
-
-- /* Overcommit.. */
-- if (security_vm_enough_memory(grow)) {
-- anon_vma_unlock(vma);
-- return -ENOMEM;
-- }
--
-- if (address - vma->vm_start > current->rlim[RLIMIT_STACK].rlim_cur ||
-- ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
-- current->rlim[RLIMIT_AS].rlim_cur) {
-- anon_vma_unlock(vma);
-- vm_unacct_memory(grow);
-- return -ENOMEM;
-+ /* Somebody else might have raced and expanded it already */
-+ if (address > vma->vm_end) {
-+ unsigned long size, grow;
-+
-+ size = address - vma->vm_start;
-+ grow = (address - vma->vm_end) >> PAGE_SHIFT;
-+
-+ error = acct_stack_growth(vma, size, grow);
-+ if (!error)
-+ vma->vm_end = address;
- }
- if ((vma->vm_flags & VM_LOCKED) && !capable(CAP_IPC_LOCK) &&
- ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
-@@ -1230,12 +1272,12 @@ int expand_stack(struct vm_area_struct *
- vm_unacct_memory(grow);
- return -ENOMEM;
- }
-- vma->vm_end = address;
-- vma->vm_mm->total_vm += grow;
-- if (vma->vm_flags & VM_LOCKED)
-- vma->vm_mm->locked_vm += grow;
-+
-+ error = acct_stack_growth(vma, size, grow);
-+ if (!error)
-+ vma->vm_end = address;
- anon_vma_unlock(vma);
-- return 0;
-+ return error;
- }
-
- struct vm_area_struct *
-@@ -1260,7 +1302,7 @@ find_extend_vma(struct mm_struct *mm, un
- */
- int expand_stack(struct vm_area_struct *vma, unsigned long address)
- {
-- unsigned long grow;
-+ int error;
-
- /*
- * We must make sure the anon_vma is allocated
-@@ -1276,20 +1318,20 @@ int expand_stack(struct vm_area_struct *
- * anon_vma lock to serialize against concurrent expand_stacks.
- */
- address &= PAGE_MASK;
-- grow = (vma->vm_start - address) >> PAGE_SHIFT;
-+ error = 0;
-
-- /* Overcommit.. */
-- if (security_vm_enough_memory(grow)) {
-- anon_vma_unlock(vma);
-- return -ENOMEM;
-- }
--
-- if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
-- ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
-- current->rlim[RLIMIT_AS].rlim_cur) {
-- anon_vma_unlock(vma);
-- vm_unacct_memory(grow);
-- return -ENOMEM;
-+ /* Somebody else might have raced and expanded it already */
-+ if (address < vma->vm_start) {
-+ unsigned long size, grow;
-+
-+ size = vma->vm_end - address;
-+ grow = (vma->vm_start - address) >> PAGE_SHIFT;
-+
-+ error = acct_stack_growth(vma, size, grow);
-+ if (!error) {
-+ vma->vm_start = address;
-+ vma->vm_pgoff -= grow;
-+ }
- }
- if ((vma->vm_flags & VM_LOCKED) && !capable(CAP_IPC_LOCK) &&
- ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
-@@ -1298,13 +1340,8 @@ int expand_stack(struct vm_area_struct *
- vm_unacct_memory(grow);
- return -ENOMEM;
- }
-- vma->vm_start = address;
-- vma->vm_pgoff -= grow;
-- vma->vm_mm->total_vm += grow;
-- if (vma->vm_flags & VM_LOCKED)
-- vma->vm_mm->locked_vm += grow;
- anon_vma_unlock(vma);
-- return 0;
-+ return error;
- }
-
- struct vm_area_struct *
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.77923.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.77923.patch
deleted file mode 100644
index 30bed5b3fb0e..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.77923.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-# ChangeSet
-# 2005/01/04 15:57:25-08:00 brugolsky@telemetry-investments.com.
-# [PATCH] NFS client O_DIRECT error case fix
-#
-# The NFS direct-io error return path for request sizes greater than
-# MAX_DIRECTIO_SIZE fails to initialize the returned page struct array
-# pointer to NULL.
-#
-# Discovered using AKPM's ext3-tools: odwrite -ko 0 16385 foo
-#
-# Signed-off-by: Bill Rugolsky <brugolsky@telemetry-investments.com>
-# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-#
-# fs/nfs/direct.c
-# 2005/01/04 13:55:37-08:00 brugolsky@telemetry-investments.com +3 -1
-# NFS client O_DIRECT error case fix
-#
-diff -Nru linux-2.6.10/fs/nfs/direct.c linux-2.6.10.plasmaroo/fs/nfs/direct.c
---- linux-2.6.10/fs/nfs/direct.c 2005-01-11 21:28:34 +01:00
-+++ linux-2.6.10.plasmaroo/fs/nfs/direct.c 2005-01-11 21:28:34 +01:00
-@@ -73,7 +73,10 @@
-
- /* set an arbitrary limit to prevent arithmetic overflow */
- if (size > MAX_DIRECTIO_SIZE)
-+ {
-+ *pages = NULL;
- return -EFBIG;
-+ }
-
- page_count = (user_addr + size + PAGE_SIZE - 1) >> PAGE_SHIFT;
- page_count -= user_addr >> PAGE_SHIFT;
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.78362.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.78362.patch
deleted file mode 100644
index 77d32c3cc035..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.78362.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2004/12/08 13:03:03-08:00 davem@nuts.davemloft.net
-# [NET]: CMSG compat code needs signedness fixes too.
-#
-# Signed-off-by: David S. Miller <davem@davemloft.net>
-#
-# net/compat.c
-# 2004/12/08 13:02:32-08:00 davem@nuts.davemloft.net +7 -5
-# [NET]: CMSG compat code needs signedness fixes too.
-#
-# ChangeSet
-# 2004/12/10 09:52:42-08:00 torvalds@ppc970.osdl.org
-# Make sure VC resizing fits in s16.
-#
-# Noted by Georgi Guninski
-#
-# drivers/char/vt.c
-# 2004/12/10 09:52:35-08:00 torvalds@ppc970.osdl.org +5 -0
-# Make sure VC resizing fits in s16.
-#
-diff -Nru a/net/compat.c b/net/compat.c
---- a/net/compat.c 2005-02-15 11:46:30 -08:00
-+++ b/net/compat.c 2005-02-15 11:46:30 -08:00
-@@ -124,6 +124,12 @@
- (struct compat_cmsghdr __user *)((msg)->msg_control) : \
- (struct compat_cmsghdr __user *)NULL)
-
-+#define CMSG_COMPAT_OK(ucmlen, ucmsg, mhdr) \
-+ ((ucmlen) >= sizeof(struct cmsghdr) && \
-+ (ucmlen) <= (unsigned long) \
-+ ((mhdr)->msg_controllen - \
-+ ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
-+
- static inline struct compat_cmsghdr __user *cmsg_compat_nxthdr(struct msghdr *msg,
- struct compat_cmsghdr __user *cmsg, int cmsg_len)
- {
-@@ -154,11 +160,7 @@
- return -EFAULT;
-
- /* Catch bogons. */
-- if(CMSG_COMPAT_ALIGN(ucmlen) <
-- CMSG_COMPAT_ALIGN(sizeof(struct compat_cmsghdr)))
-- return -EINVAL;
-- if((unsigned long)(((char __user *)ucmsg - (char __user *)kmsg->msg_control)
-- + ucmlen) > kmsg->msg_controllen)
-+ if (!CMSG_COMPAT_OK(ucmlen, ucmsg, kmsg))
- return -EINVAL;
-
- tmp = ((ucmlen - CMSG_COMPAT_ALIGN(sizeof(*ucmsg))) +
-diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c
---- a/drivers/char/vt.c 2005-02-15 11:46:59 -08:00
-+++ b/drivers/char/vt.c 2005-02-15 11:46:59 -08:00
-@@ -768,6 +768,8 @@
- * [this is to be used together with some user program
- * like resize that changes the hardware videomode]
- */
-+#define VC_RESIZE_MAXCOL (32767)
-+#define VC_RESIZE_MAXROW (32767)
- int vc_resize(int currcons, unsigned int cols, unsigned int lines)
- {
- unsigned long old_origin, new_origin, new_scr_end, rlth, rrem, err = 0;
-@@ -779,6 +781,9 @@
-
- if (!vc_cons_allocated(currcons))
- return -ENXIO;
-+
-+ if (cols > VC_RESIZE_MAXCOL || lines > VC_RESIZE_MAXROW)
-+ return -EINVAL;
-
- new_cols = (cols ? cols : video_num_columns);
- new_rows = (lines ? lines : video_num_lines);
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.81106.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.81106.patch
deleted file mode 100644
index 44abcbca1ac0..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.81106.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-# ChangeSet
-# 2005/01/25 10:10:51+00:00 aia21@cantab.net
-# NTFS: Add printk rate limiting for ntfs_warning() and ntfs_error() when
-# compiled without debug. This avoids a possible denial of service
-# attack. Thanks to Carl-Daniel Hailfinger from SuSE for pointing this
-# out.
-#
-diff -Nru a/fs/ntfs/debug.c b/fs/ntfs/debug.c
---- a/fs/ntfs/debug.c 2005-02-15 12:38:26 -08:00
-+++ b/fs/ntfs/debug.c 2005-02-15 12:38:26 -08:00
-@@ -53,6 +53,10 @@
- va_list args;
- int flen = 0;
-
-+#ifndef DEBUG
-+ if (!printk_ratelimit())
-+ return;
-+#endif
- if (function)
- flen = strlen(function);
- spin_lock(&err_buf_lock);
-@@ -93,6 +97,10 @@
- va_list args;
- int flen = 0;
-
-+#ifndef DEBUG
-+ if (!printk_ratelimit())
-+ return;
-+#endif
- if (function)
- flen = strlen(function);
- spin_lock(&err_buf_lock);
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.82141.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.82141.patch
deleted file mode 100644
index b4a02f7871fb..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.82141.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2005/02/02 17:41:06-08:00 guninski@guninski.com
-# [PATCH] Fix sign checks in copy_from_read_buf()
-#
-# Fix signedness and remove the now unnecessary cast.
-#
-# Acked-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
-# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-#
-# drivers/char/n_tty.c
-# 2005/01/30 07:56:05-08:00 guninski@guninski.com +2 -2
-# Fix sign checks in copy_from_read_buf()
-#
-# ChangeSet
-# 2005/02/02 17:42:38-08:00 guninski@guninski.com
-# [PATCH] Fix signed compare in fs/proc/generic.c::proc_file_read()
-#
-# Acked-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
-# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-#
-# fs/proc/generic.c
-# 2005/01/30 07:58:00-08:00 guninski@guninski.com +1 -1
-# Fix signed compare in fs/proc/generic.c::proc_file_read()
-#
-# ChangeSet
-# 2005/02/02 17:45:11-08:00 guninski@guninski.com
-# [PATCH] reiserfs: use proper 64-bit clean types
-#
-# reiserfs_file_write() casts its (size_t) count parameter to int, which can become
-# a problem on 64-bit architectures
-#
-# This attempts to fix this by changing the variables dealing with count
-# and offset and the "min_t" comparisons to use "size_t" through-out.
-#
-# Acked-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
-# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-#
-# fs/reiserfs/file.c
-# 2005/01/26 07:28:12-08:00 guninski@guninski.com +11 -12
-# reiserfs: use proper 64-bit clean types
-#
-# ChangeSet
-# 2005/02/08 07:59:56-08:00 torvalds@ppc970.osdl.org
-# Fix ATM copy-to-user usage.
-#
-# More of the Guninski "copy_to_user() takes a size_t" series.
-#
-# net/atm/addr.c
-# 2005/02/08 07:59:48-08:00 torvalds@ppc970.osdl.org +1 -1
-# Fix ATM copy-to-user usage.
-#
-# More of the Guninski "copy_to_user() takes a size_t" series.
-#
-# net/atm/addr.h
-# 2005/02/08 07:59:48-08:00 torvalds@ppc970.osdl.org +1 -1
-# Fix ATM copy-to-user usage.
-#
-# More of the Guninski "copy_to_user() takes a size_t" series.
-#
-diff -Nru a/drivers/char/n_tty.c b/drivers/char/n_tty.c
---- a/drivers/char/n_tty.c 2005-02-15 11:56:06 -08:00
-+++ b/drivers/char/n_tty.c 2005-02-15 11:56:06 -08:00
-@@ -1143,13 +1143,13 @@
-
- {
- int retval;
-- ssize_t n;
-+ size_t n;
- unsigned long flags;
-
- retval = 0;
- spin_lock_irqsave(&tty->read_lock, flags);
- n = min(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail);
-- n = min((ssize_t)*nr, n);
-+ n = min(*nr, n);
- spin_unlock_irqrestore(&tty->read_lock, flags);
- if (n) {
- mb();
-diff -Nru a/fs/proc/generic.c b/fs/proc/generic.c
---- a/fs/proc/generic.c 2005-02-15 11:55:35 -08:00
-+++ b/fs/proc/generic.c 2005-02-15 11:55:35 -08:00
-@@ -60,7 +60,7 @@
- return -ENOMEM;
-
- while ((nbytes > 0) && !eof) {
-- count = min_t(ssize_t, PROC_BLOCK_SIZE, nbytes);
-+ count = min_t(size_t, PROC_BLOCK_SIZE, nbytes);
-
- start = NULL;
- if (dp->get_info) {
-diff -Nru a/fs/reiserfs/file.c b/fs/reiserfs/file.c
---- a/fs/reiserfs/file.c 2005-02-15 11:56:07 -08:00
-+++ b/fs/reiserfs/file.c 2005-02-15 11:56:07 -08:00
-@@ -588,7 +588,7 @@
-
- /* Unlock pages prepared by reiserfs_prepare_file_region_for_write */
- void reiserfs_unprepare_pages(struct page **prepared_pages, /* list of locked pages */
-- int num_pages /* amount of pages */) {
-+ size_t num_pages /* amount of pages */) {
- int i; // loop counter
-
- for (i=0; i < num_pages ; i++) {
-@@ -619,7 +619,7 @@
- int offset; // offset in page
-
- for ( i = 0, offset = (pos & (PAGE_CACHE_SIZE-1)); i < num_pages ; i++,offset=0) {
-- int count = min_t(int,PAGE_CACHE_SIZE-offset,write_bytes); // How much of bytes to write to this page
-+ size_t count = min_t(size_t,PAGE_CACHE_SIZE-offset,write_bytes); // How much of bytes to write to this page
- struct page *page=prepared_pages[i]; // Current page we process.
-
- fault_in_pages_readable( buf, count);
-@@ -718,8 +718,8 @@
- struct reiserfs_transaction_handle *th,
- struct inode *inode,
- loff_t pos, /* Writing position offset */
-- int num_pages, /* Number of pages to write */
-- int write_bytes, /* number of bytes to write */
-+ size_t num_pages, /* Number of pages to write */
-+ size_t write_bytes, /* number of bytes to write */
- struct page **prepared_pages /* list of pages */
- )
- {
-@@ -854,9 +854,9 @@
- static int reiserfs_prepare_file_region_for_write(
- struct inode *inode /* Inode of the file */,
- loff_t pos, /* position in the file */
-- int num_pages, /* number of pages to
-+ size_t num_pages, /* number of pages to
- prepare */
-- int write_bytes, /* Amount of bytes to be
-+ size_t write_bytes, /* Amount of bytes to be
- overwritten from
- @pos */
- struct page **prepared_pages /* pointer to array
-@@ -1252,10 +1252,9 @@
- while ( count > 0) {
- /* This is the main loop in which we running until some error occures
- or until we write all of the data. */
-- int num_pages;/* amount of pages we are going to write this iteration */
-- int write_bytes; /* amount of bytes to write during this iteration */
-- int blocks_to_allocate; /* how much blocks we need to allocate for
-- this iteration */
-+ size_t num_pages;/* amount of pages we are going to write this iteration */
-+ size_t write_bytes; /* amount of bytes to write during this iteration */
-+ size_t blocks_to_allocate; /* how much blocks we need to allocate for this iteration */
-
- /* (pos & (PAGE_CACHE_SIZE-1)) is an idiom for offset into a page of pos*/
- num_pages = !!((pos+count) & (PAGE_CACHE_SIZE - 1)) + /* round up partial
-@@ -1269,7 +1268,7 @@
- /* If we were asked to write more data than we want to or if there
- is not that much space, then we shorten amount of data to write
- for this iteration. */
-- num_pages = min_t(int, REISERFS_WRITE_PAGES_AT_A_TIME, reiserfs_can_fit_pages(inode->i_sb));
-+ num_pages = min_t(size_t, REISERFS_WRITE_PAGES_AT_A_TIME, reiserfs_can_fit_pages(inode->i_sb));
- /* Also we should not forget to set size in bytes accordingly */
- write_bytes = (num_pages << PAGE_CACHE_SHIFT) -
- (pos & (PAGE_CACHE_SIZE-1));
-@@ -1295,7 +1294,7 @@
- // But overwriting files on absolutelly full volumes would not
- // be very efficient. Well, people are not supposed to fill
- // 100% of disk space anyway.
-- write_bytes = min_t(int, count, inode->i_sb->s_blocksize - (pos & (inode->i_sb->s_blocksize - 1)));
-+ write_bytes = min_t(size_t, count, inode->i_sb->s_blocksize - (pos & (inode->i_sb->s_blocksize - 1)));
- num_pages = 1;
- // No blocks were claimed before, so do it now.
- reiserfs_claim_blocks_to_be_allocated(inode->i_sb, 1 << (PAGE_CACHE_SHIFT - inode->i_blkbits));
-diff -Nru a/net/atm/addr.c b/net/atm/addr.c
---- a/net/atm/addr.c 2005-02-15 11:56:16 -08:00
-+++ b/net/atm/addr.c 2005-02-15 11:56:16 -08:00
-@@ -114,7 +114,7 @@
- }
-
-
--int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc __user *buf,int size)
-+int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc __user *buf,size_t size)
- {
- unsigned long flags;
- struct atm_dev_addr *walk;
-diff -Nru a/net/atm/addr.h b/net/atm/addr.h
---- a/net/atm/addr.h 2005-02-15 11:56:16 -08:00
-+++ b/net/atm/addr.h 2005-02-15 11:56:16 -08:00
-@@ -13,6 +13,6 @@
- void atm_reset_addr(struct atm_dev *dev);
- int atm_add_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
- int atm_del_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
--int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc __user *buf,int size);
-+int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc __user *buf,size_t size);
-
- #endif
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.AF_UNIX.SELinux.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.AF_UNIX.SELinux.patch
deleted file mode 100644
index dbb8b2329a28..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.AF_UNIX.SELinux.patch
+++ /dev/null
@@ -1,61 +0,0 @@
---- a/net/unix/af_unix.c 2004-10-18 22:54:37.000000000 +0100
-+++ b/net/unix/af_unix.c 2004-12-19 18:33:12.000000000 +0000
-@@ -477,6 +477,8 @@
- struct msghdr *, size_t, int);
- static int unix_dgram_connect(struct socket *, struct sockaddr *,
- int, int);
-+static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *,
-+ struct msghdr *, size_t);
-
- static struct proto_ops unix_stream_ops = {
- .family = PF_UNIX,
-@@ -535,7 +537,7 @@
- .shutdown = unix_shutdown,
- .setsockopt = sock_no_setsockopt,
- .getsockopt = sock_no_getsockopt,
-- .sendmsg = unix_dgram_sendmsg,
-+ .sendmsg = unix_seqpacket_sendmsg,
- .recvmsg = unix_dgram_recvmsg,
- .mmap = sock_no_mmap,
- .sendpage = sock_no_sendpage,
-@@ -1365,9 +1367,11 @@
- if (other->sk_shutdown & RCV_SHUTDOWN)
- goto out_unlock;
-
-- err = security_unix_may_send(sk->sk_socket, other->sk_socket);
-- if (err)
-- goto out_unlock;
-+ if (sk->sk_type != SOCK_SEQPACKET) {
-+ err = security_unix_may_send(sk->sk_socket, other->sk_socket);
-+ if (err)
-+ goto out_unlock;
-+ }
-
- if (unix_peer(other) != sk &&
- (skb_queue_len(&other->sk_receive_queue) >
-@@ -1517,6 +1521,25 @@
- return sent ? : err;
- }
-
-+static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock,
-+ struct msghdr *msg, size_t len)
-+{
-+ int err;
-+ struct sock *sk = sock->sk;
-+
-+ err = sock_error(sk);
-+ if (err)
-+ return err;
-+
-+ if (sk->sk_state != TCP_ESTABLISHED)
-+ return -ENOTCONN;
-+
-+ if (msg->msg_namelen)
-+ msg->msg_namelen = 0;
-+
-+ return unix_dgram_sendmsg(kiocb, sock, msg, len);
-+}
-+
- static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
- {
- struct unix_sock *u = unix_sk(sk);
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.AF_UNIX.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.AF_UNIX.patch
deleted file mode 100644
index a95e94fd9362..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.AF_UNIX.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- linux-2.6.9/net/unix/af_unix.c 2004-11-24 08:23:21 -08:00
-+++ linux-2.6.9.plasmaroo/net/unix/af_unix.c 2004-11-24 08:23:21 -08:00
-@@ -1535,9 +1535,11 @@
-
- msg->msg_namelen = 0;
-
-+ down(&u->readsem);
-+
- skb = skb_recv_datagram(sk, flags, noblock, &err);
- if (!skb)
-- goto out;
-+ goto out_unlock;
-
- wake_up_interruptible(&u->peer_wait);
-
-@@ -1587,6 +1589,8 @@
-
- out_free:
- skb_free_datagram(sk,skb);
-+out_unlock:
-+ up(&u->readsem);
- out:
- return err;
- }
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1016.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1016.patch
deleted file mode 100644
index aa25ac95ed61..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1016.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-===== include/linux/socket.h 1.12 vs edited =====
---- 1.12/include/linux/socket.h 2004-09-09 06:40:01 +10:00
-+++ edited/include/linux/socket.h 2004-11-27 11:53:40 +11:00
-@@ -90,6 +90,10 @@
- (struct cmsghdr *)(ctl) : \
- (struct cmsghdr *)NULL)
- #define CMSG_FIRSTHDR(msg) __CMSG_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
-+#define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && \
-+ (cmsg)->cmsg_len <= (unsigned long) \
-+ ((mhdr)->msg_controllen - \
-+ ((char *)(cmsg) - (char *)(mhdr)->msg_control)))
-
- /*
- * This mess will go away with glibc
-===== net/core/scm.c 1.10 vs edited =====
---- 1.10/net/core/scm.c 2004-05-31 05:08:14 +10:00
-+++ edited/net/core/scm.c 2004-11-27 11:48:55 +11:00
-@@ -127,9 +127,7 @@
- for too short ancillary data object at all! Oops.
- OK, let's add it...
- */
-- if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
-- (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
-- + cmsg->cmsg_len) > msg->msg_controllen)
-+ if (!CMSG_OK(msg, cmsg))
- goto error;
-
- if (cmsg->cmsg_level != SOL_SOCKET)
-===== net/ipv4/ip_sockglue.c 1.26 vs edited =====
---- 1.26/net/ipv4/ip_sockglue.c 2004-07-01 06:10:53 +10:00
-+++ edited/net/ipv4/ip_sockglue.c 2004-11-27 11:49:45 +11:00
-@@ -146,11 +146,8 @@
- struct cmsghdr *cmsg;
-
- for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
-- if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
-- (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
-- + cmsg->cmsg_len) > msg->msg_controllen) {
-+ if (!CMSG_OK(msg, cmsg))
- return -EINVAL;
-- }
- if (cmsg->cmsg_level != SOL_IP)
- continue;
- switch (cmsg->cmsg_type) {
-===== net/ipv6/datagram.c 1.20 vs edited =====
---- 1.20/net/ipv6/datagram.c 2004-11-10 17:57:03 +11:00
-+++ edited/net/ipv6/datagram.c 2004-11-27 11:51:15 +11:00
-@@ -427,9 +427,7 @@
- int addr_type;
- struct net_device *dev = NULL;
-
-- if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
-- (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
-- + cmsg->cmsg_len) > msg->msg_controllen) {
-+ if (!CMSG_OK(msg, cmsg)) {
- err = -EINVAL;
- goto exit_f;
- }
-===== net/sctp/socket.c 1.129 vs edited =====
---- 1.129/net/sctp/socket.c 2004-11-19 08:43:18 +11:00
-+++ edited/net/sctp/socket.c 2004-11-27 11:52:11 +11:00
-@@ -4098,12 +4098,8 @@
- for (cmsg = CMSG_FIRSTHDR(msg);
- cmsg != NULL;
- cmsg = CMSG_NXTHDR((struct msghdr*)msg, cmsg)) {
-- /* Check for minimum length. The SCM code has this check. */
-- if (cmsg->cmsg_len < sizeof(struct cmsghdr) ||
-- (unsigned long)(((char*)cmsg - (char*)msg->msg_control)
-- + cmsg->cmsg_len) > msg->msg_controllen) {
-+ if (!CMSG_OK(msg, cmsg))
- return -EINVAL;
-- }
-
- /* Should we parse this header or ignore? */
- if (cmsg->cmsg_level != IPPROTO_SCTP)
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1056.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1056.patch
deleted file mode 100644
index f55ca8372e38..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1056.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-diff -ur linux-2.6.7/drivers/char/drm/i810_dma.c linux-2.6.7.drm.plasmaroo/drivers/char/drm/i810_dma.c
---- linux-2.6.7/drivers/char/drm/i810_dma.c 2004-06-16 06:19:12.000000000 +0100
-+++ linux-2.6.7.drm.plasmaroo/drivers/char/drm/i810_dma.c 2004-12-19 22:52:54.885438960 +0000
-@@ -1034,10 +1034,7 @@
- drm_file_t *priv = filp->private_data;
- drm_device_t *dev = priv->dev;
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_flush_ioctl called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- i810_flush_queue(dev);
- return 0;
-@@ -1059,10 +1056,7 @@
- if (copy_from_user(&vertex, (drm_i810_vertex_t *)arg, sizeof(vertex)))
- return -EFAULT;
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_dma_vertex called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- DRM_DEBUG("i810 dma vertex, idx %d used %d discard %d\n",
- vertex.idx, vertex.used, vertex.discard);
-@@ -1094,10 +1088,7 @@
- if (copy_from_user(&clear, (drm_i810_clear_t *)arg, sizeof(clear)))
- return -EFAULT;
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_clear_bufs called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- /* GH: Someone's doing nasty things... */
- if (!dev->dev_private) {
-@@ -1118,10 +1109,8 @@
-
- DRM_DEBUG("i810_swap_bufs\n");
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_swap_buf called without lock held\n");
-- return -EINVAL;
-- }
-+
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- i810_dma_dispatch_swap( dev );
- return 0;
-@@ -1156,10 +1145,7 @@
- if (copy_from_user(&d, (drm_i810_dma_t *)arg, sizeof(d)))
- return -EFAULT;
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_dma called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- d.granted = 0;
-
-@@ -1270,10 +1256,7 @@
- return -EFAULT;
-
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_dma_mc called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- if (mc.idx >= dma->buf_count || mc.idx < 0)
- return -EINVAL;
-@@ -1321,10 +1304,7 @@
- drm_device_t *dev = priv->dev;
- drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_fstatus called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
- return I810_READ(0x30008);
- }
-
-@@ -1335,10 +1315,7 @@
- drm_device_t *dev = priv->dev;
- drm_i810_private_t *dev_priv = (drm_i810_private_t *)dev->dev_private;
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_ov0_flip called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- //Tell the overlay to update
- I810_WRITE(0x30000,dev_priv->overlay_physical | 0x80000000);
-@@ -1380,10 +1357,7 @@
-
- DRM_DEBUG("%s\n", __FUNCTION__);
-
-- if (!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i810_flip_buf called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- if (!dev_priv->page_flipping)
- i810_do_init_pageflip( dev );
-diff -ur linux-2.6.7/drivers/char/drm/i830_dma.c linux-2.6.7.drm.plasmaroo/drivers/char/drm/i830_dma.c
---- linux-2.6.7/drivers/char/drm/i830_dma.c 2004-06-16 06:18:57.000000000 +0100
-+++ linux-2.6.7.drm.plasmaroo/drivers/char/drm/i830_dma.c 2004-12-19 22:52:54.887438656 +0000
-@@ -1320,10 +1320,7 @@
- drm_file_t *priv = filp->private_data;
- drm_device_t *dev = priv->dev;
-
-- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i830_flush_ioctl called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- i830_flush_queue(dev);
- return 0;
-@@ -1344,10 +1341,7 @@
- if (copy_from_user(&vertex, (drm_i830_vertex_t __user *)arg, sizeof(vertex)))
- return -EFAULT;
-
-- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i830_dma_vertex called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- DRM_DEBUG("i830 dma vertex, idx %d used %d discard %d\n",
- vertex.idx, vertex.used, vertex.discard);
-@@ -1374,10 +1368,7 @@
- if (copy_from_user(&clear, (drm_i830_clear_t __user *)arg, sizeof(clear)))
- return -EFAULT;
-
-- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i830_clear_bufs called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- /* GH: Someone's doing nasty things... */
- if (!dev->dev_private) {
-@@ -1399,10 +1390,7 @@
-
- DRM_DEBUG("i830_swap_bufs\n");
-
-- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i830_swap_buf called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- i830_dma_dispatch_swap( dev );
- return 0;
-@@ -1443,10 +1431,7 @@
-
- DRM_DEBUG("%s\n", __FUNCTION__);
-
-- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i830_flip_buf called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- if (!dev_priv->page_flipping)
- i830_do_init_pageflip( dev );
-@@ -1485,10 +1470,7 @@
- if (copy_from_user(&d, (drm_i830_dma_t __user *)arg, sizeof(d)))
- return -EFAULT;
-
-- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i830_dma called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- d.granted = 0;
-
-diff -ur linux-2.6.7/drivers/char/drm/i830_irq.c linux-2.6.7.drm.plasmaroo/drivers/char/drm/i830_irq.c
---- linux-2.6.7/drivers/char/drm/i830_irq.c 2004-06-16 06:19:44.000000000 +0100
-+++ linux-2.6.7.drm.plasmaroo/drivers/char/drm/i830_irq.c 2004-12-19 22:52:54.887438656 +0000
-@@ -129,10 +129,7 @@
- drm_i830_irq_emit_t emit;
- int result;
-
-- if(!_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)) {
-- DRM_ERROR("i830_irq_emit called without lock held\n");
-- return -EINVAL;
-- }
-+ LOCK_TEST_WITH_RETURN( dev, filp );
-
- if ( !dev_priv ) {
- DRM_ERROR( "%s called with no initialization\n", __FUNCTION__ );
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1137.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1137.patch
deleted file mode 100644
index 0a54680f6f4b..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1137.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-# ChangeSet
-# 2004/12/14 11:06:25-08:00 chrisw@osdl.org
-# [IPV4/IPV6]: IGMP source filter fixes
-#
-# When adding or deleting from the source list make sure to find matches
-# by comparing against the new source address, not the group address.
-# Also, check each addr in the list rather than just the first one.
-# And, finally, only delete from list when there's a match rather than
-# vice-versa. Drop the effort to keep list sorted, since it's not done
-# on full-state api and can create an sl_addr entry that the delta api
-# won't be able to delete. Without these fixes sl_count can be corrupted
-# which can allow for kernel memory corruption.
-#
-# Signed-off-by: Chris Wright <chrisw@osdl.org>
-# Signed-off-by: David S. Miller <davem@davemloft.net>
-#
-diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c
---- a/net/ipv4/igmp.c 2004-12-20 11:32:15 -08:00
-+++ b/net/ipv4/igmp.c 2004-12-20 11:32:15 -08:00
-@@ -1778,12 +1778,12 @@
- goto done;
- rv = !0;
- for (i=0; i<psl->sl_count; i++) {
-- rv = memcmp(&psl->sl_addr, &mreqs->imr_multiaddr,
-+ rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
- sizeof(__u32));
-- if (rv >= 0)
-+ if (rv == 0)
- break;
- }
-- if (!rv) /* source not found */
-+ if (rv) /* source not found */
- goto done;
-
- /* update the interface filter */
-@@ -1825,9 +1825,9 @@
- }
- rv = 1; /* > 0 for insert logic below if sl_count is 0 */
- for (i=0; i<psl->sl_count; i++) {
-- rv = memcmp(&psl->sl_addr, &mreqs->imr_multiaddr,
-+ rv = memcmp(&psl->sl_addr[i], &mreqs->imr_sourceaddr,
- sizeof(__u32));
-- if (rv >= 0)
-+ if (rv == 0)
- break;
- }
- if (rv == 0) /* address already there is an error */
-diff -Nru a/net/ipv6/mcast.c b/net/ipv6/mcast.c
---- a/net/ipv6/mcast.c 2004-12-20 11:32:15 -08:00
-+++ b/net/ipv6/mcast.c 2004-12-20 11:32:15 -08:00
-@@ -391,12 +391,12 @@
- goto done;
- rv = !0;
- for (i=0; i<psl->sl_count; i++) {
-- rv = memcmp(&psl->sl_addr, group,
-+ rv = memcmp(&psl->sl_addr[i], source,
- sizeof(struct in6_addr));
-- if (rv >= 0)
-+ if (rv == 0)
- break;
- }
-- if (!rv) /* source not found */
-+ if (rv) /* source not found */
- goto done;
-
- /* update the interface filter */
-@@ -437,8 +437,8 @@
- }
- rv = 1; /* > 0 for insert logic below if sl_count is 0 */
- for (i=0; i<psl->sl_count; i++) {
-- rv = memcmp(&psl->sl_addr, group, sizeof(struct in6_addr));
-- if (rv >= 0)
-+ rv = memcmp(&psl->sl_addr[i], source, sizeof(struct in6_addr));
-+ if (rv == 0)
- break;
- }
- if (rv == 0) /* address already there is an error */
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1151.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1151.patch
deleted file mode 100644
index fc4289e4f444..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.CAN-2004-1151.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- 1.74/arch/x86_64/ia32/sys_ia32.c 2004-12-19 10:58:02 -08:00
-+++ 1.75/arch/x86_64/ia32/sys_ia32.c 2004-12-19 10:58:02 -08:00
-@@ -525,11 +525,12 @@
- int sys32_ni_syscall(int call)
- {
- struct task_struct *me = current;
-- static char lastcomm[8];
-- if (strcmp(lastcomm, me->comm)) {
-- printk(KERN_INFO "IA32 syscall %d from %s not implemented\n", call,
-- current->comm);
-- strcpy(lastcomm, me->comm);
-+ static char lastcomm[sizeof(me->comm)];
-+
-+ if (strncmp(lastcomm, me->comm, sizeof(lastcomm))) {
-+ printk(KERN_INFO "IA32 syscall %d from %s not implemented\n",
-+ call, me->comm);
-+ strncpy(lastcomm, me->comm, sizeof(lastcomm));
- }
- return -ENOSYS;
- }
-@@ -1125,11 +1126,11 @@
- long sys32_vm86_warning(void)
- {
- struct task_struct *me = current;
-- static char lastcomm[8];
-- if (strcmp(lastcomm, me->comm)) {
-+ static char lastcomm[sizeof(me->comm)];
-+ if (strncmp(lastcomm, me->comm, sizeof(lastcomm))) {
- printk(KERN_INFO "%s: vm86 mode not supported on 64 bit kernel\n",
- me->comm);
-- strcpy(lastcomm, me->comm);
-+ strncpy(lastcomm, me->comm, sizeof(lastcomm));
- }
- return -ENOSYS;
- }
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.binfmt_a.out.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.binfmt_a.out.patch
deleted file mode 100644
index 89665ce8db42..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.binfmt_a.out.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -Nru linux-2.6.9/fs/exec.c linux-2.6.9.plasmaroo/fs/exec.c
---- linux-2.6.9/fs/exec.c 2004-11-27 08:30:03 -08:00
-+++ linux-2.6.9.plasmaroo/fs/exec.c 2004-11-27 08:30:03 -08:00
-@@ -413,6 +413,7 @@
-
- down_write(&mm->mmap_sem);
- {
-+ struct vm_area_struct *vma;
- mpnt->vm_mm = mm;
- #ifdef CONFIG_STACK_GROWSUP
- mpnt->vm_start = stack_base;
-@@ -433,6 +434,12 @@
- mpnt->vm_flags = VM_STACK_FLAGS;
- mpnt->vm_flags |= mm->def_flags;
- mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7];
-+ vma = find_vma(mm, mpnt->vm_start);
-+ if (vma) {
-+ up_write(&mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, mpnt);
-+ return -ENOMEM;
-+ }
- insert_vm_struct(mm, mpnt);
- mm->stack_vm = mm->total_vm = vma_pages(mpnt);
- }
-diff -Nru linux-2.6.9/fs/binfmt_aout.c linux-2.6.9.plasmaroo/fs/binfmt_aout.c
---- linux-2.6.9/fs/binfmt_aout.c 2004-11-27 08:31:43 -08:00
-+++ linux-2.6.9.plasmaroo/fs/binfmt_aout.c 2004-11-27 08:31:43 -08:00
-@@ -43,13 +43,18 @@
- .min_coredump = PAGE_SIZE
- };
-
--static void set_brk(unsigned long start, unsigned long end)
-+#define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
-+
-+static int set_brk(unsigned long start, unsigned long end)
- {
- start = PAGE_ALIGN(start);
- end = PAGE_ALIGN(end);
-- if (end <= start)
-- return;
-- do_brk(start, end - start);
-+ if (end > start) {
-+ unsigned long addr = do_brk(start, end - start);
-+ if (BAD_ADDR(addr))
-+ return addr;
-+ }
-+ return 0;
- }
-
- /*
-@@ -413,7 +418,11 @@
- beyond_if:
- set_binfmt(&aout_format);
-
-- set_brk(current->mm->start_brk, current->mm->brk);
-+ retval = set_brk(current->mm->start_brk, current->mm->brk);
-+ if (retval < 0) {
-+ send_sig(SIGKILL, current, 0);
-+ return retval;
-+ }
-
- retval = setup_arg_pages(bprm, EXSTACK_DEFAULT);
- if (retval < 0) {
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.binfmt_elf.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.binfmt_elf.patch
deleted file mode 100644
index 87d05e7b5fa4..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.binfmt_elf.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff -ur linux-2.6.8.1/fs/binfmt_elf.c linux-2.6.8.1.plasmaroo/fs/binfmt_elf.c
---- linux-2.6.8.1/fs/binfmt_elf.c 2004-08-14 11:55:23.000000000 +0100
-+++ linux-2.6.8.1.plasmaroo/fs/binfmt_elf.c 2004-11-19 23:07:08.375429000 +0000
-@@ -334,9 +334,12 @@
- goto out;
-
- retval = kernel_read(interpreter,interp_elf_ex->e_phoff,(char *)elf_phdata,size);
-- error = retval;
-- if (retval < 0)
-+ error = -EIO;
-+ if (retval != size) {
-+ if (retval < 0)
-+ error = retval;
- goto out_close;
-+ }
-
- eppnt = elf_phdata;
- for (i=0; i<interp_elf_ex->e_phnum; i++, eppnt++) {
-@@ -523,8 +526,11 @@
- goto out;
-
- retval = kernel_read(bprm->file, elf_ex.e_phoff, (char *) elf_phdata, size);
-- if (retval < 0)
-+ if (retval != size) {
-+ if (retval >= 0)
-+ retval = -EIO;
- goto out_free_ph;
-+ }
-
- files = current->files; /* Refcounted so ok */
- retval = unshare_files();
-@@ -561,7 +567,8 @@
- */
-
- retval = -ENOMEM;
-- if (elf_ppnt->p_filesz > PATH_MAX)
-+ if (elf_ppnt->p_filesz > PATH_MAX ||
-+ elf_ppnt->p_filesz == 0)
- goto out_free_file;
- elf_interpreter = (char *) kmalloc(elf_ppnt->p_filesz,
- GFP_KERNEL);
-@@ -571,8 +578,16 @@
- retval = kernel_read(bprm->file, elf_ppnt->p_offset,
- elf_interpreter,
- elf_ppnt->p_filesz);
-- if (retval < 0)
-+ if (retval != elf_ppnt->p_filesz) {
-+ if (retval >= 0)
-+ retval = -EIO;
- goto out_free_interp;
-+ }
-+ /* make sure path is NULL terminated */
-+ retval = -EINVAL;
-+ if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0')
-+ goto out_free_interp;
-+
- /* If the program interpreter is one of these two,
- * then assume an iBCS2 image. Otherwise assume
- * a native linux image.
-@@ -607,8 +622,11 @@
- if (IS_ERR(interpreter))
- goto out_free_interp;
- retval = kernel_read(interpreter, 0, bprm->buf, BINPRM_BUF_SIZE);
-- if (retval < 0)
-+ if (retval != BINPRM_BUF_SIZE) {
-+ if (retval >= 0)
-+ retval = -EIO;
- goto out_free_dentry;
-+ }
-
- /* Get the exec headers */
- interp_ex = *((struct exec *) bprm->buf);
-@@ -765,8 +783,10 @@
- }
-
- error = elf_map(bprm->file, load_bias + vaddr, elf_ppnt, elf_prot, elf_flags);
-- if (BAD_ADDR(error))
-- continue;
-+ if (BAD_ADDR(error)) {
-+ send_sig(SIGKILL, current, 0);
-+ goto out_free_dentry;
-+ }
-
- if (!load_addr_set) {
- load_addr_set = 1;
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.brk-locked.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.brk-locked.patch
deleted file mode 100644
index 6095e844d5f1..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.brk-locked.patch
+++ /dev/null
@@ -1,303 +0,0 @@
-diff -ur linux-2.6.10/arch/mips/kernel/irixelf.c linux-2.6.10.plasmaroo/arch/mips/kernel/irixelf.c
---- linux-2.6.10/arch/mips/kernel/irixelf.c 2004-12-24 21:35:50.000000000 +0000
-+++ linux-2.6.10.plasmaroo/arch/mips/kernel/irixelf.c 2005-01-07 15:36:00.383356800 +0000
-@@ -127,7 +127,7 @@
- end = PAGE_ALIGN(end);
- if (end <= start)
- return;
-- do_brk(start, end - start);
-+ do_brk_locked(start, end - start);
- }
-
-
-@@ -375,7 +375,7 @@
-
- /* Map the last of the bss segment */
- if (last_bss > len) {
-- do_brk(len, (last_bss - len));
-+ do_brk_locked(len, (last_bss - len));
- }
- kfree(elf_phdata);
-
-@@ -562,7 +562,7 @@
- unsigned long v;
- struct prda *pp;
-
-- v = do_brk (PRDA_ADDRESS, PAGE_SIZE);
-+ v = do_brk_locked (PRDA_ADDRESS, PAGE_SIZE);
-
- if (v < 0)
- return;
-@@ -853,7 +853,7 @@
- len = (elf_phdata->p_filesz + elf_phdata->p_vaddr+ 0xfff) & 0xfffff000;
- bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
- if (bss > len)
-- do_brk(len, bss-len);
-+ do_brk_locked(len, bss-len);
- kfree(elf_phdata);
- return 0;
- }
-diff -ur linux-2.6.10/arch/sparc64/kernel/binfmt_aout32.c linux-2.6.10.plasmaroo/arch/sparc64/kernel/binfmt_aout32.c
---- linux-2.6.10/arch/sparc64/kernel/binfmt_aout32.c 2004-12-24 21:34:45.000000000 +0000
-+++ linux-2.6.10.plasmaroo/arch/sparc64/kernel/binfmt_aout32.c 2005-01-07 15:36:00.432349352 +0000
-@@ -49,7 +49,7 @@
- end = PAGE_ALIGN(end);
- if (end <= start)
- return;
-- do_brk(start, end - start);
-+ do_brk_locked(start, end - start);
- }
-
- /*
-@@ -246,10 +246,10 @@
- if (N_MAGIC(ex) == NMAGIC) {
- loff_t pos = fd_offset;
- /* Fuck me plenty... */
-- error = do_brk(N_TXTADDR(ex), ex.a_text);
-+ error = do_brk_locked(N_TXTADDR(ex), ex.a_text);
- bprm->file->f_op->read(bprm->file, (char __user *)N_TXTADDR(ex),
- ex.a_text, &pos);
-- error = do_brk(N_DATADDR(ex), ex.a_data);
-+ error = do_brk_locked(N_DATADDR(ex), ex.a_data);
- bprm->file->f_op->read(bprm->file, (char __user *)N_DATADDR(ex),
- ex.a_data, &pos);
- goto beyond_if;
-@@ -257,7 +257,7 @@
-
- if (N_MAGIC(ex) == OMAGIC) {
- loff_t pos = fd_offset;
-- do_brk(N_TXTADDR(ex) & PAGE_MASK,
-+ do_brk_locked(N_TXTADDR(ex) & PAGE_MASK,
- ex.a_text+ex.a_data + PAGE_SIZE - 1);
- bprm->file->f_op->read(bprm->file, (char __user *)N_TXTADDR(ex),
- ex.a_text+ex.a_data, &pos);
-@@ -272,7 +272,7 @@
-
- if (!bprm->file->f_op->mmap) {
- loff_t pos = fd_offset;
-- do_brk(0, ex.a_text+ex.a_data);
-+ do_brk_locked(0, ex.a_text+ex.a_data);
- bprm->file->f_op->read(bprm->file,
- (char __user *)N_TXTADDR(ex),
- ex.a_text+ex.a_data, &pos);
-@@ -389,7 +389,7 @@
- len = PAGE_ALIGN(ex.a_text + ex.a_data);
- bss = ex.a_text + ex.a_data + ex.a_bss;
- if (bss > len) {
-- error = do_brk(start_addr + len, bss - len);
-+ error = do_brk_locked(start_addr + len, bss - len);
- retval = error;
- if (error != start_addr + len)
- goto out;
-diff -Nur linux-2.6.10/arch/x86_64/ia32/ia32_aout.c linux-2.6.10.plasmaroo/arch/x86_64/ia32/ia32_aout.c
---- linux-2.6.10/arch/x86_64/ia32/ia32_aout.c 2005-01-03 16:17:04.000000000 -0200
-+++ linux-2.6.10.plasmaroo/arch/x86_64/ia32/ia32_aout.c 2005-01-03 16:46:53.846823360 -0200
-@@ -115,7 +115,7 @@
- end = PAGE_ALIGN(end);
- if (end <= start)
- return;
-- do_brk(start, end - start);
-+ do_brk_locked(start, end - start);
- }
-
- #if CORE_DUMP
-@@ -325,7 +325,7 @@
- pos = 32;
- map_size = ex.a_text+ex.a_data;
-
-- error = do_brk(text_addr & PAGE_MASK, map_size);
-+ error = do_brk_locked(text_addr & PAGE_MASK, map_size);
- if (error != (text_addr & PAGE_MASK)) {
- send_sig(SIGKILL, current, 0);
- return error;
-@@ -361,7 +361,7 @@
-
- if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
- loff_t pos = fd_offset;
-- do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
-+ do_brk_locked(N_TXTADDR(ex), ex.a_text+ex.a_data);
- bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
- ex.a_text+ex.a_data, &pos);
- flush_icache_range((unsigned long) N_TXTADDR(ex),
-@@ -470,7 +470,7 @@
- }
- #endif
-
-- do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
-+ do_brk_locked(start_addr, ex.a_text + ex.a_data + ex.a_bss);
-
- file->f_op->read(file, (char *)start_addr,
- ex.a_text + ex.a_data, &pos);
-@@ -494,7 +494,7 @@
- len = PAGE_ALIGN(ex.a_text + ex.a_data);
- bss = ex.a_text + ex.a_data + ex.a_bss;
- if (bss > len) {
-- error = do_brk(start_addr + len, bss - len);
-+ error = do_brk_locked(start_addr + len, bss - len);
- retval = error;
- if (error != start_addr + len)
- goto out;
-diff -ur linux-2.6.10/fs/binfmt_aout.c linux-2.6.10.plasmaroo/fs/binfmt_aout.c
---- linux-2.6.10/fs/binfmt_aout.c 2004-12-24 21:35:50.000000000 +0000
-+++ linux-2.6.10.plasmaroo/fs/binfmt_aout.c 2005-01-07 15:36:00.000000000 +0000
-@@ -50,7 +50,7 @@
- start = PAGE_ALIGN(start);
- end = PAGE_ALIGN(end);
- if (end > start) {
-- unsigned long addr = do_brk(start, end - start);
-+ unsigned long addr = do_brk_locked(start, end - start);
- if (BAD_ADDR(addr))
- return addr;
- }
-@@ -323,10 +323,10 @@
- loff_t pos = fd_offset;
- /* Fuck me plenty... */
- /* <AOL></AOL> */
-- error = do_brk(N_TXTADDR(ex), ex.a_text);
-+ error = do_brk_locked(N_TXTADDR(ex), ex.a_text);
- bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
- ex.a_text, &pos);
-- error = do_brk(N_DATADDR(ex), ex.a_data);
-+ error = do_brk_locked(N_DATADDR(ex), ex.a_data);
- bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex),
- ex.a_data, &pos);
- goto beyond_if;
-@@ -347,7 +347,7 @@
- map_size = ex.a_text+ex.a_data;
- #endif
-
-- error = do_brk(text_addr & PAGE_MASK, map_size);
-+ error = do_brk_locked(text_addr & PAGE_MASK, map_size);
- if (error != (text_addr & PAGE_MASK)) {
- send_sig(SIGKILL, current, 0);
- return error;
-@@ -382,7 +382,7 @@
-
- if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
- loff_t pos = fd_offset;
-- do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
-+ do_brk_locked(N_TXTADDR(ex), ex.a_text+ex.a_data);
- bprm->file->f_op->read(bprm->file,
- (char __user *)N_TXTADDR(ex),
- ex.a_text+ex.a_data, &pos);
-@@ -488,7 +488,7 @@
- error_time = jiffies;
- }
-
-- do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
-+ do_brk_locked(start_addr, ex.a_text + ex.a_data + ex.a_bss);
-
- file->f_op->read(file, (char __user *)start_addr,
- ex.a_text + ex.a_data, &pos);
-@@ -512,7 +512,7 @@
- len = PAGE_ALIGN(ex.a_text + ex.a_data);
- bss = ex.a_text + ex.a_data + ex.a_bss;
- if (bss > len) {
-- error = do_brk(start_addr + len, bss - len);
-+ error = do_brk_locked(start_addr + len, bss - len);
- retval = error;
- if (error != start_addr + len)
- goto out;
-diff -ur linux-2.6.10/fs/binfmt_elf.c linux-2.6.10.plasmaroo/fs/binfmt_elf.c
---- linux-2.6.10/fs/binfmt_elf.c 2004-12-24 21:34:33.000000000 +0000
-+++ linux-2.6.10.plasmaroo/fs/binfmt_elf.c 2005-01-07 15:36:00.000000000 +0000
-@@ -88,7 +88,7 @@
- start = ELF_PAGEALIGN(start);
- end = ELF_PAGEALIGN(end);
- if (end > start) {
-- unsigned long addr = do_brk(start, end - start);
-+ unsigned long addr = do_brk_locked(start, end - start);
- if (BAD_ADDR(addr))
- return addr;
- }
-@@ -408,7 +408,7 @@
-
- /* Map the last of the bss segment */
- if (last_bss > elf_bss) {
-- error = do_brk(elf_bss, last_bss - elf_bss);
-+ error = do_brk_locked(elf_bss, last_bss - elf_bss);
- if (BAD_ADDR(error))
- goto out_close;
- }
-@@ -448,7 +448,7 @@
- goto out;
- }
-
-- do_brk(0, text_data);
-+ do_brk_locked(0, text_data);
- if (!interpreter->f_op || !interpreter->f_op->read)
- goto out;
- if (interpreter->f_op->read(interpreter, addr, text_data, &offset) < 0)
-@@ -456,7 +456,7 @@
- flush_icache_range((unsigned long)addr,
- (unsigned long)addr + text_data);
-
-- do_brk(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
-+ do_brk_locked(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
- interp_ex->a_bss);
- elf_entry = interp_ex->a_entry;
-
-@@ -1025,7 +1025,7 @@
- len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + ELF_MIN_ALIGN - 1);
- bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
- if (bss > len)
-- do_brk(len, bss - len);
-+ do_brk_locked(len, bss - len);
- error = 0;
-
- out_free_ph:
-diff -ur linux-2.6.10/include/linux/mm.h linux-2.6.10.plasmaroo/include/linux/mm.h
---- linux-2.6.10/include/linux/mm.h 2004-12-24 21:33:50.000000000 +0000
-+++ linux-2.6.10.plasmaroo/include/linux/mm.h 2005-01-07 15:36:00.000000000 +0000
-@@ -704,6 +704,7 @@
- extern int do_munmap(struct mm_struct *, unsigned long, size_t);
-
- extern unsigned long do_brk(unsigned long, unsigned long);
-+extern unsigned long do_brk_locked(unsigned long, unsigned long);
-
- /* filemap.c */
- extern unsigned long page_unuse(struct page *);
-diff -ur linux-2.6.10/mm/mmap.c linux-2.6.10.plasmaroo/mm/mmap.c
---- linux-2.6.10/mm/mmap.c 2004-12-24 21:35:00.000000000 +0000
-+++ linux-2.6.10.plasmaroo/mm/mmap.c 2005-01-07 15:36:04.000000000 +0000
-@@ -1826,6 +1826,20 @@
-
- EXPORT_SYMBOL(do_brk);
-
-+/* locking version of do_brk. */
-+unsigned long do_brk_locked(unsigned long addr, unsigned long len)
-+{
-+ unsigned long ret;
-+
-+ down_write(&current->mm->mmap_sem);
-+ ret = do_brk(addr, len);
-+ up_write(&current->mm->mmap_sem);
-+
-+ return ret;
-+}
-+
-+EXPORT_SYMBOL(do_brk_locked);
-+
- /* Release all mmaps. */
- void exit_mmap(struct mm_struct *mm)
- {
-@@ -1952,3 +1966,4 @@
- }
- return new_vma;
- }
-+
-diff -ur linux-2.6.10/mm/nommu.c linux-2.6.10.plasmaroo/mm/nommu.c
---- linux-2.6.10/mm/nommu.c 2004-12-24 21:35:25.000000000 +0000
-+++ linux-2.6.10.plasmaroo/mm/nommu.c 2005-01-07 15:30:24.000000000 +0000
-@@ -557,6 +557,11 @@
- return -ENOMEM;
- }
-
-+unsigned long do_brk_locked(unsigned long addr, unsigned long len)
-+{
-+ return -ENOMEM;
-+}
-+
- struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr)
- {
- return NULL;
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.cmdlineLeak.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.cmdlineLeak.patch
deleted file mode 100644
index 763f0cf64449..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.cmdlineLeak.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- linux-2.6.7/fs/proc/base.c~ 2004-08-05 10:35:04.411443536 +0200
-+++ linux-2.6.7/fs/proc/base.c 2004-08-05 10:35:04.412443384 +0200
-@@ -330,6 +330,9 @@
- if (!mm)
- goto out;
-
-+ if (!mm->arg_end)
-+ goto out;
-+
- len = mm->arg_end - mm->arg_start;
-
- if (len > PAGE_SIZE)
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.devPtmx.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.devPtmx.patch
deleted file mode 100644
index 2312a2bf5e3b..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.devPtmx.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Index: linux-2.6.5/fs/devpts/inode.c
-===================================================================
---- linux-2.6.5.orig/fs/devpts/inode.c
-+++ linux-2.6.5/fs/devpts/inode.c
-@@ -178,9 +178,13 @@ struct tty_struct *devpts_get_tty(int nu
- {
- struct dentry *dentry = get_node(number);
- struct tty_struct *tty;
--
-- tty = (IS_ERR(dentry) || !dentry->d_inode) ? NULL :
-- dentry->d_inode->u.generic_ip;
-+
-+ tty = NULL;
-+ if (!IS_ERR(dentry)) {
-+ if (dentry->d_inode)
-+ tty = dentry->d_inode->u.generic_ip;
-+ dput(dentry);
-+ }
-
- up(&devpts_root->d_inode->i_sem);
-
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.smbfs.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.smbfs.patch
deleted file mode 100644
index 99401cf93a0e..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.smbfs.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-diff -urN linux-2.6.8.1/fs/smbfs/proc.c linux-2.6.8.1.plasmaroo/fs/smbfs/proc.c
---- linux-2.6.8.1/fs/smbfs/proc.c 2004-08-24 17:15:57.000000000 +1000
-+++ linux-2.6.8.1.plasmaroo/fs/smbfs/proc.c 2004-11-06 11:27:20.000000000 +1100
-@@ -1427,9 +1427,9 @@
- * So we must first calculate the amount of padding used by the server.
- */
- data_off -= hdrlen;
-- if (data_off > SMB_READX_MAX_PAD) {
-- PARANOIA("offset is larger than max pad!\n");
-- PARANOIA("%d > %d\n", data_off, SMB_READX_MAX_PAD);
-+ if (data_off > SMB_READX_MAX_PAD || data_off < 0) {
-+ PARANOIA("offset is larger than SMB_READX_MAX_PAD or negative!\n");
-+ PARANOIA("%d > %d || %d < 0\n", data_off, SMB_READX_MAX_PAD, data_off);
- req->rq_rlen = req->rq_bufsize + 1;
- return;
- }
-diff -urN linux-2.6.8.1/fs/smbfs/request.c linux-2.6.8.1.plasmaroo/fs/smbfs/request.c
---- linux-2.6.8.1/fs/smbfs/request.c 2004-11-06 11:27:51.000000000 +1100
-+++ linux-2.6.8.1.plasmaroo/fs/smbfs/request.c 2004-11-06 11:27:20.000000000 +1100
-@@ -588,6 +588,10 @@
- data_count = WVAL(inbuf, smb_drcnt);
-
- /* Modify offset for the split header/buffer we use */
-+ if (data_offset < hdrlen)
-+ goto out_bad_data;
-+ if (parm_offset < hdrlen)
-+ goto out_bad_parm;
- data_offset -= hdrlen;
- parm_offset -= hdrlen;
-
-@@ -607,6 +611,10 @@
- req->rq_lparm = parm_count;
- req->rq_data = req->rq_buffer + data_offset;
- req->rq_parm = req->rq_buffer + parm_offset;
-+ if (parm_offset + parm_count > req->rq_rlen)
-+ goto out_bad_parm;
-+ if (data_offset + data_count > req->rq_rlen)
-+ goto out_bad_data;
- return 0;
- }
-
-@@ -634,6 +642,7 @@
- req->rq_trans2buffer = smb_kmalloc(buf_len, GFP_NOFS);
- if (!req->rq_trans2buffer)
- goto out_no_mem;
-+ memset(req->rq_trans2buffer, 0, buf_len);
-
- req->rq_parm = req->rq_trans2buffer;
- req->rq_data = req->rq_trans2buffer + parm_tot;
-@@ -643,8 +652,12 @@
-
- if (parm_disp + parm_count > req->rq_total_parm)
- goto out_bad_parm;
-+ if (parm_offset + parm_count > req->rq_rlen)
-+ goto out_bad_parm;
- if (data_disp + data_count > req->rq_total_data)
- goto out_bad_data;
-+ if (data_offset + data_count > req->rq_rlen)
-+ goto out_bad_data;
-
- inbuf = req->rq_buffer;
- memcpy(req->rq_parm + parm_disp, inbuf + parm_offset, parm_count);
-@@ -657,8 +670,11 @@
- * Check whether we've received all of the data. Note that
- * we use the packet totals -- total lengths might shrink!
- */
-- if (req->rq_ldata >= data_tot && req->rq_lparm >= parm_tot)
-+ if (req->rq_ldata >= data_tot && req->rq_lparm >= parm_tot) {
-+ req->rq_ldata = data_tot;
-+ req->rq_lparm = parm_tot;
- return 0;
-+ }
- return 1;
-
- out_too_long:
-@@ -676,13 +692,13 @@
- req->rq_errno = -EIO;
- goto out;
- out_bad_parm:
-- printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d\n",
-- parm_disp, parm_count, parm_tot);
-+ printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d, ofs=%d\n",
-+ parm_disp, parm_count, parm_tot, parm_offset);
- req->rq_errno = -EIO;
- goto out;
- out_bad_data:
-- printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d\n",
-- data_disp, data_count, data_tot);
-+ printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d, ofs=%d\n",
-+ data_disp, data_count, data_tot, data_offset);
- req->rq_errno = -EIO;
- out:
- return req->rq_errno;
diff --git a/sys-kernel/usermode-sources/files/usermode-sources-2.6.vma.patch b/sys-kernel/usermode-sources/files/usermode-sources-2.6.vma.patch
deleted file mode 100644
index 53ca070ca333..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources-2.6.vma.patch
+++ /dev/null
@@ -1,205 +0,0 @@
-diff -urNp -X /usr/src/dontdiff linux-2.6.8-gentoo-r11/arch/ia64/ia32/binfmt_elf32.c linux-dsd/arch/ia64/ia32/binfmt_elf32.c
---- linux-2.6.8-gentoo-r11/arch/ia64/ia32/binfmt_elf32.c 2004-08-14 06:37:42.000000000 +0100
-+++ linux-dsd/arch/ia64/ia32/binfmt_elf32.c 2004-12-03 01:22:18.416099008 +0000
-@@ -84,7 +84,11 @@ ia64_elf32_init (struct pt_regs *regs)
- vma->vm_ops = &ia32_shared_page_vm_ops;
- down_write(&current->mm->mmap_sem);
- {
-- insert_vm_struct(current->mm, vma);
-+ if (insert_vm_struct(current->mm, vma)) {
-+ kmem_cache_free(vm_area_cachep, vma);
-+ up_write(&current->mm->mmap_sem);
-+ return;
-+ }
- }
- up_write(&current->mm->mmap_sem);
- }
-@@ -103,7 +107,11 @@ ia64_elf32_init (struct pt_regs *regs)
- vma->vm_flags = VM_READ|VM_WRITE|VM_MAYREAD|VM_MAYWRITE;
- down_write(&current->mm->mmap_sem);
- {
-- insert_vm_struct(current->mm, vma);
-+ if (insert_vm_struct(current->mm, vma)) {
-+ kmem_cache_free(vm_area_cachep, vma);
-+ up_write(&current->mm->mmap_sem);
-+ return;
-+ }
- }
- up_write(&current->mm->mmap_sem);
- }
-@@ -151,7 +159,7 @@ ia32_setup_arg_pages (struct linux_binpr
- unsigned long stack_base;
- struct vm_area_struct *mpnt;
- struct mm_struct *mm = current->mm;
-- int i;
-+ int i, ret;
-
- stack_base = IA32_STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE;
- mm->arg_start = bprm->p + stack_base;
-@@ -186,7 +194,11 @@ ia32_setup_arg_pages (struct linux_binpr
- mpnt->vm_flags = VM_STACK_FLAGS;
- mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC)?
- PAGE_COPY_EXEC: PAGE_COPY;
-- insert_vm_struct(current->mm, mpnt);
-+ if ((ret = insert_vm_struct(current->mm, mpnt))) {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, mpnt);
-+ return ret;
-+ }
- current->mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
- }
-
-diff -urNp -X /usr/src/dontdiff linux-2.6.8-gentoo-r11/arch/ia64/mm/init.c linux-dsd/arch/ia64/mm/init.c
---- linux-2.6.8-gentoo-r11/arch/ia64/mm/init.c 2004-08-14 06:36:56.000000000 +0100
-+++ linux-dsd/arch/ia64/mm/init.c 2004-12-03 01:20:32.714168144 +0000
-@@ -131,7 +131,13 @@ ia64_init_addr_space (void)
- vma->vm_end = vma->vm_start + PAGE_SIZE;
- vma->vm_page_prot = protection_map[VM_DATA_DEFAULT_FLAGS & 0x7];
- vma->vm_flags = VM_DATA_DEFAULT_FLAGS | VM_GROWSUP;
-- insert_vm_struct(current->mm, vma);
-+ down_write(&current->mm->mmap_sem);
-+ if (insert_vm_struct(current->mm, vma)) {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return;
-+ }
-+ up_write(&current->mm->mmap_sem);
- }
-
- /* map NaT-page at address zero to speed up speculative dereferencing of NULL: */
-@@ -143,7 +149,13 @@ ia64_init_addr_space (void)
- vma->vm_end = PAGE_SIZE;
- vma->vm_page_prot = __pgprot(pgprot_val(PAGE_READONLY) | _PAGE_MA_NAT);
- vma->vm_flags = VM_READ | VM_MAYREAD | VM_IO | VM_RESERVED;
-- insert_vm_struct(current->mm, vma);
-+ down_write(&current->mm->mmap_sem);
-+ if (insert_vm_struct(current->mm, vma)) {
-+ up_write(&current->mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, vma);
-+ return;
-+ }
-+ up_write(&current->mm->mmap_sem);
- }
- }
- }
-diff -urNp -X /usr/src/dontdiff linux-2.6.8-gentoo-r11/arch/s390/kernel/compat_exec.c linux-dsd/arch/s390/kernel/compat_exec.c
---- linux-2.6.8-gentoo-r11/arch/s390/kernel/compat_exec.c 2004-08-14 06:37:40.000000000 +0100
-+++ linux-dsd/arch/s390/kernel/compat_exec.c 2004-12-03 01:23:39.196818472 +0000
-@@ -39,7 +39,7 @@ int setup_arg_pages32(struct linux_binpr
- unsigned long stack_base;
- struct vm_area_struct *mpnt;
- struct mm_struct *mm = current->mm;
-- int i;
-+ int i, ret;
-
- stack_base = STACK_TOP - MAX_ARG_PAGES*PAGE_SIZE;
- mm->arg_start = bprm->p + stack_base;
-@@ -68,7 +68,11 @@ int setup_arg_pages32(struct linux_binpr
- /* executable stack setting would be applied here */
- mpnt->vm_page_prot = PAGE_COPY;
- mpnt->vm_flags = VM_STACK_FLAGS;
-- insert_vm_struct(mm, mpnt);
-+ if ((ret = insert_vm_struct(mm, mpnt))) {
-+ up_write(&mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, mpnt);
-+ return ret;
-+ }
- mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
- }
-
-diff -urNp -X /usr/src/dontdiff linux-2.6.8-gentoo-r11/arch/x86_64/ia32/ia32_binfmt.c linux-dsd/arch/x86_64/ia32/ia32_binfmt.c
---- linux-2.6.8-gentoo-r11/arch/x86_64/ia32/ia32_binfmt.c 2004-08-14 06:36:12.000000000 +0100
-+++ linux-dsd/arch/x86_64/ia32/ia32_binfmt.c 2004-12-03 01:25:24.771768640 +0000
-@@ -330,7 +330,7 @@ int setup_arg_pages(struct linux_binprm
- unsigned long stack_base;
- struct vm_area_struct *mpnt;
- struct mm_struct *mm = current->mm;
-- int i;
-+ int i, ret;
-
- stack_base = IA32_STACK_TOP - MAX_ARG_PAGES * PAGE_SIZE;
- mm->arg_start = bprm->p + stack_base;
-@@ -364,7 +364,11 @@ int setup_arg_pages(struct linux_binprm
- mpnt->vm_flags = vm_stack_flags32;
- mpnt->vm_page_prot = (mpnt->vm_flags & VM_EXEC) ?
- PAGE_COPY_EXEC : PAGE_COPY;
-- insert_vm_struct(mm, mpnt);
-+ if ((ret = insert_vm_struct(mm, mpnt))) {
-+ up_write(&mm->mmap_sem);
-+ kmem_cache_free(vm_area_cachep, mpnt);
-+ return ret;
-+ }
- mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
- }
-
-diff -urNp -X /usr/src/dontdiff linux-2.6.8-gentoo-r11/fs/exec.c linux-dsd/fs/exec.c
---- linux-2.6.8-gentoo-r11/fs/exec.c 2004-12-03 01:13:58.502097488 +0000
-+++ linux-dsd/fs/exec.c 2004-12-03 01:26:47.749154160 +0000
-@@ -341,7 +341,7 @@ int setup_arg_pages(struct linux_binprm
- unsigned long stack_base;
- struct vm_area_struct *mpnt;
- struct mm_struct *mm = current->mm;
-- int i;
-+ int i, ret;
- long arg_size;
-
- #ifdef CONFIG_STACK_GROWSUP
-@@ -412,7 +412,6 @@ int setup_arg_pages(struct linux_binprm
-
- down_write(&mm->mmap_sem);
- {
-- struct vm_area_struct *vma;
- mpnt->vm_mm = mm;
- #ifdef CONFIG_STACK_GROWSUP
- mpnt->vm_start = stack_base;
-@@ -433,13 +432,11 @@ int setup_arg_pages(struct linux_binprm
- mpnt->vm_flags = VM_STACK_FLAGS;
- mpnt->vm_flags |= mm->def_flags;
- mpnt->vm_page_prot = protection_map[mpnt->vm_flags & 0x7];
-- vma = find_vma(mm, mpnt->vm_start);
-- if (vma) {
-+ if ((ret = insert_vm_struct(mm, mpnt))) {
- up_write(&mm->mmap_sem);
- kmem_cache_free(vm_area_cachep, mpnt);
-- return -ENOMEM;
-+ return ret;
- }
-- insert_vm_struct(mm, mpnt);
- mm->total_vm = (mpnt->vm_end - mpnt->vm_start) >> PAGE_SHIFT;
- }
-
-diff -urNp -X /usr/src/dontdiff linux-2.6.8-gentoo-r11/include/linux/mm.h linux-dsd/include/linux/mm.h
---- linux-2.6.8-gentoo-r11/include/linux/mm.h 2004-08-14 06:36:13.000000000 +0100
-+++ linux-dsd/include/linux/mm.h 2004-12-03 01:20:32.718167536 +0000
-@@ -624,7 +624,7 @@ extern struct vm_area_struct *vma_merge(
- extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
- extern int split_vma(struct mm_struct *,
- struct vm_area_struct *, unsigned long addr, int new_below);
--extern void insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
-+extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
- extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
- struct rb_node **, struct rb_node *);
- extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
-diff -urNp -X /usr/src/dontdiff linux-2.6.8-gentoo-r11/mm/mmap.c linux-dsd/mm/mmap.c
---- linux-2.6.8-gentoo-r11/mm/mmap.c 2004-08-14 06:37:15.000000000 +0100
-+++ linux-dsd/mm/mmap.c 2004-12-03 01:20:32.720167232 +0000
-@@ -1740,7 +1740,7 @@ void exit_mmap(struct mm_struct *mm)
- * and into the inode's i_mmap tree. If vm_file is non-NULL
- * then i_mmap_lock is taken here.
- */
--void insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
-+int insert_vm_struct(struct mm_struct * mm, struct vm_area_struct * vma)
- {
- struct vm_area_struct * __vma, * prev;
- struct rb_node ** rb_link, * rb_parent;
-@@ -1763,8 +1763,9 @@ void insert_vm_struct(struct mm_struct *
- }
- __vma = find_vma_prepare(mm,vma->vm_start,&prev,&rb_link,&rb_parent);
- if (__vma && __vma->vm_start < vma->vm_end)
-- BUG();
-+ return -ENOMEM;
- vma_link(mm, vma, prev, rb_link, rb_parent);
-+ return 0;
- }
-
- /*
diff --git a/sys-kernel/usermode-sources/files/usermode-sources.CAN-2004-0497.patch b/sys-kernel/usermode-sources/files/usermode-sources.CAN-2004-0497.patch
deleted file mode 100644
index 41b3196f84ea..000000000000
--- a/sys-kernel/usermode-sources/files/usermode-sources.CAN-2004-0497.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2004/07/02 20:55:04-07:00 chrisw@osdl.org
-# [PATCH] chown permission check fix for ATTR_GID
-#
-# SuSE discovered this problem with chown and ATTR_GID. Make sure user
-# is authorized to change the group, CAN-2004-0497.
-#
-# fs/attr.c
-# 2004/07/02 09:07:32-07:00 chrisw@osdl.org +2 -1
-# chown permission check fix for ATTR_GID
-#
-diff -Nru a/fs/attr.c b/fs/attr.c
---- a/fs/attr.c 2004-07-08 16:35:57 -07:00
-+++ b/fs/attr.c 2004-07-08 16:35:57 -07:00
-@@ -35,7 +35,8 @@
-
- /* Make sure caller can chgrp. */
- if ((ia_valid & ATTR_GID) &&
-- (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid) &&
-+ (current->fsuid != inode->i_uid ||
-+ (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid)) &&
- !capable(CAP_CHOWN))
- goto error;
-
diff --git a/sys-kernel/usermode-sources/usermode-sources-2.6.8.1-r9.ebuild b/sys-kernel/usermode-sources/usermode-sources-2.6.8.1-r9.ebuild
deleted file mode 100644
index 70992b81821a..000000000000
--- a/sys-kernel/usermode-sources/usermode-sources-2.6.8.1-r9.ebuild
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/usermode-sources/usermode-sources-2.6.8.1-r9.ebuild,v 1.3 2005/03/17 00:36:35 r3pek Exp $
-
-K_NOUSENAME="yes"
-ETYPE="sources"
-inherit kernel-2
-detect_version
-
-UML_PATCH="uml-patch-${PV}-1"
-
-UNIPATCH_LIST="${DISTDIR}/${UML_PATCH}.bz2
- ${DISTDIR}/linux-${PV}-CAN-2004-0814.patch
- ${FILESDIR}/${PN}-2.6.cmdlineLeak.patch
- ${FILESDIR}/${PN}-2.6.devPtmx.patch
- ${FILESDIR}/${PN}-2.6.binfmt_elf.patch
- ${FILESDIR}/${PN}-2.6.smbfs.patch
- ${FILESDIR}/${PN}-2.6.binfmt_a.out.patch
- ${FILESDIR}/${PN}-2.6.AF_UNIX.patch
- ${FILESDIR}/${PN}-2.6.AF_UNIX.SELinux.patch
- ${FILESDIR}/${PN}-2.6.vma.patch
- ${FILESDIR}/${PN}-2.6.CAN-2004-1016.patch
- ${FILESDIR}/${PN}-2.6.CAN-2004-1056.patch
- ${FILESDIR}/${PN}-2.6.CAN-2004-1137.patch
- ${FILESDIR}/${PN}-2.6.CAN-2004-1151.patch
- ${FILESDIR}/${PN}-2.6.75963.patch
- ${FILESDIR}/${PN}-2.6.brk-locked.patch
- ${FILESDIR}/${PN}-2.6.77094.patch
- ${FILESDIR}/${PN}-2.6.74070.patch
- ${FILESDIR}/${PN}-2.6.77666.patch
- ${FILESDIR}/${PN}-2.6.77923.patch
- ${FILESDIR}/${PN}-2.6.78362.patch
- ${FILESDIR}/${PN}-2.4.78363.patch
- ${FILESDIR}/${PN}-2.6.81106.patch
- ${FILESDIR}/${PN}-2.6.82141.patch"
-
-DESCRIPTION="Full (vanilla) sources for the User Mode Linux kernel"
-SRC_URI="mirror://kernel/linux/kernel/v2.6/linux-${PV}.tar.bz2
- mirror://sourceforge/user-mode-linux/${UML_PATCH}.bz2
- http://dev.gentoo.org/~plasmaroo/patches/kernel/misc/security/linux-${PV}-CAN-2004-0814.patch"
-HOMEPAGE="http://www.kernel.org/ http://user-mode-linux.sourceforge.net"
-KEYWORDS="~x86"
-RESTRICT="nomirror"
-IUSE=""
-
-K_EXTRAEINFO="Since you are using UML, you may want to read the Gentoo Linux
-Developer's guide to system testing with User-Mode Linux that
-can be fount at http://www.gentoo.org/doc/en/uml.xml"
-