Commit 030d0ba0 authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/tmp3
parents 5a2bfcec eb40c469
...@@ -973,7 +973,7 @@ M: scott.feldman@intel.com ...@@ -973,7 +973,7 @@ M: scott.feldman@intel.com
S: Supported S: Supported
INTERMEZZO FILE SYSTEM INTERMEZZO FILE SYSTEM
P: Chen Yang P: Cluster File Systems
M: intermezzo-devel@lists.sf.net M: intermezzo-devel@lists.sf.net
W: http://www.inter-mezzo.org/ W: http://www.inter-mezzo.org/
L: intermezzo-discuss@lists.sourceforge.net L: intermezzo-discuss@lists.sourceforge.net
......
...@@ -682,6 +682,21 @@ __initcall(balanced_irq_init); ...@@ -682,6 +682,21 @@ __initcall(balanced_irq_init);
#else /* !SMP */ #else /* !SMP */
static inline void move_irq(int irq) { } static inline void move_irq(int irq) { }
void send_IPI_self(int vector)
{
unsigned int cfg;
/*
* Wait for idle.
*/
apic_wait_icr_idle();
cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | APIC_DEST_LOGICAL;
/*
* Send the IPI. The write to APIC_ICR fires this off.
*/
apic_write_around(APIC_ICR, cfg);
}
#endif /* defined(CONFIG_SMP) */ #endif /* defined(CONFIG_SMP) */
......
...@@ -357,25 +357,23 @@ int register_busmouse(struct busmouse *ops) ...@@ -357,25 +357,23 @@ int register_busmouse(struct busmouse *ops)
{ {
unsigned int msedev = MINOR_TO_MOUSE(ops->minor); unsigned int msedev = MINOR_TO_MOUSE(ops->minor);
struct busmouse_data *mse; struct busmouse_data *mse;
int ret; int ret = -EINVAL;
if (msedev >= NR_MICE) { if (msedev >= NR_MICE) {
printk(KERN_ERR "busmouse: trying to allocate mouse on minor %d\n", printk(KERN_ERR "busmouse: trying to allocate mouse on minor %d\n",
ops->minor); ops->minor);
return -EINVAL; goto out;
} }
ret = -ENOMEM;
mse = kmalloc(sizeof(*mse), GFP_KERNEL); mse = kmalloc(sizeof(*mse), GFP_KERNEL);
if (!mse) if (!mse)
return -ENOMEM; goto out;
down(&mouse_sem); down(&mouse_sem);
ret = -EBUSY;
if (busmouse_data[msedev]) if (busmouse_data[msedev])
{ goto freemem;
up(&mouse_sem);
kfree(mse);
return -EBUSY;
}
memset(mse, 0, sizeof(*mse)); memset(mse, 0, sizeof(*mse));
...@@ -386,14 +384,22 @@ int register_busmouse(struct busmouse *ops) ...@@ -386,14 +384,22 @@ int register_busmouse(struct busmouse *ops)
mse->lock = (spinlock_t)SPIN_LOCK_UNLOCKED; mse->lock = (spinlock_t)SPIN_LOCK_UNLOCKED;
init_waitqueue_head(&mse->wait); init_waitqueue_head(&mse->wait);
busmouse_data[msedev] = mse;
ret = misc_register(&mse->miscdev); ret = misc_register(&mse->miscdev);
if (!ret)
ret = msedev; if (ret < 0)
goto freemem;
busmouse_data[msedev] = mse;
ret = msedev;
out:
up(&mouse_sem); up(&mouse_sem);
return ret; return ret;
freemem:
kfree(mse);
goto out;
} }
/** /**
......
This diff is collapsed.
...@@ -161,7 +161,7 @@ static int debug; ...@@ -161,7 +161,7 @@ static int debug;
* then put the packet into tx_queue, and call sppp_flush_xmit() * then put the packet into tx_queue, and call sppp_flush_xmit()
* after spinlock is released. * after spinlock is released.
*/ */
static void sppp_flush_xmit() static void sppp_flush_xmit(void)
{ {
struct sk_buff *skb; struct sk_buff *skb;
while ((skb = skb_dequeue(&tx_queue)) != NULL) while ((skb = skb_dequeue(&tx_queue)) != NULL)
......
This diff is collapsed.
...@@ -69,7 +69,7 @@ obj-$(CONFIG_FB_SA1100) += sa1100fb.o cfbfillrect.o cfbcopyarea.o cfbi ...@@ -69,7 +69,7 @@ obj-$(CONFIG_FB_SA1100) += sa1100fb.o cfbfillrect.o cfbcopyarea.o cfbi
obj-$(CONFIG_FB_VIRTUAL) += vfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_VIRTUAL) += vfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_HIT) += hitfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_HIT) += hitfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_E1355) += epson1355fb.o obj-$(CONFIG_FB_E1355) += epson1355fb.o
obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_PVR2) += pvr2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_VOODOO1) += sstfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o
obj-$(CONFIG_FB_FFB) += ffb.o sbuslib.o cfbimgblt.o cfbcopyarea.o obj-$(CONFIG_FB_FFB) += ffb.o sbuslib.o cfbimgblt.o cfbcopyarea.o
......
This diff is collapsed.
...@@ -536,7 +536,8 @@ static ssize_t read_profile(struct file *file, char *buf, ...@@ -536,7 +536,8 @@ static ssize_t read_profile(struct file *file, char *buf,
buf++; p++; count--; read++; buf++; p++; count--; read++;
} }
pnt = (char *)prof_buffer + p - sizeof(unsigned int); pnt = (char *)prof_buffer + p - sizeof(unsigned int);
copy_to_user(buf,(void *)pnt,count); if (copy_to_user(buf,(void *)pnt,count))
return -EFAULT;
read += count; read += count;
*ppos += read; *ppos += read;
return read; return read;
......
...@@ -107,7 +107,7 @@ static inline void x86_do_profile(struct pt_regs * regs) ...@@ -107,7 +107,7 @@ static inline void x86_do_profile(struct pt_regs * regs)
atomic_inc((atomic_t *)&prof_buffer[eip]); atomic_inc((atomic_t *)&prof_buffer[eip]);
} }
#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) #if defined(CONFIG_X86_IO_APIC)
static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i)
{ {
if (IO_APIC_IRQ(i)) if (IO_APIC_IRQ(i))
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define _NAMESPACE_H_ #define _NAMESPACE_H_
#ifdef __KERNEL__ #ifdef __KERNEL__
#include <linux/dcache.h> #include <linux/mount.h>
#include <linux/sched.h> #include <linux/sched.h>
struct namespace { struct namespace {
...@@ -19,9 +19,9 @@ static inline void put_namespace(struct namespace *namespace) ...@@ -19,9 +19,9 @@ static inline void put_namespace(struct namespace *namespace)
{ {
if (atomic_dec_and_test(&namespace->count)) { if (atomic_dec_and_test(&namespace->count)) {
down_write(&namespace->sem); down_write(&namespace->sem);
spin_lock(&dcache_lock); spin_lock(&vfsmount_lock);
umount_tree(namespace->root); umount_tree(namespace->root);
spin_unlock(&dcache_lock); spin_unlock(&vfsmount_lock);
up_write(&namespace->sem); up_write(&namespace->sem);
kfree(namespace); kfree(namespace);
} }
......
...@@ -456,10 +456,10 @@ struct pci_bus { ...@@ -456,10 +456,10 @@ struct pci_bus {
void *sysdata; /* hook for sys-specific extension */ void *sysdata; /* hook for sys-specific extension */
struct proc_dir_entry *procdir; /* directory entry in /proc/bus/pci */ struct proc_dir_entry *procdir; /* directory entry in /proc/bus/pci */
unsigned char number; /* bus number */ unsigned int number; /* bus number */
unsigned char primary; /* number of primary bridge */ unsigned int primary; /* number of primary bridge */
unsigned char secondary; /* number of secondary bridge */ unsigned int secondary; /* number of secondary bridge */
unsigned char subordinate; /* max number of subordinate buses */ unsigned int subordinate; /* max number of subordinate buses */
char name[48]; char name[48];
......
...@@ -605,6 +605,9 @@ EXPORT_SYMBOL(next_thread); ...@@ -605,6 +605,9 @@ EXPORT_SYMBOL(next_thread);
EXPORT_SYMBOL(__per_cpu_offset); EXPORT_SYMBOL(__per_cpu_offset);
#endif #endif
EXPORT_SYMBOL(set_fs_pwd);
EXPORT_SYMBOL(set_fs_root);
/* debug */ /* debug */
EXPORT_SYMBOL(dump_stack); EXPORT_SYMBOL(dump_stack);
EXPORT_SYMBOL(ptrace_notify); EXPORT_SYMBOL(ptrace_notify);
......
...@@ -668,7 +668,7 @@ static int wanrouter_device_stat(struct wan_device *wandev, ...@@ -668,7 +668,7 @@ static int wanrouter_device_stat(struct wan_device *wandev,
static int wanrouter_device_new_if(struct wan_device *wandev, static int wanrouter_device_new_if(struct wan_device *wandev,
wanif_conf_t *u_conf) wanif_conf_t *u_conf)
{ {
wanif_conf_t conf; wanif_conf_t *cnf;
struct net_device *dev = NULL; struct net_device *dev = NULL;
#ifdef CONFIG_WANPIPE_MULTPPP #ifdef CONFIG_WANPIPE_MULTPPP
struct ppp_device *pppdev=NULL; struct ppp_device *pppdev=NULL;
...@@ -678,38 +678,47 @@ static int wanrouter_device_new_if(struct wan_device *wandev, ...@@ -678,38 +678,47 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL)) if ((wandev->state == WAN_UNCONFIGURED) || (wandev->new_if == NULL))
return -ENODEV; return -ENODEV;
if (copy_from_user(&conf, u_conf, sizeof(wanif_conf_t))) cnf = kmalloc(sizeof(wanif_conf_t), GFP_KERNEL);
return -EFAULT; if (!cnf)
return -ENOBUFS;
if (conf.magic != ROUTER_MAGIC) err = -EFAULT;
return -EINVAL; if (copy_from_user(cnf, u_conf, sizeof(wanif_conf_t)))
goto out;
err = -EINVAL;
if (cnf->magic != ROUTER_MAGIC)
goto out;
if (conf.config_id == WANCONFIG_MPPP) { if (cnf->config_id == WANCONFIG_MPPP) {
#ifdef CONFIG_WANPIPE_MULTPPP #ifdef CONFIG_WANPIPE_MULTPPP
pppdev = kmalloc(sizeof(struct ppp_device), GFP_KERNEL); pppdev = kmalloc(sizeof(struct ppp_device), GFP_KERNEL);
err = -ENOBUFS;
if (pppdev == NULL) if (pppdev == NULL)
return -ENOBUFS; goto out;
memset(pppdev, 0, sizeof(struct ppp_device)); memset(pppdev, 0, sizeof(struct ppp_device));
pppdev->dev = kmalloc(sizeof(struct net_device), GFP_KERNEL); pppdev->dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
if (pppdev->dev == NULL) { if (pppdev->dev == NULL) {
kfree(pppdev); kfree(pppdev);
return -ENOBUFS; err = -ENOBUFS;
goto out;
} }
memset(pppdev->dev, 0, sizeof(struct net_device)); memset(pppdev->dev, 0, sizeof(struct net_device));
err = wandev->new_if(wandev, err = wandev->new_if(wandev, (struct net_device *)pppdev, cnf);
(struct net_device *)pppdev, &conf);
dev = pppdev->dev; dev = pppdev->dev;
#else #else
printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n", printk(KERN_INFO "%s: Wanpipe Mulit-Port PPP support has not been compiled in!\n",
wandev->name); wandev->name);
return -EPROTONOSUPPORT; err = -EPROTONOSUPPORT;
goto out;
#endif #endif
} else { } else {
dev = kmalloc(sizeof(struct net_device), GFP_KERNEL); dev = kmalloc(sizeof(struct net_device), GFP_KERNEL);
err = -ENOBUFS;
if (dev == NULL) if (dev == NULL)
return -ENOBUFS; goto out;
memset(dev, 0, sizeof(struct net_device)); memset(dev, 0, sizeof(struct net_device));
err = wandev->new_if(wandev, dev, &conf); err = wandev->new_if(wandev, dev, cnf);
} }
if (!err) { if (!err) {
...@@ -748,7 +757,8 @@ static int wanrouter_device_new_if(struct wan_device *wandev, ...@@ -748,7 +757,8 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
++wandev->ndev; ++wandev->ndev;
unlock_adapter_irq(&wandev->lock, &smp_flags); unlock_adapter_irq(&wandev->lock, &smp_flags);
return 0; /* done !!! */ err = 0; /* done !!! */
goto out;
} }
} }
if (wandev->del_if) if (wandev->del_if)
...@@ -761,18 +771,19 @@ static int wanrouter_device_new_if(struct wan_device *wandev, ...@@ -761,18 +771,19 @@ static int wanrouter_device_new_if(struct wan_device *wandev,
dev->priv = NULL; dev->priv = NULL;
} }
#ifdef CONFIG_WANPIPE_MULTPPP #ifdef CONFIG_WANPIPE_MULTPPP
if (conf.config_id == WANCONFIG_MPPP) if (cnf->config_id == WANCONFIG_MPPP)
kfree(pppdev); kfree(pppdev);
else else
kfree(dev); kfree(dev);
#else #else
/* Sync PPP is disabled */ /* Sync PPP is disabled */
if (conf.config_id != WANCONFIG_MPPP) if (cnf->config_id != WANCONFIG_MPPP)
kfree(dev); kfree(dev);
#endif #endif
out:
kfree(cnf);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment