Commit a53bc21c authored by Linus Torvalds's avatar Linus Torvalds

Linux-2.4.0-test2

There's a "test2" kernel out there now, integrating most of the -ac
patches, and some code that wasn't in -ac.

Normally, when you integrate almost 5MB of patches, bad things happen.
This time, a miracle occurred. As I uploaded the resultant kernel, a
specter of the holy penguin appeared before me, and said "It is Good. It
is Bugfree".

As if wanting to re-assure me that yes, it really =was= the holy penguin,
it finally added "Do you have any Herring?" before fading out in a puff of
holy penguin-smoke. Only a faint whiff of rancid fish remains as I type in
these words..

In short, not only are most of Alan's patches integrated, I have it on
higher authority that the result is perfect.

So if it doesn't compile for you, you must be doing something wrong.

		Linus
parent a2c3c74c
This driver is for Compaq's SMART2 Intellegent Disk Array Controllers.
WARNING:
--------
This driver comes with NO WARRANTY. It is not officially supported by
Compaq. Do not call technical support. Use at your own risk.
Supported Cards:
----------------
......@@ -22,6 +16,7 @@ This driver is known to work with the following cards:
* Integrated Smart Array Controller
* SA 4200
* SA 4250ES
* SA 431
It should also work with some really old Disk array adapters, but I am
unable to test against these cards:
......
......@@ -199,8 +199,9 @@ S: Maintained
COMPAQ SMART2 RAID DRIVER
P: Charles White
M: Charles White <arrays@compaq.com>
L: compaqandlinux@yps.org
S: Maintained
L: compaqandlinux@cpqlin.van-dijk.net
W: ftp.compaq.com/pub/products/drivers/linux
S: Supported
COMPUTONE INTELLIPORT MULTIPORT CARD
P: Doug McNash
......
......@@ -9,9 +9,11 @@
* Copyright (C) 1999 Silicon Graphics, Inc.
* Copyright (C) Vijay Chander(vijay@engr.sgi.com)
*
* 00/03/29 C. Fleckenstein Fixed PAL/SAL update issues, began MCA bug fixes, logging issues,
* 00/03/29 C. Fleckenstein Fixed PAL/SAL update issues, began MCA bug fixes,
* logging issues,
* added min save state dump, added INIT handler.
*/
#include <linux/config.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/sched.h>
......
......@@ -7,6 +7,7 @@
* Derived from the x86 and Alpha versions. Most of the code in here
* could actually be factored into a common set of routines.
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/mm.h>
......
......@@ -277,20 +277,24 @@ static int load_aout32_binary(struct linux_binprm * bprm, struct pt_regs * regs)
goto beyond_if;
}
down(&current->mm->mmap_sem);
error = do_mmap(bprm->file, N_TXTADDR(ex), ex.a_text,
PROT_READ | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset);
up(&current->mm->mmap_sem);
if (error != N_TXTADDR(ex)) {
send_sig(SIGKILL, current, 0);
return error;
}
down(&current->mm->mmap_sem);
error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE,
fd_offset + ex.a_text);
up(&current->mm->mmap_sem);
if (error != N_DATADDR(ex)) {
send_sig(SIGKILL, current, 0);
return error;
......
/* $Id: sys_sparc32.c,v 1.151 2000/06/22 11:42:25 davem Exp $
/* $Id: sys_sparc32.c,v 1.152 2000/06/22 17:44:47 davem Exp $
* sys_sparc32.c: Conversion between 32bit and 64bit native syscalls.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
......@@ -3778,8 +3778,6 @@ static int nfs_getfh32_res_trans(union nfsctl_res *kres, union nfsctl_res32 *res
return copy_to_user(res32, kres, sizeof(*res32));
}
extern asmlinkage int sys_nfsservctl(int cmd, void *arg, void *resp);
int asmlinkage sys32_nfsservctl(int cmd, struct nfsctl_arg32 *arg32, union nfsctl_res32 *res32)
{
struct nfsctl_arg *karg = NULL;
......
This diff is collapsed.
......@@ -191,7 +191,7 @@ typedef struct {
__u8 expn_fail;
__u8 unit_flags;
__u16 big_fail_map[8];
__u16 big_remap_map[8];
__u16 big_remap_map[128];
__u16 big_repl_map[8];
__u16 big_act_spare_map[8];
__u8 big_spar_repl_map[128];
......@@ -336,7 +336,7 @@ typedef struct {
__u32 sense_info;
__u8 sense_code;
__u8 sense_qual;
__u8 residual;
__u32 residual;
__u8 reserved[4];
__u8 cdb[12];
} scsi_param_t;
......
......@@ -62,13 +62,14 @@ static void smart4_intr_mask(ctlr_info_t *h, unsigned long val)
}
/*
* For this card fifo is full if reading this port returns 0!
* For older cards FIFO Full = 0.
* On this card 0 means there is room, anything else FIFO Full.
*
*/
static unsigned long smart4_fifo_full(ctlr_info_t *h)
{
return (~readl(h->vaddr + S42XX_REQUEST_PORT_OFFSET));
return (!readl(h->vaddr + S42XX_REQUEST_PORT_OFFSET));
}
/* This type of controller returns -1 if the fifo is empty,
......@@ -81,7 +82,7 @@ static unsigned long smart4_completed(ctlr_info_t *h)
= readl(h->vaddr + S42XX_REPLY_PORT_OFFSET);
/* Fifo is empty */
if( register_value == -1)
if( register_value == 0xffffffff)
return 0;
/* Need to let it know we got the reply */
......
......@@ -197,7 +197,7 @@ endmenu
bool 'FDDI driver support' CONFIG_FDDI
if [ "$CONFIG_FDDI" = "y" ]; then
dep_tristate ' Digital DEFEA and DEFPA adapter support' CONFIG_DEFXX $CONFIG_FDDI
tristate ' Digital DEFEA and DEFPA adapter support' CONFIG_DEFXX
tristate ' SysKonnect FDDI PCI support' CONFIG_SKFP
fi
......
......@@ -74,14 +74,14 @@ comment 'USB HID'
if [ "$CONFIG_INPUT_IFORCE_USB" != "n" ]; then
define_tristate CONFIG_INPUT_IFORCE $CONFIG_INPUT_IFORCE_USB
fi
dep_tristate ' Keyboard support' CONFIG_INPUT_KEYBDEV
dep_tristate ' Mouse support' CONFIG_INPUT_MOUSEDEV
dep_tristate ' Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_USB
dep_tristate ' Mouse support' CONFIG_INPUT_MOUSEDEV $CONFIG_USB
if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
int ' Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
int ' Vertical screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_Y 768
fi
dep_tristate ' Joystick support' CONFIG_INPUT_JOYDEV
dep_tristate ' Event interface support' CONFIG_INPUT_EVDEV
dep_tristate ' Joystick support' CONFIG_INPUT_JOYDEV $CONFIG_USB
dep_tristate ' Event interface support' CONFIG_INPUT_EVDEV $CONFIG_USB
fi
endmenu
......@@ -1044,7 +1044,7 @@ static int proc_ioctl (struct dev_state *ps, void *arg)
kfree (buf);
return -EFAULT;
} else
memset (arg, size, 0);
memset (arg, 0, size);
}
/* ioctl to device */
......
/*
* $Id: evdev.c,v 1.8 2000/05/29 09:01:52 vojtech Exp $
* $Id: evdev.c,v 1.10 2000/06/23 09:23:00 vojtech Exp $
*
* Copyright (c) 1999-2000 Vojtech Pavlik
*
......@@ -39,7 +39,7 @@
#include <linux/input.h>
struct evdev {
int used;
int exist;
int open;
int minor;
struct input_handle handle;
......@@ -99,13 +99,14 @@ static int evdev_release(struct inode * inode, struct file * file)
listptr = &((*listptr)->next);
*listptr = (*listptr)->next;
if (!--list->evdev->open)
input_close_device(&list->evdev->handle);
if (!--list->evdev->used) {
input_unregister_minor(list->evdev->devfs);
evdev_table[list->evdev->minor] = NULL;
kfree(list->evdev);
if (!--list->evdev->open) {
if (list->evdev->exist) {
input_close_device(&list->evdev->handle);
} else {
input_unregister_minor(list->evdev->devfs);
evdev_table[list->evdev->minor] = NULL;
kfree(list->evdev);
}
}
kfree(list);
......@@ -121,9 +122,8 @@ static int evdev_open(struct inode * inode, struct file * file)
if (i > EVDEV_MINORS || !evdev_table[i])
return -ENODEV;
if (!(list = kmalloc(sizeof(struct evdev_list), GFP_KERNEL))) {
if (!(list = kmalloc(sizeof(struct evdev_list), GFP_KERNEL)))
return -ENOMEM;
}
memset(list, 0, sizeof(struct evdev_list));
list->evdev = evdev_table[i];
......@@ -132,10 +132,9 @@ static int evdev_open(struct inode * inode, struct file * file)
file->private_data = list;
list->evdev->used++;
if (!list->evdev->open++)
input_open_device(&list->evdev->handle);
if (list->evdev->exist)
input_open_device(&list->evdev->handle);
return 0;
}
......@@ -303,7 +302,7 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
evdev->handle.handler = handler;
evdev->handle.private = evdev;
evdev->used = 1;
evdev->exist = 1;
evdev->devfs = input_register_minor("event%d", minor, EVDEV_MINOR_BASE);
......@@ -316,10 +315,11 @@ static void evdev_disconnect(struct input_handle *handle)
{
struct evdev *evdev = handle->private;
if (evdev->open)
input_close_device(handle);
evdev->exist = 0;
if (!--evdev->used) {
if (evdev->open) {
input_close_device(handle);
} else {
input_unregister_minor(evdev->devfs);
evdev_table[evdev->minor] = NULL;
kfree(evdev);
......
/*
* $Id: joydev.c,v 1.7 2000/05/29 09:01:52 vojtech Exp $
* $Id: joydev.c,v 1.11 2000/06/23 09:23:00 vojtech Exp $
*
* Copyright (c) 1999-2000 Vojtech Pavlik
* Copyright (c) 1999-2000 Vojtech Pavlik
* Copyright (c) 1999 Colin Van Dyke
*
* Joystick device driver for the input driver suite.
......@@ -50,7 +50,7 @@
#define JOYDEV_BUFFER_SIZE 64
struct joydev {
int used;
int exist;
int open;
int minor;
struct input_handle handle;
......@@ -66,6 +66,7 @@ struct joydev {
__u16 keypam[KEY_MAX - BTN_MISC];
__u8 absmap[ABS_MAX];
__u8 abspam[ABS_MAX];
__s16 abs[ABS_MAX];
};
struct joydev_list {
......@@ -121,7 +122,9 @@ static void joydev_event(struct input_handle *handle, unsigned int type, unsigne
case EV_ABS:
event.type = JS_EVENT_AXIS;
event.number = joydev->absmap[code];
event.value = joydev_correct(value, &joydev->corr[event.number]);
event.value = joydev_correct(value, joydev->corr + event.number);
if (event.value == joydev->abs[event.number]) return;
joydev->abs[event.number] = event.value;
break;
default:
......@@ -165,13 +168,14 @@ static int joydev_release(struct inode * inode, struct file * file)
listptr = &((*listptr)->next);
*listptr = (*listptr)->next;
if (!--list->joydev->open)
input_close_device(&list->joydev->handle);
if (!--list->joydev->used) {
input_unregister_minor(list->joydev->devfs);
joydev_table[list->joydev->minor] = NULL;
kfree(list->joydev);
if (!--list->joydev->open) {
if (list->joydev->exist) {
input_close_device(&list->joydev->handle);
} else {
input_unregister_minor(list->joydev->devfs);
joydev_table[list->joydev->minor] = NULL;
kfree(list->joydev);
}
}
kfree(list);
......@@ -187,9 +191,8 @@ static int joydev_open(struct inode *inode, struct file *file)
if (i > JOYDEV_MINORS || !joydev_table[i])
return -ENODEV;
if (!(list = kmalloc(sizeof(struct joydev_list), GFP_KERNEL))) {
if (!(list = kmalloc(sizeof(struct joydev_list), GFP_KERNEL)))
return -ENOMEM;
}
memset(list, 0, sizeof(struct joydev_list));
list->joydev = joydev_table[i];
......@@ -198,10 +201,9 @@ static int joydev_open(struct inode *inode, struct file *file)
file->private_data = list;
list->joydev->used++;
if (!list->joydev->open++)
input_open_device(&list->joydev->handle);
if (list->joydev->exist)
input_open_device(&list->joydev->handle);
return 0;
}
......@@ -228,8 +230,8 @@ static ssize_t joydev_read(struct file *file, char *buf, size_t count, loff_t *p
data.buttons = ((joydev->nkey > 0 && test_bit(joydev->keypam[0], input->key)) ? 1 : 0) |
((joydev->nkey > 1 && test_bit(joydev->keypam[1], input->key)) ? 2 : 0);
data.x = ((joydev_correct(input->abs[ABS_X], &joydev->corr[0]) / 256) + 128) >> joydev->glue.JS_CORR.x;
data.y = ((joydev_correct(input->abs[ABS_Y], &joydev->corr[1]) / 256) + 128) >> joydev->glue.JS_CORR.y;
data.x = (joydev->abs[0] / 256 + 128) >> joydev->glue.JS_CORR.x;
data.y = (joydev->abs[1] / 256 + 128) >> joydev->glue.JS_CORR.y;
if (copy_to_user(buf, &data, sizeof(struct JS_DATA_TYPE)))
return -EFAULT;
......@@ -274,13 +276,12 @@ static ssize_t joydev_read(struct file *file, char *buf, size_t count, loff_t *p
if (list->startup < joydev->nkey) {
event.type = JS_EVENT_BUTTON | JS_EVENT_INIT;
event.value = !!test_bit(joydev->keypam[list->startup], input->key);
event.number = list->startup;
event.value = !!test_bit(joydev->keypam[event.number], input->key);
} else {
event.type = JS_EVENT_AXIS | JS_EVENT_INIT;
event.value = joydev_correct(input->abs[joydev->abspam[list->startup - joydev->nkey]],
&joydev->corr[list->startup - joydev->nkey]);
event.number = list->startup - joydev->nkey;
event.value = joydev->abs[event.number];
}
if (copy_to_user(buf + retval, &event, sizeof(struct js_event)))
......@@ -407,7 +408,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
joydev->handle.handler = handler;
joydev->handle.private = joydev;
joydev->used = 1;
joydev->exist = 1;
for (i = 0; i < ABS_MAX; i++)
if (test_bit(i, dev->absbit)) {
......@@ -442,6 +443,8 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
joydev->corr[i].coef[1] = (dev->absmax[j] + dev->absmin[j]) / 2 + dev->absflat[j];
joydev->corr[i].coef[2] = (1 << 29) / ((dev->absmax[j] - dev->absmin[j]) / 2 - 2 * dev->absflat[j]);
joydev->corr[i].coef[3] = (1 << 29) / ((dev->absmax[j] - dev->absmin[j]) / 2 - 2 * dev->absflat[j]);
joydev->abs[i] = joydev_correct(dev->abs[j], joydev->corr + i);
}
joydev->devfs = input_register_minor("js%d", minor, JOYDEV_MINOR_BASE);
......@@ -455,10 +458,11 @@ static void joydev_disconnect(struct input_handle *handle)
{
struct joydev *joydev = handle->private;
if (joydev->open)
input_close_device(handle);
joydev->exist = 0;
if (!--joydev->used) {
if (joydev->open) {
input_close_device(handle);
} else {
input_unregister_minor(joydev->devfs);
joydev_table[joydev->minor] = NULL;
kfree(joydev);
......
/*
* $Id: mousedev.c,v 1.8 2000/05/28 17:31:36 vojtech Exp $
* $Id: mousedev.c,v 1.10 2000/06/23 09:23:00 vojtech Exp $
*
* Copyright (c) 1999-2000 Vojtech Pavlik
*
......@@ -47,7 +47,7 @@
#endif
struct mousedev {
int used;
int exist;
int open;
int minor;
wait_queue_head_t wait;
......@@ -172,22 +172,30 @@ static int mousedev_release(struct inode * inode, struct file * file)
struct input_handle *handle = mousedev_handler.handle;
while (handle) {
struct mousedev *mousedev = handle->private;
if (!mousedev->open)
input_close_device(handle);
if (!mousedev->open) {
if (mousedev->exist) {
input_close_device(&mousedev->handle);
} else {
input_unregister_minor(mousedev->devfs);
mousedev_table[mousedev->minor] = NULL;
kfree(mousedev);
}
}
handle = handle->hnext;
}
} else {
if (!mousedev_mix.open)
input_close_device(&list->mousedev->handle);
if (!mousedev_mix.open) {
if (list->mousedev->exist) {
input_close_device(&list->mousedev->handle);
} else {
input_unregister_minor(list->mousedev->devfs);
mousedev_table[list->mousedev->minor] = NULL;
kfree(list->mousedev);
}
}
}
}
if (!--list->mousedev->used) {
input_unregister_minor(list->mousedev->devfs);
mousedev_table[list->mousedev->minor] = NULL;
kfree(list->mousedev);
}
kfree(list);
return 0;
......@@ -210,20 +218,20 @@ static int mousedev_open(struct inode * inode, struct file * file)
mousedev_table[i]->list = list;
file->private_data = list;
list->mousedev->used++;
if (!list->mousedev->open++) {
if (list->mousedev->minor == MOUSEDEV_MIX) {
struct input_handle *handle = mousedev_handler.handle;
while (handle) {
struct mousedev *mousedev = handle->private;
if (!mousedev->open)
input_open_device(handle);
if (mousedev->exist)
input_open_device(handle);
handle = handle->hnext;
}
} else {
if (!mousedev_mix.open)
input_open_device(&list->mousedev->handle);
if (!mousedev_mix.open)
if (list->mousedev->exist)
input_open_device(&list->mousedev->handle);
}
}
......@@ -402,7 +410,7 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
memset(mousedev, 0, sizeof(struct mousedev));
init_waitqueue_head(&mousedev->wait);
mousedev->used = 1;
mousedev->exist = 1;
mousedev->minor = minor;
mousedev_table[minor] = mousedev;
......@@ -424,10 +432,13 @@ static void mousedev_disconnect(struct input_handle *handle)
{
struct mousedev *mousedev = handle->private;
if (mousedev->open || mousedev_mix.open)
input_close_device(handle);
mousedev->exist = 0;
if (!--mousedev->used) {
if (mousedev->open) {
input_close_device(handle);
} else {
if (mousedev_mix.open)
input_close_device(handle);
input_unregister_minor(mousedev->devfs);
mousedev_table[mousedev->minor] = NULL;
kfree(mousedev);
......@@ -449,7 +460,7 @@ static int __init mousedev_init(void)
memset(&mousedev_mix, 0, sizeof(struct mousedev));
init_waitqueue_head(&mousedev_mix.wait);
mousedev_table[MOUSEDEV_MIX] = &mousedev_mix;
mousedev_mix.used = 1;
mousedev_mix.exist = 1;
mousedev_mix.minor = MOUSEDEV_MIX;
mousedev_mix.devfs = input_register_minor("mice", MOUSEDEV_MIX, MOUSEDEV_MINOR_BASE);
......
This diff is collapsed.
This diff is collapsed.
......@@ -11,6 +11,9 @@
*
* See Documentation/usb/usb-serial.txt for more information on using this driver
*
* (06/23/2000) gkh
* Cleaned up debugging statements in a quest to find UHCI timeout bug.
*
* (04/27/2000) Ryan VanderBijl
* Fixed memory leak in visor_close
*
......@@ -80,10 +83,10 @@ struct usb_serial_device_type handspring_device = {
******************************************************************************/
static int visor_open (struct usb_serial_port *port, struct file *filp)
{
dbg("visor_open port %d", port->number);
dbg(__FUNCTION__ " - port %d", port->number);
if (port->active) {
dbg ("device already open");
dbg (__FUNCTION__ " - device already open");
return -EINVAL;
}
......@@ -91,7 +94,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
/*Start reading from the device*/
if (usb_submit_urb(port->read_urb))
dbg("usb_submit_urb(read bulk) failed");
dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed");
return (0);
}
......@@ -102,10 +105,10 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
struct usb_serial *serial = port->serial;
unsigned char *transfer_buffer = kmalloc (0x12, GFP_KERNEL);
dbg("visor_close port %d", port->number);
dbg(__FUNCTION__ " - port %d", port->number);
if (!transfer_buffer) {
err("visor_close: kmalloc(%d) failed.", 0x12);
err(__FUNCTION__ " - kmalloc(%d) failed.", 0x12);
} else {
/* send a shutdown message to the device */
usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_CLOSE_NOTIFICATION,
......@@ -122,7 +125,7 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
static void visor_throttle (struct usb_serial_port *port)
{
dbg("visor_throttle port %d", port->number);
dbg(__FUNCTION__ " - port %d", port->number);
usb_unlink_urb (port->read_urb);
......@@ -132,10 +135,10 @@ static void visor_throttle (struct usb_serial_port *port)
static void visor_unthrottle (struct usb_serial_port *port)
{
dbg("visor_unthrottle port %d", port->number);
dbg(__FUNCTION__ " - port %d", port->number);
if (usb_unlink_urb (port->read_urb))
dbg("usb_submit_urb(read bulk) failed");
dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed");
return;
}
......@@ -148,20 +151,20 @@ static int visor_startup (struct usb_serial *serial)
unsigned char *transfer_buffer = kmalloc (256, GFP_KERNEL);
if (!transfer_buffer) {
err("visor_startup: kmalloc(%d) failed.", 256);
err(__FUNCTION__ " - kmalloc(%d) failed.", 256);
return -ENOMEM;
}
dbg("visor_startup");
dbg(__FUNCTION__);
dbg("visor_setup: Set config to 1");
dbg(__FUNCTION__ " - Set config to 1");
usb_set_configuration (serial->dev, 1);
/* send a get connection info request */
response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
if (response < 0) {
err("visor_startup: error getting connection information");
err(__FUNCTION__ " - error getting connection information");
} else {
struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
char *string;
......@@ -195,7 +198,7 @@ static int visor_startup (struct usb_serial *serial)
response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
if (response < 0) {
err("visor_startup: error getting bytes available request");
err(__FUNCTION__ " - error getting bytes available request");
}
kfree (transfer_buffer);
......
This diff is collapsed.
......@@ -139,7 +139,8 @@ struct us_unusual_dev {
/* we search the list based on these parameters */
__u16 idVendor;
__u16 idProduct;
__u16 bcdDevice;
__u16 bcdDeviceMin;
__u16 bcdDeviceMax;
/* the list specifies these parameters */
const char* name;
......
......@@ -120,6 +120,7 @@ if [ "$CONFIG_FB" = "y" ]; then
tristate ' ATI Mach64 display support (EXPERIMENTAL)' CONFIG_FB_ATY
tristate ' ATI Rage 128 display support (EXPERIMENTAL)' CONFIG_FB_ATY128
bool ' 3Dfx Banshee/Voodoo3 display support (EXPERIMENTAL)' CONFIG_FB_3DFX
tristate ' SIS 630/540 display support (EXPERIMENTAL)' CONFIG_FB_SIS
fi
fi
if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
......
......@@ -43,9 +43,10 @@
#define FALSE 0
#define TRUE 1
/* Draw Function */
/* Draw Function
#define FBIOGET_GLYPH 0x4620
#define FBIOGET_HWCINFO 0x4621
*/
#define BR(x) (0x8200 | (x) << 2)
#define BITBLT 0x00000000
......@@ -115,7 +116,8 @@
#define MMIO_SIZE 0x20000 /* 128K MMIO capability */
#define MAX_ROM_SCAN 0x10000
#define RESERVED_MEM_SIZE 0x400000 /* 4M */
#define RESERVED_MEM_SIZE_4M 0x400000 /* 4M */
#define RESERVED_MEM_SIZE_8M 0x800000 /* 8M */
/* Mode set stuff */
#define DEFAULT_MODE 0
......@@ -173,9 +175,9 @@ static struct board {
const char *name;
} dev_list[] = {
{
PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS_300, "SIS 300"}, {
PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS_540, "SIS 540"}, {
PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS_630, "SIS 630"}, {
PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_300, "SIS 300"}, {
PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_540, "SIS 540"}, {
PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, "SIS 630"}, {
0, 0, NULL}
};
......@@ -1020,8 +1022,11 @@ static int sisfb_heap_init(void)
struct OH *poh;
u8 jTemp, tq_state;
heap_start = (unsigned long) ivideo.video_vbase + RESERVED_MEM_SIZE;
//heap_start = (unsigned long)ivideo.video_vbase + (video_size - RESERVED_MEM_SIZE);
if(ivideo.video_size > 0x800000) /* video ram is large than 8M */
heap_start = (unsigned long) ivideo.video_vbase + RESERVED_MEM_SIZE_8M;
else
heap_start = (unsigned long) ivideo.video_vbase + RESERVED_MEM_SIZE_4M;
heap_end = (unsigned long) ivideo.video_vbase + ivideo.video_size;
heap_size = heap_end - heap_start;
......@@ -1398,6 +1403,7 @@ static u32 get_reg3(u16 port)
static u16 get_modeID_length(unsigned long ROMAddr, u16 ModeNo)
{
#if 0
unsigned char ModeID;
u16 modeidlength;
u16 usModeIDOffset;
......@@ -1411,6 +1417,8 @@ static u16 get_modeID_length(unsigned long ROMAddr, u16 ModeNo)
ModeID = *((unsigned char *) (ROMAddr + usModeIDOffset));
}
return (modeidlength);
#endif
return(10);
}
static int search_modeID(unsigned long ROMAddr, u16 ModeNo)
......@@ -2467,7 +2475,11 @@ static int sisfb_get_fix(struct fb_fix_screeninfo *fix, int con,
strcpy(fix->id, fb_info.modename);
fix->smem_start = ivideo.video_base;
fix->smem_len = RESERVED_MEM_SIZE; /* reserved for Xserver */
if(ivideo.video_size > 0x800000)
fix->smem_len = RESERVED_MEM_SIZE_8M; /* reserved for Xserver */
else
fix->smem_len = RESERVED_MEM_SIZE_4M; /* reserved for Xserver */
fix->type = video_type;
fix->type_aux = 0;
if (ivideo.video_bpp == 8)
......
......@@ -450,7 +450,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
if (elf_ppnt->p_type == PT_INTERP) {
retval = -EINVAL;
if (elf_interpreter)
goto out_free_interp;
goto out_free_dentry;
/* This is the program interpreter used for
* shared libraries - for now assume that this
......
......@@ -484,6 +484,8 @@ int flush_old_exec(struct linux_binprm * bprm)
/* This is the point of no return */
release_old_signals(oldsig);
current->sas_ss_sp = current->sas_ss_size = 0;
if (current->euid == current->uid && current->egid == current->gid)
current->dumpable = 1;
name = bprm->filename;
......@@ -585,21 +587,18 @@ int prepare_binprm(struct linux_binprm *bprm)
cap_clear(bprm->cap_effective);
/* To support inheritance of root-permissions and suid-root
* executables under compatibility mode, we raise the
* effective and inherited bitmasks of the executable file
* (translation: we set the executable "capability dumb" and
* set the allowed set to maximum). We don't set any forced
* bits.
* executables under compatibility mode, we raise all three
* capability sets for the file.
*
* If only the real uid is 0, we only raise the inheritable
* bitmask of the executable file (translation: we set the
* allowed set to maximum and the application to "capability
* smart").
* and permitted sets of the executable file.
*/
if (!issecure(SECURE_NOROOT)) {
if (bprm->e_uid == 0 || current->uid == 0)
if (bprm->e_uid == 0 || current->uid == 0) {
cap_set_full(bprm->cap_inheritable);
cap_set_full(bprm->cap_permitted);
}
if (bprm->e_uid == 0)
cap_set_full(bprm->cap_effective);
}
......@@ -610,10 +609,12 @@ int prepare_binprm(struct linux_binprm *bprm)
* privilege does not go against other system constraints.
* The new Permitted set is defined below -- see (***). */
{
kernel_cap_t working =
cap_combine(bprm->cap_permitted,
cap_intersect(bprm->cap_inheritable,
current->cap_inheritable));
kernel_cap_t permitted, working;
permitted = cap_intersect(bprm->cap_permitted, cap_bset);
working = cap_intersect(bprm->cap_inheritable,
current->cap_inheritable);
working = cap_combine(permitted, working);
if (!cap_issubset(working, current->cap_permitted)) {
cap_raised = 1;
}
......@@ -646,26 +647,29 @@ int prepare_binprm(struct linux_binprm *bprm)
* The formula used for evolving capabilities is:
*
* pI' = pI
* (***) pP' = fP | (fI & pI)
* (***) pP' = (fP & X) | (fI & pI)
* pE' = pP' & fE [NB. fE is 0 or ~0]
*
* I=Inheritable, P=Permitted, E=Effective // p=process, f=file
* ' indicates post-exec().
* ' indicates post-exec(), and X is the global 'cap_bset'.
*/
void compute_creds(struct linux_binprm *bprm)
{
int new_permitted = cap_t(bprm->cap_permitted) |
(cap_t(bprm->cap_inheritable) &
cap_t(current->cap_inheritable));
kernel_cap_t new_permitted, working;
new_permitted = cap_intersect(bprm->cap_permitted, cap_bset);
working = cap_intersect(bprm->cap_inheritable,
current->cap_inheritable);
new_permitted = cap_combine(new_permitted, working);
/* For init, we want to retain the capabilities set
* in the init_task struct. Thus we skip the usual
* capability rules */
if (current->pid != 1) {
cap_t(current->cap_permitted) = new_permitted;
cap_t(current->cap_effective) = new_permitted &
cap_t(bprm->cap_effective);
current->cap_permitted = new_permitted;
current->cap_effective =
cap_intersect(new_permitted, bprm->cap_effective);
}
/* AUD: Audit candidate if current->cap_effective is set */
......
......@@ -235,7 +235,10 @@ lockd_up(void)
}
if ((error = svc_makesock(serv, IPPROTO_UDP, 0)) < 0
|| (error = svc_makesock(serv, IPPROTO_TCP, 0)) < 0) {
#ifdef CONFIG_NFSD_TCP
|| (error = svc_makesock(serv, IPPROTO_TCP, 0)) < 0
#endif
) {
if (warned++ == 0)
printk(KERN_WARNING
"lockd_up: makesock failed, error=%d\n", error);
......
......@@ -79,7 +79,7 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
goto out_unlock;
memset(file, 0, sizeof(*file));
file->f_handle = *f;
memcpy(&file->f_handle, f, sizeof(struct nfs_fh));
file->f_hash = hash;
init_MUTEX(&file->f_sema);
......
......@@ -86,7 +86,7 @@ nlm_decode_fh(u32 *p, struct nfs_fh *f)
if ((len = ntohl(*p++)) != NFS2_FHSIZE) {
printk(KERN_NOTICE
"lockd: bad fhandle size %x (should be %u)\n",
"lockd: bad fhandle size %x (should be %Zu)\n",
len, NFS2_FHSIZE);
return NULL;
}
......
......@@ -30,8 +30,6 @@
#include <linux/nfs_mount.h>
#include <linux/pagemap.h>
#include <asm/segment.h> /* for fs functions */
#define NFS_PARANOIA 1
/* #define NFS_DEBUG_VERBOSE 1 */
......
......@@ -30,7 +30,6 @@
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/segment.h>
#include <asm/system.h>
#define NFSDBG_FACILITY NFSDBG_FILE
......
......@@ -705,7 +705,7 @@ nfs_fhget(struct dentry *dentry, struct nfs_fh *fhandle,
(long long)fattr->fileid);
/* Install the file handle in the dentry */
*((struct nfs_fh *) dentry->d_fsdata) = *fhandle;
memcpy(dentry->d_fsdata, fhandle, sizeof(struct nfs_fh));
#ifdef CONFIG_NFS_SNAPSHOT
/*
......
......@@ -15,8 +15,6 @@
#include <linux/nfs3.h>
#include <linux/nfs_fs.h>
#include <asm/segment.h>
#define NFSDBG_FACILITY NFSDBG_PROC
/*
......
......@@ -42,8 +42,6 @@
#include <linux/nfs2.h>
#include <linux/nfs_fs.h>
#include <asm/segment.h>
#define NFSDBG_FACILITY NFSDBG_PROC
/*
......@@ -203,7 +201,7 @@ nfs_proc_mknod(struct dentry *dir, struct qstr *name, struct iattr *sattr,
if (S_ISFIFO(mode)) {
sattr->ia_mode = (mode & ~S_IFMT) | S_IFCHR;
sattr->ia_valid &= ~ATTR_SIZE;
} else if (S_ISCHR(rdev) || S_ISBLK(rdev)) {
} else if (S_ISCHR(mode) || S_ISBLK(mode)) {
sattr->ia_valid |= ATTR_SIZE;
sattr->ia_size = rdev; /* get out your barf bag */
}
......
......@@ -30,7 +30,6 @@
#include <linux/nfs_flushd.h>
#include <linux/smp_lock.h>
#include <asm/segment.h>
#include <asm/system.h>
#define NFSDBG_FACILITY NFSDBG_PAGECACHE
......
......@@ -430,13 +430,12 @@ exp_rootfh(struct svc_client *clp, kdev_t dev, ino_t ino,
* fh must be initialized before calling fh_compose
*/
fh_init(&fh, maxsize);
if (fh_compose(&fh, exp, nd.dentry))
if (fh_compose(&fh, exp, dget(nd.dentry)))
err = -EINVAL;
else
err = 0;
memcpy(f, &fh.fh_handle, sizeof(struct knfsd_fh));
fh_put(&fh);
return err;
out:
path_release(&nd);
......
......@@ -658,7 +658,7 @@ struct svc_procedure nfsd_procedures3[22] = {
PROC(mknod, mknod, create, fhandle2, RC_REPLBUFF),
PROC(remove, dirop, wccstat, fhandle, RC_REPLBUFF),
PROC(rmdir, dirop, wccstat, fhandle, RC_REPLBUFF),
PROC(rename, rename, rename, fhandle, RC_REPLBUFF),
PROC(rename, rename, rename, fhandle2, RC_REPLBUFF),
PROC(link, link, link, fhandle2, RC_REPLBUFF),
PROC(readdir, readdir, readdir, fhandle, RC_NOCACHE),
PROC(readdirplus,readdirplus, readdir, fhandle, RC_NOCACHE),
......
......@@ -698,17 +698,9 @@ encode_entry(struct readdir_cd *cd, const char *name,
cd->eob = 1;
return -EINVAL;
}
*p++ = xdr_one; /* mark entry present */
p = xdr_encode_hyper(p, ino); /* file id */
p[slen - 1] = 0; /* don't leak kernel data */
#ifdef XDR_ENCODE_STRING_TAKES_LENGTH
p = xdr_encode_string(p, name, namlen); /* name length & name */
#else
/* just like nfsproc.c */
*p++ = htonl((u32) namlen);
memcpy(p, name, namlen);
p += slen;
#endif
*p++ = xdr_one; /* mark entry present */
p = xdr_encode_hyper(p, ino); /* file id */
p = xdr_encode_array(p, name, namlen);/* name length & name */
cd->offset = p; /* remember pointer */
p = xdr_encode_hyper(p, NFS_OFFSET_MAX); /* offset of next entry */
......
......@@ -60,7 +60,7 @@ nfsd_cache_init(void)
nfscache = (struct svc_cacherep *)
__get_free_pages(GFP_KERNEL, order);
if (!nfscache) {
printk (KERN_ERR "nfsd: cannot allocate %Zu bytes for reply cache\n", i);
printk (KERN_ERR "nfsd: cannot allocate %d bytes for reply cache\n", i);
return;
}
memset(nfscache, 0, i);
......@@ -70,7 +70,7 @@ nfsd_cache_init(void)
if (!hash_list) {
free_pages ((unsigned long)nfscache, order);
nfscache = NULL;
printk (KERN_ERR "nfsd: cannot allocate %Zu bytes for hash list\n", i);
printk (KERN_ERR "nfsd: cannot allocate %d bytes for hash list\n", i);
return;
}
......
......@@ -367,7 +367,7 @@ find_fh_dentry(struct super_block *sb, ino_t ino, int generation, ino_t dirino,
/* It's a directory, or we are required to confirm the file's
* location in the tree.
*/
dprintk("nfs_fh: need to look harder for %d/%ld\n",sb->s_dev,(long) ino);
dprintk("nfs_fh: need to look harder for %d/%ld\n",sb->s_dev,ino);
down(&sb->s_nfsd_free_path_sem);
/* claiming the semaphore might have allowed things to get fixed up */
......
......@@ -412,11 +412,9 @@ nfssvc_encode_entry(struct readdir_cd *cd, const char *name,
cd->eob = 1;
return -EINVAL;
}
*p++ = xdr_one; /* mark entry present */
*p++ = htonl((u32) ino); /* file id */
*p++ = htonl((u32) namlen); /* name length & name */
memcpy(p, name, namlen);
p += slen;
*p++ = xdr_one; /* mark entry present */
*p++ = htonl((u32) ino); /* file id */
p = xdr_encode_array(p, name, namlen);/* name length & name */
cd->offset = p; /* remember pointer */
*p++ = ~(u32) 0; /* offset of next entry */
......
......@@ -30,6 +30,8 @@
#include <linux/unistd.h>
#include <linux/malloc.h>
#include <linux/in.h>
#define __NO_VERSION__
#include <linux/module.h>
#include <linux/sunrpc/svc.h>
#include <linux/nfsd/nfsd.h>
......@@ -451,7 +453,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
goto out_nfserr;
memset(filp, 0, sizeof(*filp));
filp->f_op = inode->i_fop;
filp->f_op = fops_get(inode->i_fop);
atomic_set(&filp->f_count, 1);
filp->f_dentry = dentry;
if (access & MAY_WRITE) {
......@@ -467,6 +469,7 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
if (filp->f_op && filp->f_op->open) {
err = filp->f_op->open(inode, filp);
if (err) {
fops_put(filp->f_op);
if (access & MAY_WRITE)
put_write_access(inode);
......@@ -494,6 +497,7 @@ nfsd_close(struct file *filp)
if (filp->f_op && filp->f_op->release)
filp->f_op->release(inode, filp);
fops_put(filp->f_op);
if (filp->f_mode & FMODE_WRITE)
put_write_access(inode);
}
......
......@@ -66,8 +66,10 @@ static void __init copro_timeout(void)
static double __initdata x = 4195835.0;
static double __initdata y = 3145727.0;
#ifdef CONFIG_X86_XMM
static float __initdata zero[4] = { 0.0, 0.0, 0.0, 0.0 };
static float __initdata one[4] = { 1.0, 1.0, 1.0, 1.0 };
#endif
static void __init check_fpu(void)
{
......
#ifndef __ASM_IO_APIC_H
#define __ASM_IO_APIC_H
#include <linux/config.h>
#include <asm/types.h>
/*
......
......@@ -12,8 +12,6 @@
* Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
*/
#include <linux/config.h>
#include <asm/mman.h>
#include <asm/page.h>
#include <asm/processor.h>
......@@ -113,7 +111,6 @@
#include <asm/bitops.h>
#include <asm/mmu_context.h>
#include <asm/processor.h>
#include <asm/system.h>
/*
......
......@@ -4,6 +4,10 @@
* Andrew G. Morgan <morgan@transmeta.com>
* Alexander Kjeldaas <astor@guardian.no>
* with help from Aleph1, Roland Buresund and Andrew Main.
*
* See here for the libcap library ("POSIX draft" compliance):
*
* ftp://linux.kernel.org/pub/linux/libs/security/linux-privs/kernel-2.2/
*/
#ifndef _LINUX_CAPABILITY_H
......@@ -170,8 +174,8 @@ typedef __u32 kernel_cap_t;
#define CAP_IPC_OWNER 15
/* Insert and remove kernel modules */
/* Insert and remove kernel modules - modify kernel without limit */
/* Modify cap_bset */
#define CAP_SYS_MODULE 16
/* Allow ioperm/iopl access */
......@@ -294,12 +298,12 @@ extern kernel_cap_t cap_bset;
#define CAP_EMPTY_SET to_cap_t(0)
#define CAP_FULL_SET to_cap_t(~0)
#define CAP_INIT_EFF_SET to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP))
#define CAP_INIT_INH_SET to_cap_t(~0 & ~CAP_TO_MASK(CAP_SETPCAP))
#define CAP_INIT_INH_SET to_cap_t(0)
#define CAP_TO_MASK(x) (1 << (x))
#define cap_raise(c, flag) (cap_t(c) |= CAP_TO_MASK(flag))
#define cap_lower(c, flag) (cap_t(c) &= ~CAP_TO_MASK(flag))
#define cap_raised(c, flag) (cap_t(c) & CAP_TO_MASK(flag) & cap_bset)
#define cap_raised(c, flag) (cap_t(c) & CAP_TO_MASK(flag))
static inline kernel_cap_t cap_combine(kernel_cap_t a, kernel_cap_t b)
{
......
......@@ -27,6 +27,8 @@
#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank)
#define FBIO_ALLOC 0x4613
#define FBIO_FREE 0x4614
#define FBIOGET_GLYPH 0x4615
#define FBIOGET_HWCINFO 0x4616
#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
#define FB_TYPE_PLANES 1 /* Non interleaved planes */
......
......@@ -329,11 +329,12 @@
#define PCI_DEVICE_ID_SI_6205 0x0205
#define PCI_DEVICE_ID_SI_501 0x0406
#define PCI_DEVICE_ID_SI_496 0x0496
#define PCI_DEVICE_ID_SI_300 0x0300
#define PCI_DEVICE_ID_SI_530 0x0530
#define PCI_DEVICE_ID_SI_540 0x0540
#define PCI_DEVICE_ID_SI_540 0x5300
#define PCI_DEVICE_ID_SI_601 0x0601
#define PCI_DEVICE_ID_SI_620 0x0620
#define PCI_DEVICE_ID_SI_630 0x0630
#define PCI_DEVICE_ID_SI_630 0x6300
#define PCI_DEVICE_ID_SI_5107 0x5107
#define PCI_DEVICE_ID_SI_5511 0x5511
#define PCI_DEVICE_ID_SI_5513 0x5513
......@@ -1284,8 +1285,3 @@
#define PCI_DEVICE_ID_ARK_STING 0xa091
#define PCI_DEVICE_ID_ARK_STINGARK 0xa099
#define PCI_DEVICE_ID_ARK_2000MT 0xa0a1
#define PCI_VENDOR_ID_SIS 0x1039
#define PCI_DEVICE_ID_SIS_300 0x0300
#define PCI_DEVICE_ID_SIS_540 0x5300
#define PCI_DEVICE_ID_SIS_630 0x6300
......@@ -233,6 +233,25 @@ static struct dev_name_struct {
{ "dasdg", (DASD_MAJOR << MINORBITS) + (6 << 2) },
{ "dasdh", (DASD_MAJOR << MINORBITS) + (7 << 2) },
#endif
#if defined(CONFIG_BLK_CPQ_DA) || defined(CONFIG_BLK_CPQ_DA_MODULE)
{ "ida/c0d0p",0x4800 },
{ "ida/c0d1p",0x4810 },
{ "ida/c0d2p",0x4820 },
{ "ida/c0d3p",0x4830 },
{ "ida/c0d4p",0x4840 },
{ "ida/c0d5p",0x4850 },
{ "ida/c0d6p",0x4860 },
{ "ida/c0d7p",0x4870 },
{ "ida/c0d8p",0x4880 },
{ "ida/c0d9p",0x4890 },
{ "ida/c0d10p",0x48A0 },
{ "ida/c0d11p",0x48B0 },
{ "ida/c0d12p",0x48C0 },
{ "ida/c0d13p",0x48D0 },
{ "ida/c0d14p",0x48E0 },
{ "ida/c0d15p",0x48F0 },
#endif
{ NULL, 0 }
};
......
......@@ -8,6 +8,8 @@
#include <linux/mm.h>
#include <asm/uaccess.h>
kernel_cap_t cap_bset = CAP_INIT_EFF_SET;
/* Note: never hold tasklist_lock while spinning for this one */
spinlock_t task_capability_lock = SPIN_LOCK_UNLOCKED;
......@@ -17,8 +19,6 @@ spinlock_t task_capability_lock = SPIN_LOCK_UNLOCKED;
* uninteresting and/or not to be changed.
*/
kernel_cap_t cap_bset = CAP_FULL_SET;
asmlinkage long sys_capget(cap_user_header_t header, cap_user_data_t dataptr)
{
int error, pid;
......
......@@ -95,9 +95,8 @@ int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
/* Drop the "current user" thing */
free_uid(current);
/* Give kmod all privileges.. */
/* Give kmod all effective privileges.. */
current->uid = current->euid = current->fsuid = 0;
cap_set_full(current->cap_inheritable);
cap_set_full(current->cap_effective);
/* Allow execve args to be in kernel space. */
......
......@@ -803,8 +803,11 @@ int proc_dointvec(ctl_table *table, int write, struct file *filp,
int proc_dointvec_bset(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp)
{
if (!capable(CAP_SYS_MODULE)) {
return -EPERM;
}
return do_proc_dointvec(table,write,filp,buffer,lenp,1,
(current->pid == 1) ? OP_SET : OP_AND);
(current->pid == 1) ? OP_SET : OP_AND);
}
int proc_dointvec_minmax(ctl_table *table, int write, struct file *filp,
......
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