diff options
author | Tim Yamin <plasmaroo@gentoo.org> | 2005-01-12 21:05:39 +0000 |
---|---|---|
committer | Tim Yamin <plasmaroo@gentoo.org> | 2005-01-12 21:05:39 +0000 |
commit | ea0bd80ccca14e98dd055969a9ed9f91b170e443 (patch) | |
tree | 64a11c40b2bc46589df08d2e4962a4534f52df9e /sys-kernel/uclinux-sources | |
parent | Stable on ppc. (Manifest recommit) (diff) | |
download | gentoo-2-ea0bd80ccca14e98dd055969a9ed9f91b170e443.tar.gz gentoo-2-ea0bd80ccca14e98dd055969a9ed9f91b170e443.tar.bz2 gentoo-2-ea0bd80ccca14e98dd055969a9ed9f91b170e443.zip |
Fix #77094 patch; bug #77458.
Diffstat (limited to 'sys-kernel/uclinux-sources')
-rw-r--r-- | sys-kernel/uclinux-sources/ChangeLog | 5 | ||||
-rw-r--r-- | sys-kernel/uclinux-sources/files/uclinux-sources-2.6.77094.patch | 125 |
2 files changed, 99 insertions, 31 deletions
diff --git a/sys-kernel/uclinux-sources/ChangeLog b/sys-kernel/uclinux-sources/ChangeLog index 079489b79b0f..069fdff56006 100644 --- a/sys-kernel/uclinux-sources/ChangeLog +++ b/sys-kernel/uclinux-sources/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for sys-kernel/uclinux-sources # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/uclinux-sources/ChangeLog,v 1.29 2005/01/09 11:18:40 plasmaroo Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/uclinux-sources/ChangeLog,v 1.30 2005/01/12 21:03:51 plasmaroo Exp $ + + 12 Jan 2005; <plasmaroo@gentoo.org> files/uclinux-sources-2.6.77094.patch: + Fix #77094 patch; bug #77458. *uclinux-sources-2.6.7_p0-r14 (09 Jan 2005) diff --git a/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.77094.patch b/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.77094.patch index 903c85628833..6b2c7bdb2317 100644 --- a/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.77094.patch +++ b/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.77094.patch @@ -1,7 +1,20 @@ -diff -urNp linux-2.6.10/drivers/char/moxa.c linux-2.6.10-new/drivers/char/moxa.c ---- linux-2.6.10/drivers/char/moxa.c 2005-01-07 10:51:23 -0500 -+++ linux-2.6.10-new/drivers/char/moxa.c 2005-01-07 10:51:33 -0500 -@@ -1668,6 +1668,8 @@ int MoxaDriverIoctl(unsigned int cmd, un +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; @@ -10,8 +23,8 @@ diff -urNp linux-2.6.10/drivers/char/moxa.c linux-2.6.10-new/drivers/char/moxa.c switch(cmd) { -@@ -2822,8 +2824,6 @@ static int moxaload320b(int cardno, unsi - void __iomem *baseAddr; +@@ -2841,8 +2843,6 @@ static int moxaload320b(int cardno, unsi + unsigned long baseAddr; int i; - if(len > sizeof(moxaBuff)) @@ -19,23 +32,10 @@ diff -urNp linux-2.6.10/drivers/char/moxa.c linux-2.6.10-new/drivers/char/moxa.c if(copy_from_user(moxaBuff, tmp, len)) return -EFAULT; baseAddr = moxaBaseAddr[cardno]; -diff -urNp linux-2.6.10/drivers/block/scsi_ioctl.c linux-2.6.10-new/drivers/block/scsi_ioctl.c ---- linux-2.6.10/drivers/block/scsi_ioctl.c 2005-01-07 10:51:24 -0500 -+++ linux-2.6.10-new/drivers/block/scsi_ioctl.c 2005-01-07 10:51:33 -0500 -@@ -339,7 +339,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 -urNp linux-2.6.10/drivers/char/random.c linux-2.6.10-new/drivers/char/random.c ---- linux-2.6.10/drivers/char/random.c 2005-01-07 10:51:23 -0500 -+++ linux-2.6.10-new/drivers/char/random.c 2005-01-07 10:51:33 -0500 -@@ -1912,7 +1912,7 @@ static int poolsize_strategy(ctl_table * +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) { @@ -44,16 +44,27 @@ diff -urNp linux-2.6.10/drivers/char/random.c linux-2.6.10-new/drivers/char/rand sysctl_poolsize = random_state->poolinfo.POOLBYTES; -diff -urNp linux-2.6.10/mm/mmap.c linux-2.6.10-new/mm/mmap.c ---- linux-2.6.10/mm/mmap.c 2004-12-24 22:35:00.000000000 +0100 -+++ linux-2.6.10-new/mm/mmap.c 2004-12-27 16:37:47.000000000 +0100 -@@ -1360,6 +1360,13 @@ int expand_stack(struct vm_area_struct * +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->signal->rlim[RLIMIT_MEMLOCK].rlim_cur) { ++ current->rlim[RLIMIT_MEMLOCK].rlim_cur) { + anon_vma_unlock(vma); + vm_unacct_memory(grow); + return -ENOMEM; @@ -61,13 +72,13 @@ diff -urNp linux-2.6.10/mm/mmap.c linux-2.6.10-new/mm/mmap.c vma->vm_end = address; vma->vm_mm->total_vm += grow; if (vma->vm_flags & VM_LOCKED) -@@ -1422,6 +1429,13 @@ int expand_stack(struct vm_area_struct * +@@ -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->signal->rlim[RLIMIT_MEMLOCK].rlim_cur) { ++ current->rlim[RLIMIT_MEMLOCK].rlim_cur) { + anon_vma_unlock(vma); + vm_unacct_memory(grow); + return -ENOMEM; @@ -75,3 +86,57 @@ diff -urNp linux-2.6.10/mm/mmap.c linux-2.6.10-new/mm/mmap.c 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(); + } + + /* |