View | Details | Raw Unified
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 
		return -EFAULT;
		return -EFAULT;
	if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS)
	if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS)
		return -EINVAL;
		return -EINVAL;
	if(dltmp.len < 0 || dltmp.len > sizeof(moxaBuff))
		return -EINVAL;
	switch(cmd)
	switch(cmd)
	{
	{
 Lines 2822-2829   static int moxaload320b(int cardno, unsi Link Here 
	void __iomem *baseAddr;
	void __iomem *baseAddr;
	int i;
	int i;
	if(len > sizeof(moxaBuff))
		return -EINVAL;
	if(copy_from_user(moxaBuff, tmp, len))
	if(copy_from_user(moxaBuff, tmp, len))
		return -EFAULT;
		return -EFAULT;
	baseAddr = moxaBaseAddr[cardno];
	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 
			 struct gendisk *bd_disk, Scsi_Ioctl_Command __user *sic)
			 struct gendisk *bd_disk, Scsi_Ioctl_Command __user *sic)
{
{
	struct request *rq;
	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];
	char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
	/*
	/*
(-) linux-2.6.10/include/linux/writeback.h (+1 lines)
 Lines 86-91   static inline void wait_on_inode(struct Link Here 
int wakeup_bdflush(long nr_pages);
int wakeup_bdflush(long nr_pages);
void laptop_io_completion(void);
void laptop_io_completion(void);
void laptop_sync_completion(void);
void laptop_sync_completion(void);
void throttle_vm_writeout(void);
/* These are exported to sysctl. */
/* These are exported to sysctl. */
extern int dirty_background_ratio;
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 
			     void __user *oldval, size_t __user *oldlenp,
			     void __user *oldval, size_t __user *oldlenp,
			     void __user *newval, size_t newlen, void **context)
			     void __user *newval, size_t newlen, void **context)
{
{
	int	len;
	size_t	len;
	
	
	sysctl_poolsize = random_state->poolinfo.POOLBYTES;
	sysctl_poolsize = random_state->poolinfo.POOLBYTES;
(-) linux-2.6.10/mm/page-writeback.c (+22 lines)
 Lines 276-281   void balance_dirty_pages_ratelimited(str Link Here 
}
}
EXPORT_SYMBOL(balance_dirty_pages_ratelimited);
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
 * 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.
 * 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 
		BUG_ON(PageActive(page));
		BUG_ON(PageActive(page));
		if (PageWriteback(page))
			goto keep_locked;
		sc->nr_scanned++;
		sc->nr_scanned++;
		/* Double the slab pressure for mapped and swapcache pages */
		/* Double the slab pressure for mapped and swapcache pages */
		if (page_mapped(page) || PageSwapCache(page))
		if (page_mapped(page) || PageSwapCache(page))
			sc->nr_scanned++;
			sc->nr_scanned++;
		if (PageWriteback(page))
			goto keep_locked;
		referenced = page_referenced(page, 1, sc->priority <= 0);
		referenced = page_referenced(page, 1, sc->priority <= 0);
		/* In active use or really unfreeable?  Activate it. */
		/* In active use or really unfreeable?  Activate it. */
		if (referenced && page_mapping_inuse(page))
		if (referenced && page_mapping_inuse(page))
 Lines 825-830   shrink_zone(struct zone *zone, struct sc Link Here 
				break;
				break;
		}
		}
	}
	}
	throttle_vm_writeout();
}
}
/*
/*
(-) 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 
		if (index == TCP_RST_SET
		if (index == TCP_RST_SET
		    && ((test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
		    && ((test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)
		         && conntrack->proto.tcp.last_index <= TCP_SYNACK_SET)
		         && conntrack->proto.tcp.last_index <= TCP_SYNACK_SET)
		        || conntrack->proto.tcp.last_index == TCP_ACK_SET)
		        || (!test_bit(IPS_ASSURED_BIT, &conntrack->status)
			 && conntrack->proto.tcp.last_index == TCP_ACK_SET))
		    && after(ntohl(th->ack_seq),
		    && after(ntohl(th->ack_seq),
		    	     conntrack->proto.tcp.last_seq)) {
		    	     conntrack->proto.tcp.last_seq)) {
			/* Ignore RST closing down invalid SYN or ACK
			/* Ignore RST closing down invalid SYN or ACK