Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 54f4bf2815 | |||
| 082d52c56f | |||
| 24547e2e65 | |||
| df9586ef73 | |||
| 6b85cfab9d | |||
| d212503f82 | |||
| 2feb75c74d | |||
| f6e896dc60 | |||
| 75be5e4747 | |||
| 0b7a194cce | |||
| d47698c7ff | |||
| ee5b36ffa0 | |||
| e0be26d5c0 | |||
| 93b188a95f | |||
| e4e0411221 |
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 14
|
||||
EXTRAVERSION =
|
||||
EXTRAVERSION = .2
|
||||
NAME=Affluent Albatross
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
||||
@ -592,12 +592,15 @@ int appldata_register_ops(struct appldata_ops *ops)
|
||||
*/
|
||||
void appldata_unregister_ops(struct appldata_ops *ops)
|
||||
{
|
||||
void *table;
|
||||
spin_lock(&appldata_ops_lock);
|
||||
unregister_sysctl_table(ops->sysctl_header);
|
||||
list_del(&ops->list);
|
||||
kfree(ops->ctl_table);
|
||||
/* at that point any incoming access will fail */
|
||||
table = ops->ctl_table;
|
||||
ops->ctl_table = NULL;
|
||||
spin_unlock(&appldata_ops_lock);
|
||||
unregister_sysctl_table(ops->sysctl_header);
|
||||
kfree(table);
|
||||
P_INFO("%s-ops unregistered!\n", ops->name);
|
||||
}
|
||||
/********************** module-ops management <END> **************************/
|
||||
|
||||
@ -2260,10 +2260,8 @@ static void cfq_put_cfqd(struct cfq_data *cfqd)
|
||||
if (!atomic_dec_and_test(&cfqd->ref))
|
||||
return;
|
||||
|
||||
blk_put_queue(q);
|
||||
|
||||
cfq_shutdown_timer_wq(cfqd);
|
||||
q->elevator->elevator_data = NULL;
|
||||
blk_put_queue(q);
|
||||
|
||||
mempool_destroy(cfqd->crq_pool);
|
||||
kfree(cfqd->crq_hash);
|
||||
|
||||
@ -46,6 +46,8 @@
|
||||
#include <linux/pci.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#include "airo.h"
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
static struct pci_device_id card_ids[] = {
|
||||
{ 0x14b9, 1, PCI_ANY_ID, PCI_ANY_ID, },
|
||||
|
||||
9
drivers/net/wireless/airo.h
Normal file
9
drivers/net/wireless/airo.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef _AIRO_H_
|
||||
#define _AIRO_H_
|
||||
|
||||
struct net_device *init_airo_card(unsigned short irq, int port, int is_pcmcia,
|
||||
struct device *dmdev);
|
||||
int reset_airo_card(struct net_device *dev);
|
||||
void stop_airo_card(struct net_device *dev, int freeres);
|
||||
|
||||
#endif /* _AIRO_H_ */
|
||||
@ -42,6 +42,8 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include "airo.h"
|
||||
|
||||
/*
|
||||
All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
|
||||
you do not define PCMCIA_DEBUG at all, all the debug code will be
|
||||
@ -78,10 +80,6 @@ MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards");
|
||||
event handler.
|
||||
*/
|
||||
|
||||
struct net_device *init_airo_card( int, int, int, struct device * );
|
||||
void stop_airo_card( struct net_device *, int );
|
||||
int reset_airo_card( struct net_device * );
|
||||
|
||||
static void airo_config(dev_link_t *link);
|
||||
static void airo_release(dev_link_t *link);
|
||||
static int airo_event(event_t event, int priority,
|
||||
|
||||
@ -97,12 +97,6 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
/* lock the driver code */
|
||||
spin_lock_irqsave(&priv->slock, flags);
|
||||
|
||||
/* determine the amount of fragments needed to store the frame */
|
||||
|
||||
frame_size = skb->len < ETH_ZLEN ? ETH_ZLEN : skb->len;
|
||||
if (init_wds)
|
||||
frame_size += 6;
|
||||
|
||||
/* check whether the destination queue has enough fragments for the frame */
|
||||
curr_frag = le32_to_cpu(cb->driver_curr_frag[ISL38XX_CB_TX_DATA_LQ]);
|
||||
if (unlikely(curr_frag - priv->free_data_tx >= ISL38XX_CB_TX_QSIZE)) {
|
||||
@ -213,6 +207,7 @@ islpci_eth_transmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
/* store the skb address for future freeing */
|
||||
priv->data_low_tx[index] = skb;
|
||||
/* set the proper fragment start address and size information */
|
||||
frame_size = skb->len;
|
||||
fragment->size = cpu_to_le16(frame_size);
|
||||
fragment->flags = cpu_to_le16(0); /* set to 1 if more fragments */
|
||||
fragment->address = cpu_to_le32(pci_map_address);
|
||||
|
||||
@ -292,30 +292,23 @@ static ssize_t show_modalias(struct device *dev, struct device_attribute *attr,
|
||||
{
|
||||
struct usb_interface *intf;
|
||||
struct usb_device *udev;
|
||||
int len;
|
||||
struct usb_host_interface *alt;
|
||||
|
||||
intf = to_usb_interface(dev);
|
||||
udev = interface_to_usbdev(intf);
|
||||
alt = intf->cur_altsetting;
|
||||
|
||||
len = sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic",
|
||||
le16_to_cpu(udev->descriptor.idVendor),
|
||||
le16_to_cpu(udev->descriptor.idProduct),
|
||||
le16_to_cpu(udev->descriptor.bcdDevice),
|
||||
udev->descriptor.bDeviceClass,
|
||||
udev->descriptor.bDeviceSubClass,
|
||||
udev->descriptor.bDeviceProtocol);
|
||||
buf += len;
|
||||
|
||||
if (udev->descriptor.bDeviceClass == 0) {
|
||||
struct usb_host_interface *alt = intf->cur_altsetting;
|
||||
|
||||
return len + sprintf(buf, "%02Xisc%02Xip%02X\n",
|
||||
alt->desc.bInterfaceClass,
|
||||
alt->desc.bInterfaceSubClass,
|
||||
alt->desc.bInterfaceProtocol);
|
||||
} else {
|
||||
return len + sprintf(buf, "*isc*ip*\n");
|
||||
}
|
||||
return sprintf(buf, "usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02X"
|
||||
"ic%02Xisc%02Xip%02X\n",
|
||||
le16_to_cpu(udev->descriptor.idVendor),
|
||||
le16_to_cpu(udev->descriptor.idProduct),
|
||||
le16_to_cpu(udev->descriptor.bcdDevice),
|
||||
udev->descriptor.bDeviceClass,
|
||||
udev->descriptor.bDeviceSubClass,
|
||||
udev->descriptor.bDeviceProtocol,
|
||||
alt->desc.bInterfaceClass,
|
||||
alt->desc.bInterfaceSubClass,
|
||||
alt->desc.bInterfaceProtocol);
|
||||
}
|
||||
static DEVICE_ATTR(modalias, S_IRUGO, show_modalias, NULL);
|
||||
|
||||
|
||||
@ -557,6 +557,7 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
|
||||
{
|
||||
struct usb_interface *intf;
|
||||
struct usb_device *usb_dev;
|
||||
struct usb_host_interface *alt;
|
||||
int i = 0;
|
||||
int length = 0;
|
||||
|
||||
@ -573,7 +574,8 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
|
||||
|
||||
intf = to_usb_interface(dev);
|
||||
usb_dev = interface_to_usbdev (intf);
|
||||
|
||||
alt = intf->cur_altsetting;
|
||||
|
||||
if (usb_dev->devnum < 0) {
|
||||
pr_debug ("usb %s: already deleted?\n", dev->bus_id);
|
||||
return -ENODEV;
|
||||
@ -615,46 +617,27 @@ static int usb_hotplug (struct device *dev, char **envp, int num_envp,
|
||||
usb_dev->descriptor.bDeviceProtocol))
|
||||
return -ENOMEM;
|
||||
|
||||
if (usb_dev->descriptor.bDeviceClass == 0) {
|
||||
struct usb_host_interface *alt = intf->cur_altsetting;
|
||||
if (add_hotplug_env_var(envp, num_envp, &i,
|
||||
buffer, buffer_size, &length,
|
||||
"INTERFACE=%d/%d/%d",
|
||||
alt->desc.bInterfaceClass,
|
||||
alt->desc.bInterfaceSubClass,
|
||||
alt->desc.bInterfaceProtocol))
|
||||
return -ENOMEM;
|
||||
|
||||
/* 2.4 only exposed interface zero. in 2.5, hotplug
|
||||
* agents are called for all interfaces, and can use
|
||||
* $DEVPATH/bInterfaceNumber if necessary.
|
||||
*/
|
||||
if (add_hotplug_env_var(envp, num_envp, &i,
|
||||
buffer, buffer_size, &length,
|
||||
"INTERFACE=%d/%d/%d",
|
||||
alt->desc.bInterfaceClass,
|
||||
alt->desc.bInterfaceSubClass,
|
||||
alt->desc.bInterfaceProtocol))
|
||||
return -ENOMEM;
|
||||
|
||||
if (add_hotplug_env_var(envp, num_envp, &i,
|
||||
buffer, buffer_size, &length,
|
||||
"MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X",
|
||||
le16_to_cpu(usb_dev->descriptor.idVendor),
|
||||
le16_to_cpu(usb_dev->descriptor.idProduct),
|
||||
le16_to_cpu(usb_dev->descriptor.bcdDevice),
|
||||
usb_dev->descriptor.bDeviceClass,
|
||||
usb_dev->descriptor.bDeviceSubClass,
|
||||
usb_dev->descriptor.bDeviceProtocol,
|
||||
alt->desc.bInterfaceClass,
|
||||
alt->desc.bInterfaceSubClass,
|
||||
alt->desc.bInterfaceProtocol))
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
if (add_hotplug_env_var(envp, num_envp, &i,
|
||||
buffer, buffer_size, &length,
|
||||
"MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic*isc*ip*",
|
||||
le16_to_cpu(usb_dev->descriptor.idVendor),
|
||||
le16_to_cpu(usb_dev->descriptor.idProduct),
|
||||
le16_to_cpu(usb_dev->descriptor.bcdDevice),
|
||||
usb_dev->descriptor.bDeviceClass,
|
||||
usb_dev->descriptor.bDeviceSubClass,
|
||||
usb_dev->descriptor.bDeviceProtocol))
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (add_hotplug_env_var(envp, num_envp, &i,
|
||||
buffer, buffer_size, &length,
|
||||
"MODALIAS=usb:v%04Xp%04Xd%04Xdc%02Xdsc%02Xdp%02Xic%02Xisc%02Xip%02X",
|
||||
le16_to_cpu(usb_dev->descriptor.idVendor),
|
||||
le16_to_cpu(usb_dev->descriptor.idProduct),
|
||||
le16_to_cpu(usb_dev->descriptor.bcdDevice),
|
||||
usb_dev->descriptor.bDeviceClass,
|
||||
usb_dev->descriptor.bDeviceSubClass,
|
||||
usb_dev->descriptor.bDeviceProtocol,
|
||||
alt->desc.bInterfaceClass,
|
||||
alt->desc.bInterfaceSubClass,
|
||||
alt->desc.bInterfaceProtocol))
|
||||
return -ENOMEM;
|
||||
|
||||
envp[i] = NULL;
|
||||
|
||||
|
||||
10
fs/exec.c
10
fs/exec.c
@ -593,6 +593,7 @@ static inline int de_thread(struct task_struct *tsk)
|
||||
struct signal_struct *sig = tsk->signal;
|
||||
struct sighand_struct *newsighand, *oldsighand = tsk->sighand;
|
||||
spinlock_t *lock = &oldsighand->siglock;
|
||||
struct task_struct *leader = NULL;
|
||||
int count;
|
||||
|
||||
/*
|
||||
@ -668,7 +669,7 @@ static inline int de_thread(struct task_struct *tsk)
|
||||
* and to assume its PID:
|
||||
*/
|
||||
if (!thread_group_leader(current)) {
|
||||
struct task_struct *leader = current->group_leader, *parent;
|
||||
struct task_struct *parent;
|
||||
struct dentry *proc_dentry1, *proc_dentry2;
|
||||
unsigned long exit_state, ptrace;
|
||||
|
||||
@ -677,6 +678,7 @@ static inline int de_thread(struct task_struct *tsk)
|
||||
* It should already be zombie at this point, most
|
||||
* of the time.
|
||||
*/
|
||||
leader = current->group_leader;
|
||||
while (leader->exit_state != EXIT_ZOMBIE)
|
||||
yield();
|
||||
|
||||
@ -736,7 +738,6 @@ static inline int de_thread(struct task_struct *tsk)
|
||||
proc_pid_flush(proc_dentry2);
|
||||
|
||||
BUG_ON(exit_state != EXIT_ZOMBIE);
|
||||
release_task(leader);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -746,8 +747,11 @@ static inline int de_thread(struct task_struct *tsk)
|
||||
sig->flags = 0;
|
||||
|
||||
no_thread_group:
|
||||
BUG_ON(atomic_read(&sig->count) != 1);
|
||||
exit_itimers(sig);
|
||||
if (leader)
|
||||
release_task(leader);
|
||||
|
||||
BUG_ON(atomic_read(&sig->count) != 1);
|
||||
|
||||
if (atomic_read(&oldsighand->count) == 1) {
|
||||
/*
|
||||
|
||||
@ -24,7 +24,7 @@ config XFS_EXPORT
|
||||
default y
|
||||
|
||||
config XFS_QUOTA
|
||||
tristate "XFS Quota support"
|
||||
bool "XFS Quota support"
|
||||
depends on XFS_FS
|
||||
help
|
||||
If you say Y here, you will be able to set limits for disk usage on
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#ifndef __BARRIER_H
|
||||
#define __BARRIER_H
|
||||
|
||||
#include <asm/compiler.h>
|
||||
|
||||
#define mb() \
|
||||
__asm__ __volatile__("mb": : :"memory")
|
||||
|
||||
|
||||
@ -66,6 +66,7 @@ struct proc_dir_entry {
|
||||
write_proc_t *write_proc;
|
||||
atomic_t count; /* use count */
|
||||
int deleted; /* delete flag */
|
||||
void *set;
|
||||
};
|
||||
|
||||
struct kcore_list {
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
#include <linux/compiler.h>
|
||||
|
||||
struct file;
|
||||
struct completion;
|
||||
|
||||
#define CTL_MAXNAME 10 /* how many path components do we allow in a
|
||||
call to sysctl? In other words, what is
|
||||
@ -925,6 +926,8 @@ struct ctl_table_header
|
||||
{
|
||||
ctl_table *ctl_table;
|
||||
struct list_head ctl_entry;
|
||||
int used;
|
||||
struct completion *unregistering;
|
||||
};
|
||||
|
||||
struct ctl_table_header * register_sysctl_table(ctl_table * table,
|
||||
|
||||
@ -152,7 +152,7 @@ int ptrace_attach(struct task_struct *task)
|
||||
retval = -EPERM;
|
||||
if (task->pid <= 1)
|
||||
goto bad;
|
||||
if (task == current)
|
||||
if (task->tgid == current->tgid)
|
||||
goto bad;
|
||||
/* the same process cannot be attached many times */
|
||||
if (task->ptrace & PT_PTRACED)
|
||||
|
||||
@ -406,6 +406,8 @@ void __exit_signal(struct task_struct *tsk)
|
||||
|
||||
void exit_signal(struct task_struct *tsk)
|
||||
{
|
||||
atomic_dec(&tsk->signal->live);
|
||||
|
||||
write_lock_irq(&tasklist_lock);
|
||||
__exit_signal(tsk);
|
||||
write_unlock_irq(&tasklist_lock);
|
||||
|
||||
136
kernel/sysctl.c
136
kernel/sysctl.c
@ -169,7 +169,7 @@ struct file_operations proc_sys_file_operations = {
|
||||
|
||||
extern struct proc_dir_entry *proc_sys_root;
|
||||
|
||||
static void register_proc_table(ctl_table *, struct proc_dir_entry *);
|
||||
static void register_proc_table(ctl_table *, struct proc_dir_entry *, void *);
|
||||
static void unregister_proc_table(ctl_table *, struct proc_dir_entry *);
|
||||
#endif
|
||||
|
||||
@ -992,10 +992,51 @@ static ctl_table dev_table[] = {
|
||||
|
||||
extern void init_irq_proc (void);
|
||||
|
||||
static DEFINE_SPINLOCK(sysctl_lock);
|
||||
|
||||
/* called under sysctl_lock */
|
||||
static int use_table(struct ctl_table_header *p)
|
||||
{
|
||||
if (unlikely(p->unregistering))
|
||||
return 0;
|
||||
p->used++;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* called under sysctl_lock */
|
||||
static void unuse_table(struct ctl_table_header *p)
|
||||
{
|
||||
if (!--p->used)
|
||||
if (unlikely(p->unregistering))
|
||||
complete(p->unregistering);
|
||||
}
|
||||
|
||||
/* called under sysctl_lock, will reacquire if has to wait */
|
||||
static void start_unregistering(struct ctl_table_header *p)
|
||||
{
|
||||
/*
|
||||
* if p->used is 0, nobody will ever touch that entry again;
|
||||
* we'll eliminate all paths to it before dropping sysctl_lock
|
||||
*/
|
||||
if (unlikely(p->used)) {
|
||||
struct completion wait;
|
||||
init_completion(&wait);
|
||||
p->unregistering = &wait;
|
||||
spin_unlock(&sysctl_lock);
|
||||
wait_for_completion(&wait);
|
||||
spin_lock(&sysctl_lock);
|
||||
}
|
||||
/*
|
||||
* do not remove from the list until nobody holds it; walking the
|
||||
* list in do_sysctl() relies on that.
|
||||
*/
|
||||
list_del_init(&p->ctl_entry);
|
||||
}
|
||||
|
||||
void __init sysctl_init(void)
|
||||
{
|
||||
#ifdef CONFIG_PROC_FS
|
||||
register_proc_table(root_table, proc_sys_root);
|
||||
register_proc_table(root_table, proc_sys_root, &root_table_header);
|
||||
init_irq_proc();
|
||||
#endif
|
||||
}
|
||||
@ -1004,6 +1045,7 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol
|
||||
void __user *newval, size_t newlen)
|
||||
{
|
||||
struct list_head *tmp;
|
||||
int error = -ENOTDIR;
|
||||
|
||||
if (nlen <= 0 || nlen >= CTL_MAXNAME)
|
||||
return -ENOTDIR;
|
||||
@ -1012,20 +1054,30 @@ int do_sysctl(int __user *name, int nlen, void __user *oldval, size_t __user *ol
|
||||
if (!oldlenp || get_user(old_len, oldlenp))
|
||||
return -EFAULT;
|
||||
}
|
||||
spin_lock(&sysctl_lock);
|
||||
tmp = &root_table_header.ctl_entry;
|
||||
do {
|
||||
struct ctl_table_header *head =
|
||||
list_entry(tmp, struct ctl_table_header, ctl_entry);
|
||||
void *context = NULL;
|
||||
int error = parse_table(name, nlen, oldval, oldlenp,
|
||||
|
||||
if (!use_table(head))
|
||||
continue;
|
||||
|
||||
spin_unlock(&sysctl_lock);
|
||||
|
||||
error = parse_table(name, nlen, oldval, oldlenp,
|
||||
newval, newlen, head->ctl_table,
|
||||
&context);
|
||||
kfree(context);
|
||||
|
||||
spin_lock(&sysctl_lock);
|
||||
unuse_table(head);
|
||||
if (error != -ENOTDIR)
|
||||
return error;
|
||||
tmp = tmp->next;
|
||||
} while (tmp != &root_table_header.ctl_entry);
|
||||
return -ENOTDIR;
|
||||
break;
|
||||
} while ((tmp = tmp->next) != &root_table_header.ctl_entry);
|
||||
spin_unlock(&sysctl_lock);
|
||||
return error;
|
||||
}
|
||||
|
||||
asmlinkage long sys_sysctl(struct __sysctl_args __user *args)
|
||||
@ -1236,12 +1288,16 @@ struct ctl_table_header *register_sysctl_table(ctl_table * table,
|
||||
return NULL;
|
||||
tmp->ctl_table = table;
|
||||
INIT_LIST_HEAD(&tmp->ctl_entry);
|
||||
tmp->used = 0;
|
||||
tmp->unregistering = NULL;
|
||||
spin_lock(&sysctl_lock);
|
||||
if (insert_at_head)
|
||||
list_add(&tmp->ctl_entry, &root_table_header.ctl_entry);
|
||||
else
|
||||
list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry);
|
||||
spin_unlock(&sysctl_lock);
|
||||
#ifdef CONFIG_PROC_FS
|
||||
register_proc_table(table, proc_sys_root);
|
||||
register_proc_table(table, proc_sys_root, tmp);
|
||||
#endif
|
||||
return tmp;
|
||||
}
|
||||
@ -1255,10 +1311,13 @@ struct ctl_table_header *register_sysctl_table(ctl_table * table,
|
||||
*/
|
||||
void unregister_sysctl_table(struct ctl_table_header * header)
|
||||
{
|
||||
list_del(&header->ctl_entry);
|
||||
might_sleep();
|
||||
spin_lock(&sysctl_lock);
|
||||
start_unregistering(header);
|
||||
#ifdef CONFIG_PROC_FS
|
||||
unregister_proc_table(header->ctl_table, proc_sys_root);
|
||||
#endif
|
||||
spin_unlock(&sysctl_lock);
|
||||
kfree(header);
|
||||
}
|
||||
|
||||
@ -1269,7 +1328,7 @@ void unregister_sysctl_table(struct ctl_table_header * header)
|
||||
#ifdef CONFIG_PROC_FS
|
||||
|
||||
/* Scan the sysctl entries in table and add them all into /proc */
|
||||
static void register_proc_table(ctl_table * table, struct proc_dir_entry *root)
|
||||
static void register_proc_table(ctl_table * table, struct proc_dir_entry *root, void *set)
|
||||
{
|
||||
struct proc_dir_entry *de;
|
||||
int len;
|
||||
@ -1305,13 +1364,14 @@ static void register_proc_table(ctl_table * table, struct proc_dir_entry *root)
|
||||
de = create_proc_entry(table->procname, mode, root);
|
||||
if (!de)
|
||||
continue;
|
||||
de->set = set;
|
||||
de->data = (void *) table;
|
||||
if (table->proc_handler)
|
||||
de->proc_fops = &proc_sys_file_operations;
|
||||
}
|
||||
table->de = de;
|
||||
if (de->mode & S_IFDIR)
|
||||
register_proc_table(table->child, de);
|
||||
register_proc_table(table->child, de, set);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1336,6 +1396,13 @@ static void unregister_proc_table(ctl_table * table, struct proc_dir_entry *root
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* In any case, mark the entry as goner; we'll keep it
|
||||
* around if it's busy, but we'll know to do nothing with
|
||||
* its fields. We are under sysctl_lock here.
|
||||
*/
|
||||
de->data = NULL;
|
||||
|
||||
/* Don't unregister proc entries that are still being used.. */
|
||||
if (atomic_read(&de->count))
|
||||
continue;
|
||||
@ -1349,27 +1416,38 @@ static ssize_t do_rw_proc(int write, struct file * file, char __user * buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
int op;
|
||||
struct proc_dir_entry *de;
|
||||
struct proc_dir_entry *de = PDE(file->f_dentry->d_inode);
|
||||
struct ctl_table *table;
|
||||
size_t res;
|
||||
ssize_t error;
|
||||
ssize_t error = -ENOTDIR;
|
||||
|
||||
de = PDE(file->f_dentry->d_inode);
|
||||
if (!de || !de->data)
|
||||
return -ENOTDIR;
|
||||
table = (struct ctl_table *) de->data;
|
||||
if (!table || !table->proc_handler)
|
||||
return -ENOTDIR;
|
||||
op = (write ? 002 : 004);
|
||||
if (ctl_perm(table, op))
|
||||
return -EPERM;
|
||||
|
||||
res = count;
|
||||
|
||||
error = (*table->proc_handler) (table, write, file, buf, &res, ppos);
|
||||
if (error)
|
||||
return error;
|
||||
return res;
|
||||
spin_lock(&sysctl_lock);
|
||||
if (de && de->data && use_table(de->set)) {
|
||||
/*
|
||||
* at that point we know that sysctl was not unregistered
|
||||
* and won't be until we finish
|
||||
*/
|
||||
spin_unlock(&sysctl_lock);
|
||||
table = (struct ctl_table *) de->data;
|
||||
if (!table || !table->proc_handler)
|
||||
goto out;
|
||||
error = -EPERM;
|
||||
op = (write ? 002 : 004);
|
||||
if (ctl_perm(table, op))
|
||||
goto out;
|
||||
|
||||
/* careful: calling conventions are nasty here */
|
||||
res = count;
|
||||
error = (*table->proc_handler)(table, write, file,
|
||||
buf, &res, ppos);
|
||||
if (!error)
|
||||
error = res;
|
||||
out:
|
||||
spin_lock(&sysctl_lock);
|
||||
unuse_table(de->set);
|
||||
}
|
||||
spin_unlock(&sysctl_lock);
|
||||
return error;
|
||||
}
|
||||
|
||||
static int proc_opensys(struct inode *inode, struct file *file)
|
||||
|
||||
@ -213,6 +213,10 @@ int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset,
|
||||
{
|
||||
int i, err, fraglen, end = 0;
|
||||
struct sk_buff *next = skb_shinfo(skb)->frag_list;
|
||||
|
||||
if (!len)
|
||||
return 0;
|
||||
|
||||
next_skb:
|
||||
fraglen = skb_headlen(skb);
|
||||
i = -1;
|
||||
|
||||
@ -1009,11 +1009,10 @@ ip_vs_in(unsigned int hooknum, struct sk_buff **pskb,
|
||||
if (sysctl_ip_vs_expire_nodest_conn) {
|
||||
/* try to expire the connection immediately */
|
||||
ip_vs_conn_expire_now(cp);
|
||||
} else {
|
||||
/* don't restart its timer, and silently
|
||||
drop the packet. */
|
||||
__ip_vs_conn_put(cp);
|
||||
}
|
||||
/* don't restart its timer, and silently
|
||||
drop the packet. */
|
||||
__ip_vs_conn_put(cp);
|
||||
return NF_DROP;
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
static int fast_convergence = 1;
|
||||
static int max_increment = 32;
|
||||
static int max_increment = 16;
|
||||
static int low_window = 14;
|
||||
static int beta = 819; /* = 819/1024 (BICTCP_BETA_SCALE) */
|
||||
static int low_utilization_threshold = 153;
|
||||
|
||||
Reference in New Issue
Block a user