Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 77094 | Differences between
and this patch

Collapse All | Expand All

(-)linux-2.6.10/drivers/char/moxa.c (-2 / +2 lines)
Lines 1668-1673 int MoxaDriverIoctl(unsigned int cmd, un Link Here
1668
		return -EFAULT;
1668
		return -EFAULT;
1669
	if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS)
1669
	if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS)
1670
		return -EINVAL;
1670
		return -EINVAL;
1671
	if(dltmp.len < 0 || dltmp.len > sizeof(moxaBuff))
1672
		return -EINVAL;
1671
1673
1672
	switch(cmd)
1674
	switch(cmd)
1673
	{
1675
	{
Lines 2822-2829 static int moxaload320b(int cardno, unsi Link Here
2822
	void __iomem *baseAddr;
2824
	void __iomem *baseAddr;
2823
	int i;
2825
	int i;
2824
2826
2825
	if(len > sizeof(moxaBuff))
2826
		return -EINVAL;
2827
	if(copy_from_user(moxaBuff, tmp, len))
2827
	if(copy_from_user(moxaBuff, tmp, len))
2828
		return -EFAULT;
2828
		return -EFAULT;
2829
	baseAddr = moxaBaseAddr[cardno];
2829
	baseAddr = moxaBaseAddr[cardno];
(-)linux-2.6.10/drivers/block/scsi_ioctl.c (-1 / +2 lines)
Lines 339-345 static int sg_scsi_ioctl(struct file *fi Link Here
339
			 struct gendisk *bd_disk, Scsi_Ioctl_Command __user *sic)
339
			 struct gendisk *bd_disk, Scsi_Ioctl_Command __user *sic)
340
{
340
{
341
	struct request *rq;
341
	struct request *rq;
342
	int err, in_len, out_len, bytes, opcode, cmdlen;
342
	unsigned int in_len, out_len, bytes, opcode, cmdlen;
343
	int err;
343
	char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
344
	char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
344
345
345
	/*
346
	/*
(-)linux-2.6.10/include/linux/writeback.h (+1 lines)
Lines 86-91 static inline void wait_on_inode(struct Link Here
86
int wakeup_bdflush(long nr_pages);
86
int wakeup_bdflush(long nr_pages);
87
void laptop_io_completion(void);
87
void laptop_io_completion(void);
88
void laptop_sync_completion(void);
88
void laptop_sync_completion(void);
89
void throttle_vm_writeout(void);
89
90
90
/* These are exported to sysctl. */
91
/* These are exported to sysctl. */
91
extern int dirty_background_ratio;
92
extern int dirty_background_ratio;
(-)linux-2.6.10/drivers/char/random.c (-1 / +1 lines)
Lines 1912-1918 static int poolsize_strategy(ctl_table * Link Here
1912
			     void __user *oldval, size_t __user *oldlenp,
1912
			     void __user *oldval, size_t __user *oldlenp,
1913
			     void __user *newval, size_t newlen, void **context)
1913
			     void __user *newval, size_t newlen, void **context)
1914
{
1914
{
1915
	int	len;
1915
	size_t	len;
1916
	
1916
	
1917
	sysctl_poolsize = random_state->poolinfo.POOLBYTES;
1917
	sysctl_poolsize = random_state->poolinfo.POOLBYTES;
1918
1918
(-)linux-2.6.10/mm/mmap.c (+14 lines)
Lines 1360-1365 int expand_stack(struct vm_area_struct * Link Here
1360
		vm_unacct_memory(grow);
1360
		vm_unacct_memory(grow);
1361
		return -ENOMEM;
1361
		return -ENOMEM;
1362
	}
1362
	}
1363
	if ((vma->vm_flags & VM_LOCKED) && !capable(CAP_IPC_LOCK) &&
1364
			((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
1365
			current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur) {
1366
		anon_vma_unlock(vma);
1367
		vm_unacct_memory(grow);
1368
		return -ENOMEM;
1369
	}
1363
	vma->vm_end = address;
1370
	vma->vm_end = address;
1364
	vma->vm_mm->total_vm += grow;
1371
	vma->vm_mm->total_vm += grow;
1365
	if (vma->vm_flags & VM_LOCKED)
1372
	if (vma->vm_flags & VM_LOCKED)
Lines 1422-1427 int expand_stack(struct vm_area_struct * Link Here
1422
		vm_unacct_memory(grow);
1429
		vm_unacct_memory(grow);
1423
		return -ENOMEM;
1430
		return -ENOMEM;
1424
	}
1431
	}
1432
	if ((vma->vm_flags & VM_LOCKED) && !capable(CAP_IPC_LOCK) &&
1433
			((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) >
1434
			current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur) {
1435
		anon_vma_unlock(vma);
1436
		vm_unacct_memory(grow);
1437
		return -ENOMEM;
1438
	}
1425
	vma->vm_start = address;
1439
	vma->vm_start = address;
1426
	vma->vm_pgoff -= grow;
1440
	vma->vm_pgoff -= grow;
1427
	vma->vm_mm->total_vm += grow;
1441
	vma->vm_mm->total_vm += grow;
(-)linux-2.6.10/mm/page-writeback.c (+22 lines)
Lines 276-281 void balance_dirty_pages_ratelimited(str Link Here
276
}
276
}
277
EXPORT_SYMBOL(balance_dirty_pages_ratelimited);
277
EXPORT_SYMBOL(balance_dirty_pages_ratelimited);
278
278
279
void throttle_vm_writeout(void)
280
{
281
	struct writeback_state wbs;
282
	long background_thresh;
283
	long dirty_thresh;
284
285
        for ( ; ; ) {
286
		get_dirty_limits(&wbs, &background_thresh, &dirty_thresh);
287
288
                /*
289
                 * Boost the allowable dirty threshold a bit for page
290
                 * allocators so they don't get DoS'ed by heavy writers
291
                 */
292
                dirty_thresh += dirty_thresh / 10;      /* wheeee... */
293
294
                if (wbs.nr_unstable + wbs.nr_writeback <= dirty_thresh)
295
                        break;
296
                blk_congestion_wait(WRITE, HZ/10);
297
        }
298
}
299
300
279
/*
301
/*
280
 * writeback at least _min_pages, and keep writing until the amount of dirty
302
 * writeback at least _min_pages, and keep writing until the amount of dirty
281
 * memory is less than the background threshold, or until we're all clean.
303
 * memory is less than the background threshold, or until we're all clean.
(-)linux-2.6.10/mm/vmscan.c (-3 / +5 lines)
Lines 369-382 static int shrink_list(struct list_head Link Here
369
369
370
		BUG_ON(PageActive(page));
370
		BUG_ON(PageActive(page));
371
371
372
		if (PageWriteback(page))
373
			goto keep_locked;
374
375
		sc->nr_scanned++;
372
		sc->nr_scanned++;
376
		/* Double the slab pressure for mapped and swapcache pages */
373
		/* Double the slab pressure for mapped and swapcache pages */
377
		if (page_mapped(page) || PageSwapCache(page))
374
		if (page_mapped(page) || PageSwapCache(page))
378
			sc->nr_scanned++;
375
			sc->nr_scanned++;
379
376
377
		if (PageWriteback(page))
378
			goto keep_locked;
379
380
		referenced = page_referenced(page, 1, sc->priority <= 0);
380
		referenced = page_referenced(page, 1, sc->priority <= 0);
381
		/* In active use or really unfreeable?  Activate it. */
381
		/* In active use or really unfreeable?  Activate it. */
382
		if (referenced && page_mapping_inuse(page))
382
		if (referenced && page_mapping_inuse(page))
Lines 825-830 shrink_zone(struct zone *zone, struct sc Link Here
825
				break;
825
				break;
826
		}
826
		}
827
	}
827
	}
828
829
	throttle_vm_writeout();
828
}
830
}
829
831
830
/*
832
/*
(-)linux-2.6.10/net/ipv4/netfilter/ip_conntrack_proto_tcp.c (-1 / +2 lines)
Lines 906-912 static int tcp_packet(struct ip_conntrac Link Here
906
		if (index == TCP_RST_SET
906
		if (index == TCP_RST_SET
907
		    && ((test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
907
		    && ((test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
908
		         && conntrack->proto.tcp.last_index <= TCP_SYNACK_SET)
908
		         && conntrack->proto.tcp.last_index <= TCP_SYNACK_SET)
909
		        || conntrack->proto.tcp.last_index == TCP_ACK_SET)
909
		        || (!test_bit(IPS_ASSURED_BIT, &conntrack->status)
910
			 && conntrack->proto.tcp.last_index == TCP_ACK_SET))
910
		    && after(ntohl(th->ack_seq),
911
		    && after(ntohl(th->ack_seq),
911
		    	     conntrack->proto.tcp.last_seq)) {
912
		    	     conntrack->proto.tcp.last_seq)) {
912
			/* Ignore RST closing down invalid SYN or ACK
913
			/* Ignore RST closing down invalid SYN or ACK

Return to bug 77094