diff options
| author | David S. Miller <davem@nuts.ninka.net> | 2002-09-03 00:49:04 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-09-03 00:49:04 -0700 |
| commit | 3d5fa36bf0c232f70db4bd15a50bbe322800bcdb (patch) | |
| tree | 5ada31234f00d9b893c77e713ef7a3e900550041 | |
| parent | 96ca2f806ceaf0f8fbde2548f51d6afc0a0fe7e3 (diff) | |
| parent | 1314cad1540faf6b81e455b2267ce23c2fa1d698 (diff) | |
Merge nuts.ninka.net:/home/davem/src/BK/network-2.5
into nuts.ninka.net:/home/davem/src/BK/net-2.5
122 files changed, 224 insertions, 350 deletions
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index b4705a70ab3c..e8b33c53ddd7 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile @@ -6,7 +6,7 @@ EXTRA_TARGETS := kernel.o head.o init_task.o O_TARGET := kernel.o -export-objs := mca.o msr.o i386_ksyms.o time.o +export-objs := mca.o i386_ksyms.o time.o obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \ diff --git a/arch/ia64/config.in b/arch/ia64/config.in index b7b69cda6dc1..75e175f8b4e9 100644 --- a/arch/ia64/config.in +++ b/arch/ia64/config.in @@ -76,10 +76,6 @@ if [ "$CONFIG_IA64_SGI_SN1" = "y" -o "$CONFIG_IA64_SGI_SN2" = "y" ]; then bool ' Enable SGI Medusa Simulator Support' CONFIG_IA64_SGI_SN_SIM bool ' Enable autotest (llsc). Option to run cache test instead of booting' \ CONFIG_IA64_SGI_AUTOTEST - define_bool CONFIG_DEVFS_FS y - if [ "$CONFIG_DEVFS_FS" = "y" ]; then - bool ' Enable DEVFS Debug Code' CONFIG_DEVFS_DEBUG - fi bool ' Enable protocol mode for the L1 console' CONFIG_SERIAL_SGI_L1_PROTOCOL define_bool CONFIG_DISCONTIGMEM y define_bool CONFIG_IA64_MCA y diff --git a/arch/m68k/hp300/Makefile b/arch/m68k/hp300/Makefile index 29decf03d3d0..5b7021cfcb6a 100644 --- a/arch/m68k/hp300/Makefile +++ b/arch/m68k/hp300/Makefile @@ -9,8 +9,6 @@ O_TARGET := hp300.o -export-objs := ksyms.o - obj-y := ksyms.o config.o ints.o time.o reboot.o obj-$(CONFIG_VT) += hil.o diff --git a/arch/m68k/sun3x/Makefile b/arch/m68k/sun3x/Makefile index 6c6c5eda4e07..2877c87fed9f 100644 --- a/arch/m68k/sun3x/Makefile +++ b/arch/m68k/sun3x/Makefile @@ -9,6 +9,8 @@ O_TARGET := sun3x.o +export-objs := sun3x_ksyms.o + obj-y := config.o time.o dvma.o prom.o include $(TOPDIR)/Rules.make diff --git a/arch/mips/au1000/common/Makefile b/arch/mips/au1000/common/Makefile index d41c1a83c8e7..41b01b04168b 100644 --- a/arch/mips/au1000/common/Makefile +++ b/arch/mips/au1000/common/Makefile @@ -8,6 +8,8 @@ O_TARGET := au1000.o +export-objs := serial.o + obj-y := prom.o dbg_io.o int-handler.o irq.o puts.o time.o reset.o obj-$(CONFIG_AU1000_UART) += serial.o diff --git a/arch/ppc/amiga/Makefile b/arch/ppc/amiga/Makefile index e2442dba6078..fd7b7d7b6e76 100644 --- a/arch/ppc/amiga/Makefile +++ b/arch/ppc/amiga/Makefile @@ -11,8 +11,6 @@ O_TARGET := amiga.o -export-objs := amiga_ksyms.o - obj-y := config.o amiints.o cia.o time.o bootinfo.o amisound.o \ chipram.o amiga_ksyms.o diff --git a/drivers/acpi/Config.in b/drivers/acpi/Config.in index 92563b3c24ad..4017cca560b4 100644 --- a/drivers/acpi/Config.in +++ b/drivers/acpi/Config.in @@ -32,7 +32,7 @@ if [ "$CONFIG_X86" = "y" ]; then tristate ' Processor' CONFIG_ACPI_PROCESSOR dep_tristate ' Thermal Zone' CONFIG_ACPI_THERMAL $CONFIG_ACPI_PROCESSOR if [ "$CONFIG_NUMA" = "y" ]; then - bool ' NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA + dep_bool ' NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA fi tristate ' Toshiba Laptop Extras' CONFIG_ACPI_TOSHIBA bool ' Debug Statements' CONFIG_ACPI_DEBUG @@ -83,7 +83,7 @@ if [ "$CONFIG_IA64" = "y" ]; then tristate ' Processor' CONFIG_ACPI_PROCESSOR dep_tristate ' Thermal Zone' CONFIG_ACPI_THERMAL $CONFIG_ACPI_PROCESSOR if [ "$CONFIG_NUMA" = "y" ]; then - bool ' NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA + dep_bool ' NUMA support' CONFIG_ACPI_NUMA $CONFIG_NUMA fi bool ' Debug Statements' CONFIG_ACPI_DEBUG endmenu diff --git a/drivers/base/fs/Makefile b/drivers/base/fs/Makefile index 814a2a7e6743..d4bcde25fda2 100644 --- a/drivers/base/fs/Makefile +++ b/drivers/base/fs/Makefile @@ -1,5 +1,5 @@ obj-y := device.o bus.o driver.o class.o intf.o -export-objs := device.o bus.o driver.o class.o intf.o +export-objs := device.o bus.o driver.o class.o include $(TOPDIR)/Rules.make diff --git a/drivers/block/Makefile b/drivers/block/Makefile index 75cc2b2154ce..2b40242f3ab2 100644 --- a/drivers/block/Makefile +++ b/drivers/block/Makefile @@ -8,8 +8,8 @@ # In the future, some of these should be built conditionally. # -export-objs := elevator.o ll_rw_blk.o blkpg.o loop.o genhd.o \ - block_ioctl.o acsi.o +export-objs := elevator.o ll_rw_blk.o loop.o genhd.o acsi.o \ + block_ioctl.o obj-y := elevator.o ll_rw_blk.o blkpg.o genhd.o block_ioctl.o diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 0e222083baa5..aa262a8ce867 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -2295,16 +2295,15 @@ static inline void end_request(struct request *req, int uptodate) { kdev_t dev = req->rq_dev; - if (end_that_request_first(req, uptodate, req->hard_cur_sectors)) + if (end_that_request_first(req, uptodate, current_count_sectors)) return; add_blkdev_randomness(major(dev)); floppy_off(DEVICE_NR(dev)); blkdev_dequeue_request(req); end_that_request_last(req); - /* Get the next request */ - req = elv_next_request(QUEUE); - CURRENT = req; + /* We're done with the request */ + CURRENT = NULL; } @@ -2335,27 +2334,8 @@ static void request_done(int uptodate) /* unlock chained buffers */ spin_lock_irqsave(q->queue_lock, flags); - while (current_count_sectors && CURRENT && - current_count_sectors >= req->current_nr_sectors){ - current_count_sectors -= req->current_nr_sectors; - req->nr_sectors -= req->current_nr_sectors; - req->sector += req->current_nr_sectors; - end_request(req, 1); - } + end_request(req, 1); spin_unlock_irqrestore(q->queue_lock, flags); - - if (current_count_sectors && CURRENT) { - /* "unlock" last subsector */ - req->buffer += current_count_sectors <<9; - req->current_nr_sectors -= current_count_sectors; - req->nr_sectors -= current_count_sectors; - req->sector += current_count_sectors; - return; - } - - if (current_count_sectors && !CURRENT) - DPRINT("request list destroyed in floppy request done\n"); - } else { if (rq_data_dir(req) == WRITE) { /* record write error information */ diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 79c8f46da27c..000f8e5ce65d 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -1992,11 +1992,11 @@ int end_that_request_first(struct request *req, int uptodate, int nr_sectors) * not a complete bvec done */ if (unlikely(nsect > nr_sectors)) { - int residual = (nsect - nr_sectors) << 9; + int partial = nr_sectors << 9; - bio->bi_size -= residual; - bio_iovec(bio)->bv_offset += residual; - bio_iovec(bio)->bv_len -= residual; + bio->bi_size -= partial; + bio_iovec(bio)->bv_offset += partial; + bio_iovec(bio)->bv_len -= partial; blk_recalc_rq_sectors(req, nr_sectors); blk_recalc_rq_segments(req); return 1; diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c index c822f2d3546e..2b2625b5ba2f 100644 --- a/drivers/cdrom/sbpcd.c +++ b/drivers/cdrom/sbpcd.c @@ -1307,7 +1307,7 @@ static int cmd_out_T(void) static int cc_DriveReset(void); int i, j, l=0, m, ntries; - long flags; + unsigned long flags; D_S[d].error_state=0; D_S[d].b3=0; diff --git a/drivers/char/Makefile b/drivers/char/Makefile index 3c89fb850c2b..d1f554721d39 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile @@ -12,10 +12,9 @@ obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. -export-objs := busmouse.o console.o keyboard.o sysrq.o \ - misc.o pty.o random.o selection.o \ - sonypi.o tty_io.o tty_ioctl.o generic_serial.o rtc.o \ - ip2main.o nvram.o +export-objs := busmouse.o console.o generic_serial.o ip2main.o \ + ite_gpio.o misc.o nvram.o pty.o random.o rtc.o \ + selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o obj-$(CONFIG_VT) += vt.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o obj-$(CONFIG_HW_CONSOLE) += console.o defkeymap.o diff --git a/drivers/char/ftape/lowlevel/Makefile b/drivers/char/ftape/lowlevel/Makefile index c2676897f4b5..e600d4add694 100644 --- a/drivers/char/ftape/lowlevel/Makefile +++ b/drivers/char/ftape/lowlevel/Makefile @@ -23,8 +23,6 @@ # driver for Linux. # -export-objs := ftape_syms.o - obj-$(CONFIG_FTAPE) += ftape.o ftape-objs := ftape-init.o fdc-io.o fdc-isr.o \ diff --git a/drivers/char/sonypi.h b/drivers/char/sonypi.h index 87683ef82096..5b64e7c533dd 100644 --- a/drivers/char/sonypi.h +++ b/drivers/char/sonypi.h @@ -258,7 +258,7 @@ struct sonypi_device { while (--n && (command)) \ udelay(1); \ if (!n && (verbose || !quiet)) \ - printk(KERN_WARNING "sonypi command failed at " __FILE__ " : " __FUNCTION__ "(line %d)\n", __LINE__); \ + printk(KERN_WARNING "sonypi command failed at %s : %s(line %d)\n", __FILE__, __FUNCTION__, __LINE__); \ } #endif /* __KERNEL__ */ diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 370317b2104b..ddc37ef904c6 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -1458,15 +1458,9 @@ static int tty_fasync(int fd, struct file * filp, int on) if (on) { if (!waitqueue_active(&tty->read_wait)) tty->minimum_to_wake = 1; - if (filp->f_owner.pid == 0) { - retval = security_ops->file_set_fowner(filp); - if (retval) - return retval; - - filp->f_owner.pid = (-tty->pgrp) ? : current->pid; - filp->f_owner.uid = current->uid; - filp->f_owner.euid = current->euid; - } + retval = f_setown(filp, (-tty->pgrp) ? : current->pid, 0); + if (retval) + return retval; } else { if (!tty->fasync && !waitqueue_active(&tty->read_wait)) tty->minimum_to_wake = N_TTY_BUF_SIZE; diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile index 17545927964b..33ef7be099e9 100644 --- a/drivers/i2c/Makefile +++ b/drivers/i2c/Makefile @@ -3,7 +3,7 @@ # export-objs := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o \ - i2c-algo-ite.o i2c-proc.o + i2c-algo-ite.o i2c-proc.o i2c-algo-ibm_ocp.o obj-$(CONFIG_I2C) += i2c-core.o obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index 42c807a6fb1f..6179b68b3621 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile @@ -7,7 +7,7 @@ # Note : at this point, these files are compiled on all systems. # In the future, some of these should be built conditionally. # -export-objs := ide-taskfile.o ide.o ide-probe.o ataraid.o +export-objs := ide-taskfile.o ide.o ide-probe.o obj-$(CONFIG_BLK_DEV_IDE) += ide-mod.o ide-probe-mod.o obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c index 136d3a346204..b8893fab3364 100644 --- a/drivers/isdn/act2000/act2000_isa.c +++ b/drivers/isdn/act2000/act2000_isa.c @@ -12,7 +12,6 @@ * */ -#define __NO_VERSION__ #include "act2000.h" #include "act2000_isa.h" #include "capi.h" diff --git a/drivers/isdn/act2000/capi.c b/drivers/isdn/act2000/capi.c index 011d6e18ea85..a20efdd94614 100644 --- a/drivers/isdn/act2000/capi.c +++ b/drivers/isdn/act2000/capi.c @@ -13,7 +13,6 @@ * */ -#define __NO_VERSION__ #include "act2000.h" #include "capi.h" diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c index a91cbe823e33..d89a94b964cb 100644 --- a/drivers/isdn/divert/divert_procfs.c +++ b/drivers/isdn/divert/divert_procfs.c @@ -10,7 +10,6 @@ */ #include <linux/config.h> -#define __NO_VERSION__ #include <linux/module.h> #include <linux/version.h> #include <linux/poll.h> diff --git a/drivers/isdn/eicon/eicon_idi.c b/drivers/isdn/eicon/eicon_idi.c index 49d494f93d1f..cfa93399deab 100644 --- a/drivers/isdn/eicon/eicon_idi.c +++ b/drivers/isdn/eicon/eicon_idi.c @@ -17,7 +17,6 @@ */ #include <linux/config.h> -#define __NO_VERSION__ #include "eicon.h" #include "eicon_idi.h" #include "eicon_dsp.h" diff --git a/drivers/isdn/eicon/linchr.c b/drivers/isdn/eicon/linchr.c index a2edf3839c77..2d0f71b6aef9 100644 --- a/drivers/isdn/eicon/linchr.c +++ b/drivers/isdn/eicon/linchr.c @@ -8,7 +8,6 @@ * */ -#define __NO_VERSION__ #include <linux/module.h> #include <linux/kernel.h> diff --git a/drivers/isdn/hisax/amd7930.c b/drivers/isdn/hisax/amd7930.c index 4ba74c9e4933..dcc407c5fc14 100644 --- a/drivers/isdn/hisax/amd7930.c +++ b/drivers/isdn/hisax/amd7930.c @@ -90,7 +90,6 @@ * */ -#define __NO_VERSION__ #include "hisax.h" #include "../../sbus/audio/amd7930.h" #include "isac.h" diff --git a/drivers/isdn/hisax/amd7930_fn.c b/drivers/isdn/hisax/amd7930_fn.c index f42331e787c5..eaa497fa8d6f 100644 --- a/drivers/isdn/hisax/amd7930_fn.c +++ b/drivers/isdn/hisax/amd7930_fn.c @@ -53,7 +53,6 @@ */ -#define __NO_VERSION__ #include "hisax.h" #include "isdnl1.h" #include "isac.h" diff --git a/drivers/isdn/hisax/arcofi.c b/drivers/isdn/hisax/arcofi.c index 640ee8378eb0..64934e6a5788 100644 --- a/drivers/isdn/hisax/arcofi.c +++ b/drivers/isdn/hisax/arcofi.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include "hisax.h" #include "isdnl1.h" #include "isac.h" diff --git a/drivers/isdn/hisax/asuscom.c b/drivers/isdn/hisax/asuscom.c index 5f3556dd3a2d..637418d514b8 100644 --- a/drivers/isdn/hisax/asuscom.c +++ b/drivers/isdn/hisax/asuscom.c @@ -12,7 +12,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include <linux/isapnp.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/avm_a1.c b/drivers/isdn/hisax/avm_a1.c index 2f1b23c72dd3..38a741a888a9 100644 --- a/drivers/isdn/hisax/avm_a1.c +++ b/drivers/isdn/hisax/avm_a1.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c index fa39db5a9bab..d5d8d07ed24f 100644 --- a/drivers/isdn/hisax/avm_a1p.c +++ b/drivers/isdn/hisax/avm_a1p.c @@ -13,7 +13,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c index 8c2187c897ec..c79475b5937b 100644 --- a/drivers/isdn/hisax/avm_pci.c +++ b/drivers/isdn/hisax/avm_pci.c @@ -12,7 +12,6 @@ * */ -#define __NO_VERSION__ #include <linux/config.h> #include <linux/init.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c index 7fc219b97f23..31173d211133 100644 --- a/drivers/isdn/hisax/bkm_a4t.c +++ b/drivers/isdn/hisax/bkm_a4t.c @@ -10,8 +10,6 @@ * */ -#define __NO_VERSION__ - #include <linux/config.h> #include <linux/init.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c index 26d1e8e9e6a4..c4d5e8ba2c44 100644 --- a/drivers/isdn/hisax/bkm_a8.c +++ b/drivers/isdn/hisax/bkm_a8.c @@ -10,8 +10,6 @@ * */ -#define __NO_VERSION__ - #include <linux/config.h> #include <linux/init.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/callc.c b/drivers/isdn/hisax/callc.c index 16ad32650cab..565d774e42b2 100644 --- a/drivers/isdn/hisax/callc.c +++ b/drivers/isdn/hisax/callc.c @@ -16,7 +16,6 @@ * */ -#define __NO_VERSION__ #include <linux/module.h> #include <linux/init.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c index 13381a9d6741..6bebe3feac8f 100644 --- a/drivers/isdn/hisax/diva.c +++ b/drivers/isdn/hisax/diva.c @@ -15,7 +15,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include <linux/config.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c index df5715a57243..460b183b3af6 100644 --- a/drivers/isdn/hisax/elsa.c +++ b/drivers/isdn/hisax/elsa.c @@ -18,7 +18,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include <linux/config.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c index a4a93db73bb9..c6c486c93612 100644 --- a/drivers/isdn/hisax/enternow_pci.c +++ b/drivers/isdn/hisax/enternow_pci.c @@ -60,7 +60,6 @@ */ -#define __NO_VERSION__ #include <linux/config.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c index 3dde1a6b9c20..3f4e6fef558c 100644 --- a/drivers/isdn/hisax/fsm.c +++ b/drivers/isdn/hisax/fsm.c @@ -14,7 +14,6 @@ * */ -#define __NO_VERSION__ #include <linux/module.h> #include <linux/init.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c index b50c3245ca69..37cce53235dd 100644 --- a/drivers/isdn/hisax/gazel.c +++ b/drivers/isdn/hisax/gazel.c @@ -13,7 +13,6 @@ #include <linux/config.h> #include <linux/init.h> -#define __NO_VERSION__ #include "hisax.h" #include "isac.h" #include "hscx.h" diff --git a/drivers/isdn/hisax/hfc_2bds0.c b/drivers/isdn/hisax/hfc_2bds0.c index 7695a2ccb409..6aa6df7efe6e 100644 --- a/drivers/isdn/hisax/hfc_2bds0.c +++ b/drivers/isdn/hisax/hfc_2bds0.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "hfc_2bds0.h" diff --git a/drivers/isdn/hisax/hfc_2bs0.c b/drivers/isdn/hisax/hfc_2bs0.c index 2b7e330bc343..da8d9a48ce30 100644 --- a/drivers/isdn/hisax/hfc_2bs0.c +++ b/drivers/isdn/hisax/hfc_2bs0.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "hfc_2bs0.h" diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c index 1f3ad5a05168..1c3cde4e1cfc 100644 --- a/drivers/isdn/hisax/hfc_pci.c +++ b/drivers/isdn/hisax/hfc_pci.c @@ -17,7 +17,6 @@ #include <linux/init.h> #include <linux/config.h> -#define __NO_VERSION__ #include "hisax.h" #include "hfc_pci.h" #include "isdnl1.h" diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index 628649bea5bd..d9ea9ea9b9ea 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c @@ -11,7 +11,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "hfc_sx.h" diff --git a/drivers/isdn/hisax/hfcscard.c b/drivers/isdn/hisax/hfcscard.c index 8d2188e9a75a..ed9b26af61c4 100644 --- a/drivers/isdn/hisax/hfcscard.c +++ b/drivers/isdn/hisax/hfcscard.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include <linux/isapnp.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/hisax_hfcpci.c b/drivers/isdn/hisax/hisax_hfcpci.c index 75602141710e..3cdd98eda702 100644 --- a/drivers/isdn/hisax/hisax_hfcpci.c +++ b/drivers/isdn/hisax/hisax_hfcpci.c @@ -46,7 +46,7 @@ MODULE_DESCRIPTION("HFC PCI ISDN driver"); .subdevice = PCI_ANY_ID, \ .class = 0, \ .class_mask = 0, \ - driver_data: (unsigned long) name } + .driver_data = (unsigned long) name } static struct pci_device_id hfcpci_ids[] __devinitdata = { ID(CCD, CCD_2BD0, "CCD/Billion/Asuscom 2BD0"), diff --git a/drivers/isdn/hisax/hscx.c b/drivers/isdn/hisax/hscx.c index b5cb8e3c9ad4..0022d4635abf 100644 --- a/drivers/isdn/hisax/hscx.c +++ b/drivers/isdn/hisax/hscx.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "hscx.h" diff --git a/drivers/isdn/hisax/icc.c b/drivers/isdn/hisax/icc.c index e6d655574a49..e5578ea42c6b 100644 --- a/drivers/isdn/hisax/icc.c +++ b/drivers/isdn/hisax/icc.c @@ -14,7 +14,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "icc.h" diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c index b9fb57269b27..360e98cda54f 100644 --- a/drivers/isdn/hisax/ipacx.c +++ b/drivers/isdn/hisax/ipacx.c @@ -9,7 +9,6 @@ * of the GNU General Public License, incorporated herein by reference. * */ -#define __NO_VERSION__ #include <linux/kernel.h> #include <linux/config.h> #include <linux/init.h> diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c index 3d6b67428bb9..28d36fa27086 100644 --- a/drivers/isdn/hisax/isac.c +++ b/drivers/isdn/hisax/isac.c @@ -13,7 +13,6 @@ * */ -#define __NO_VERSION__ #include "hisax.h" #include "isac.h" #include "arcofi.h" diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c index 322184c790c9..fa2db36de37a 100644 --- a/drivers/isdn/hisax/isar.c +++ b/drivers/isdn/hisax/isar.c @@ -8,7 +8,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isar.h" diff --git a/drivers/isdn/hisax/isdnl1.c b/drivers/isdn/hisax/isdnl1.c index a191be34b897..02f8681e821f 100644 --- a/drivers/isdn/hisax/isdnl1.c +++ b/drivers/isdn/hisax/isdnl1.c @@ -20,7 +20,6 @@ const char *l1_revision = "$Revision: 2.41.6.5 $"; -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isdnl1.h" diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c index fb593d1f5698..87ead71602b7 100644 --- a/drivers/isdn/hisax/isdnl2.c +++ b/drivers/isdn/hisax/isdnl2.c @@ -15,7 +15,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isdnl2.h" diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c index 4eccc8380612..3d4181c6e5f1 100644 --- a/drivers/isdn/hisax/isdnl3.c +++ b/drivers/isdn/hisax/isdnl3.c @@ -15,7 +15,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isdnl3.h" diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c index d21505ada04c..7cb12d598cdc 100644 --- a/drivers/isdn/hisax/isurf.c +++ b/drivers/isdn/hisax/isurf.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/ix1_micro.c b/drivers/isdn/hisax/ix1_micro.c index 5092eba71fe1..314b84f89d9a 100644 --- a/drivers/isdn/hisax/ix1_micro.c +++ b/drivers/isdn/hisax/ix1_micro.c @@ -17,7 +17,6 @@ * Germany */ -#define __NO_VERSION__ #include <linux/init.h> #include <linux/isapnp.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c index 41b109ea7b5e..09b03e137af5 100644 --- a/drivers/isdn/hisax/jade.c +++ b/drivers/isdn/hisax/jade.c @@ -11,7 +11,6 @@ */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "hscx.h" diff --git a/drivers/isdn/hisax/l3_1tr6.c b/drivers/isdn/hisax/l3_1tr6.c index 93fb3e94e1a2..c313ceb6ae0c 100644 --- a/drivers/isdn/hisax/l3_1tr6.c +++ b/drivers/isdn/hisax/l3_1tr6.c @@ -13,7 +13,6 @@ * */ -#define __NO_VERSION__ #include "hisax.h" #include "l3_1tr6.h" #include "isdnl3.h" diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c index 8d84776e7393..c066e544c090 100644 --- a/drivers/isdn/hisax/l3dss1.c +++ b/drivers/isdn/hisax/l3dss1.c @@ -19,7 +19,6 @@ * */ -#define __NO_VERSION__ #include "hisax.h" #include "isdnl3.h" #include "l3dss1.h" diff --git a/drivers/isdn/hisax/l3ni1.c b/drivers/isdn/hisax/l3ni1.c index a1e99dee887c..42fce1c65ab3 100644 --- a/drivers/isdn/hisax/l3ni1.c +++ b/drivers/isdn/hisax/l3ni1.c @@ -18,7 +18,6 @@ * */ -#define __NO_VERSION__ #include "hisax.h" #include "isdnl3.h" #include "l3ni1.h" diff --git a/drivers/isdn/hisax/lmgr.c b/drivers/isdn/hisax/lmgr.c index 855fda5bd7e0..d4f86d654de0 100644 --- a/drivers/isdn/hisax/lmgr.c +++ b/drivers/isdn/hisax/lmgr.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include "hisax.h" static void diff --git a/drivers/isdn/hisax/mic.c b/drivers/isdn/hisax/mic.c index e7e03ebb7bd0..7e58a68138c1 100644 --- a/drivers/isdn/hisax/mic.c +++ b/drivers/isdn/hisax/mic.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c index 6390ee2e7861..e48193cf55c2 100644 --- a/drivers/isdn/hisax/netjet.c +++ b/drivers/isdn/hisax/netjet.c @@ -14,7 +14,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index 00e9c9591101..a71c447b3ca2 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c @@ -14,7 +14,6 @@ */ -#define __NO_VERSION__ #include <linux/config.h> #include <linux/init.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c index 6358c4ab4a9c..3d97c12f34f2 100644 --- a/drivers/isdn/hisax/nj_s.c +++ b/drivers/isdn/hisax/nj_s.c @@ -5,7 +5,6 @@ * */ -#define __NO_VERSION__ #include <linux/config.h> #include <linux/init.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c index 8b23e1703beb..0728a860a5cb 100644 --- a/drivers/isdn/hisax/nj_u.c +++ b/drivers/isdn/hisax/nj_u.c @@ -5,7 +5,6 @@ * */ -#define __NO_VERSION__ #include <linux/config.h> #include <linux/init.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/q931.c b/drivers/isdn/hisax/q931.c index 727c1ea0641c..cef1b7db4ba6 100644 --- a/drivers/isdn/hisax/q931.c +++ b/drivers/isdn/hisax/q931.c @@ -17,7 +17,6 @@ */ -#define __NO_VERSION__ #include "hisax.h" #include "l3_1tr6.h" diff --git a/drivers/isdn/hisax/s0box.c b/drivers/isdn/hisax/s0box.c index ee0924241ad9..4a9ea1ab9933 100644 --- a/drivers/isdn/hisax/s0box.c +++ b/drivers/isdn/hisax/s0box.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/saphir.c b/drivers/isdn/hisax/saphir.c index 1a029e5a6ac0..352392be38d2 100644 --- a/drivers/isdn/hisax/saphir.c +++ b/drivers/isdn/hisax/saphir.c @@ -12,7 +12,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c index 3d651c30fed0..48e0bbbc4bfe 100644 --- a/drivers/isdn/hisax/sedlbauer.c +++ b/drivers/isdn/hisax/sedlbauer.c @@ -38,7 +38,6 @@ * For example: hisaxctrl <DriverID> 9 ISAR.BIN */ -#define __NO_VERSION__ #include <linux/init.h> #include <linux/config.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/sportster.c b/drivers/isdn/hisax/sportster.c index fcb82e3f561f..b14044b93b7d 100644 --- a/drivers/isdn/hisax/sportster.c +++ b/drivers/isdn/hisax/sportster.c @@ -12,7 +12,6 @@ * * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/tei.c b/drivers/isdn/hisax/tei.c index 9439ba57fa8c..540bf33b9bdf 100644 --- a/drivers/isdn/hisax/tei.c +++ b/drivers/isdn/hisax/tei.c @@ -15,7 +15,6 @@ * */ -#define __NO_VERSION__ #include "hisax.h" #include "isdnl2.h" #include <linux/init.h> diff --git a/drivers/isdn/hisax/teleint.c b/drivers/isdn/hisax/teleint.c index e3137ed984fa..167850af27f8 100644 --- a/drivers/isdn/hisax/teleint.c +++ b/drivers/isdn/hisax/teleint.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isac.h" diff --git a/drivers/isdn/hisax/teles0.c b/drivers/isdn/hisax/teles0.c index e61abf7e4db5..8dbbdd70baf0 100644 --- a/drivers/isdn/hisax/teles0.c +++ b/drivers/isdn/hisax/teles0.c @@ -15,7 +15,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include "hisax.h" #include "isdnl1.h" diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c index 35c149d083c2..be444a8c2f88 100644 --- a/drivers/isdn/hisax/teles3.c +++ b/drivers/isdn/hisax/teles3.c @@ -13,7 +13,6 @@ * Beat Doebeli * */ -#define __NO_VERSION__ #include <linux/init.h> #include <linux/isapnp.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c index f37a2702d169..91eb0d9ffa2f 100644 --- a/drivers/isdn/hisax/telespci.c +++ b/drivers/isdn/hisax/telespci.c @@ -12,7 +12,6 @@ * */ -#define __NO_VERSION__ #include <linux/init.h> #include <linux/config.h> #include "hisax.h" diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c index 47909922c4e1..c67153f1cf4f 100644 --- a/drivers/isdn/hisax/w6692.c +++ b/drivers/isdn/hisax/w6692.c @@ -12,7 +12,6 @@ #include <linux/config.h> #include <linux/init.h> -#define __NO_VERSION__ #include "hisax.h" #include "w6692.h" #include "isdnl1.h" diff --git a/drivers/isdn/hysdn/hysdn_net.c b/drivers/isdn/hysdn/hysdn_net.c index 8437a6323922..cb49e9d41c5b 100644 --- a/drivers/isdn/hysdn/hysdn_net.c +++ b/drivers/isdn/hysdn/hysdn_net.c @@ -13,7 +13,6 @@ * */ -#define __NO_VERSION__ #include <linux/module.h> #include <linux/version.h> #include <linux/signal.h> diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c index 6a9eace7852e..2a312dee7743 100644 --- a/drivers/isdn/hysdn/hysdn_procconf.c +++ b/drivers/isdn/hysdn/hysdn_procconf.c @@ -11,7 +11,6 @@ * */ -#define __NO_VERSION__ #include <linux/module.h> #include <linux/version.h> #include <linux/poll.h> diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c index bcb30eec76f7..c9a8b1920833 100644 --- a/drivers/isdn/hysdn/hysdn_proclog.c +++ b/drivers/isdn/hysdn/hysdn_proclog.c @@ -10,7 +10,6 @@ * */ -#define __NO_VERSION__ #include <linux/module.h> #include <linux/version.h> #include <linux/poll.h> diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c index 5e073c2f715f..95e67cbb020a 100644 --- a/drivers/isdn/i4l/isdn_ppp.c +++ b/drivers/isdn/i4l/isdn_ppp.c @@ -109,8 +109,8 @@ isdn_ppp_free(isdn_net_local * lp) struct ippp_struct *is; if (lp->ppp_slot < 0 || lp->ppp_slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": ppp_slot(%d) out of range\n", - lp->ppp_slot); + printk(KERN_ERR "%s: ppp_slot(%d) out of range\n", + __FUNCTION__ , lp->ppp_slot); return 0; } @@ -129,8 +129,8 @@ isdn_ppp_free(isdn_net_local * lp) spin_unlock(&lp->netdev->pb->lock); #endif /* CONFIG_ISDN_MPP */ if (lp->ppp_slot < 0 || lp->ppp_slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": ppp_slot(%d) now invalid\n", - lp->ppp_slot); + printk(KERN_ERR "%s: ppp_slot(%d) now invalid\n", + __FUNCTION__ , lp->ppp_slot); restore_flags(flags); return 0; } @@ -231,8 +231,8 @@ void isdn_ppp_wakeup_daemon(isdn_net_local * lp) { if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": ppp_slot(%d) out of range\n", - lp->ppp_slot); + printk(KERN_ERR "%s: ppp_slot(%d) out of range\n", + __FUNCTION__, lp->ppp_slot); return; } ippp_table[lp->ppp_slot]->state = IPPP_OPEN | IPPP_CONNECT | IPPP_NOBLOCK; @@ -250,8 +250,8 @@ isdn_ppp_closewait(int slot) struct ippp_struct *is; if (slot < 0 || slot >= ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": slot(%d) out of range\n", - slot); + printk(KERN_ERR "%s: slot(%d) out of range\n", + __FUNCTION__ , slot); return 0; } is = ippp_table[slot]; @@ -351,7 +351,7 @@ isdn_ppp_release(struct inode *ino, struct file *file) isdn_net_dev *p = is->lp->netdev; if (!p) { - printk(KERN_ERR __FUNCTION__": no lp->netdev\n"); + printk(KERN_ERR "%s: no lp->netdev\n", __FUNCTION__ ); unlock_kernel(); return 0; } @@ -706,7 +706,7 @@ isdn_ppp_fill_rq(unsigned char *buf, int len, int proto, int slot) * reports, that there is data */ -static int +static ssize_t isdn_ppp_read(struct file *file, char *buf, size_t count, loff_t *off) { struct ippp_struct *is; @@ -765,7 +765,7 @@ isdn_ppp_read(struct file *file, char *buf, size_t count, loff_t *off) * ipppd wanna write a packet to the card .. non-blocking */ -static int +static ssize_t isdn_ppp_write(struct file *file, const char *buf, size_t count, loff_t *off) { isdn_net_local *lp; @@ -1079,8 +1079,8 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff if (is->debug & 0x20) printk(KERN_DEBUG "isdn_ppp: VJC_UNCOMP\n"); if (net_dev->local.ppp_slot < 0) { - printk(KERN_ERR __FUNCTION__": net_dev->local->ppp_slot(%d) out of range\n", - net_dev->local.ppp_slot); + printk(KERN_ERR "%s: net_dev->local->ppp_slot(%d) out of range\n", + __FUNCTION__ , net_dev->local.ppp_slot); goto drop_packet; } if (slhc_remember(ippp_table[net_dev->local.ppp_slot]->slcomp, skb->data, skb->len) <= 0) { @@ -1105,8 +1105,8 @@ isdn_ppp_push_higher(isdn_net_dev * net_dev, isdn_net_local * lp, struct sk_buff skb_put(skb, skb_old->len + 128); memcpy(skb->data, skb_old->data, skb_old->len); if (net_dev->local.ppp_slot < 0) { - printk(KERN_ERR __FUNCTION__": net_dev->local->ppp_slot(%d) out of range\n", - net_dev->local.ppp_slot); + printk(KERN_ERR "%s: net_dev->local->ppp_slot(%d) out of range\n", + __FUNCTION__ , net_dev->local.ppp_slot); goto drop_packet; } pkt_len = slhc_uncompress(ippp_table[net_dev->local.ppp_slot]->slcomp, @@ -1442,8 +1442,8 @@ static int isdn_ppp_mp_init( isdn_net_local * lp, ippp_bundle * add_to ) struct ippp_struct * is; if (lp->ppp_slot < 0) { - printk(KERN_ERR __FUNCTION__": lp->ppp_slot(%d) out of range\n", - lp->ppp_slot); + printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", + __FUNCTION__ , lp->ppp_slot); return(-EINVAL); } @@ -1493,8 +1493,8 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, stats = &mp->stats; slot = lp->ppp_slot; if (slot < 0 || slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": lp->ppp_slot(%d)\n", - lp->ppp_slot); + printk(KERN_ERR "%s: lp->ppp_slot(%d)\n", + __FUNCTION__, lp->ppp_slot); stats->frame_drops++; dev_kfree_skb(skb); spin_unlock_irqrestore(&mp->lock, flags); @@ -1530,8 +1530,8 @@ static void isdn_ppp_mp_receive(isdn_net_dev * net_dev, isdn_net_local * lp, for (lpq = net_dev->queue;;) { slot = lpq->ppp_slot; if (slot < 0 || slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": lpq->ppp_slot(%d)\n", - lpq->ppp_slot); + printk(KERN_ERR "%s: lpq->ppp_slot(%d)\n", + __FUNCTION__ , lpq->ppp_slot); } else { u32 lls = ippp_table[slot]->last_link_seqno; if (MP_LT(lls, minseq)) @@ -1764,8 +1764,8 @@ void isdn_ppp_mp_reassembly( isdn_net_dev * net_dev, isdn_net_local * lp, unsigned int tot_len; if (lp->ppp_slot < 0 || lp->ppp_slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": lp->ppp_slot(%d) out of range\n", - lp->ppp_slot); + printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", + __FUNCTION__ , lp->ppp_slot); return; } if( MP_FLAGS(from) == (MP_BEGIN_FRAG | MP_END_FRAG) ) { @@ -2541,8 +2541,8 @@ static void isdn_ppp_receive_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, printk(KERN_DEBUG "Received CCP frame from peer slot(%d)\n", lp->ppp_slot); if (lp->ppp_slot < 0 || lp->ppp_slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": lp->ppp_slot(%d) out of range\n", - lp->ppp_slot); + printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", + __FUNCTION__ , lp->ppp_slot); return; } is = ippp_table[lp->ppp_slot]; @@ -2551,8 +2551,8 @@ static void isdn_ppp_receive_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, if(lp->master) { int slot = ((isdn_net_local *) (lp->master->priv))->ppp_slot; if (slot < 0 || slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": slot(%d) out of range\n", - slot); + printk(KERN_ERR "%s: slot(%d) out of range\n", + __FUNCTION__ , slot); return; } mis = ippp_table[slot]; @@ -2715,8 +2715,8 @@ static void isdn_ppp_send_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, struct if(!skb || skb->len < 3) return; if (slot < 0 || slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": lp->ppp_slot(%d) out of range\n", - slot); + printk(KERN_ERR "%s: lp->ppp_slot(%d) out of range\n", + __FUNCTION__ , slot); return; } is = ippp_table[slot]; @@ -2738,8 +2738,8 @@ static void isdn_ppp_send_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, struct if (lp->master) { slot = ((isdn_net_local *) (lp->master->priv))->ppp_slot; if (slot < 0 || slot > ISDN_MAX_CHANNELS) { - printk(KERN_ERR __FUNCTION__": slot(%d) out of range\n", - slot); + printk(KERN_ERR "%s: slot(%d) out of range\n", + __FUNCTION__ , slot); return; } mis = ippp_table[slot]; diff --git a/drivers/isdn/pcbit/drv.c b/drivers/isdn/pcbit/drv.c index 4bf81515e9e2..617f953a3944 100644 --- a/drivers/isdn/pcbit/drv.c +++ b/drivers/isdn/pcbit/drv.c @@ -17,8 +17,6 @@ * */ -#define __NO_VERSION__ - #include <linux/module.h> #include <linux/sched.h> @@ -430,7 +428,7 @@ int pcbit_writecmd(const u_char* buf, int len, int user, int driver, int channel switch(dev->l2_state) { case L2_LWMODE: /* check (size <= rdp_size); write buf into board */ - if (len > BANK4 + 1) + if (len < 0 || len > BANK4 + 1 || len > 1024) { printk("pcbit_writecmd: invalid length %d\n", len); return -EINVAL; diff --git a/drivers/isdn/sc/command.c b/drivers/isdn/sc/command.c index 2737fc6c46a6..6f002174f055 100644 --- a/drivers/isdn/sc/command.c +++ b/drivers/isdn/sc/command.c @@ -15,7 +15,6 @@ * +1 (416) 297-6433 Facsimile */ -#define __NO_VERSION__ #include <linux/module.h> #include "includes.h" /* This must be first */ #include "hardware.h" diff --git a/drivers/isdn/sc/event.c b/drivers/isdn/sc/event.c index 6488eb282e6b..56215fb4a7e9 100644 --- a/drivers/isdn/sc/event.c +++ b/drivers/isdn/sc/event.c @@ -15,7 +15,6 @@ * +1 (416) 297-6433 Facsimile */ -#define __NO_VERSION__ #include "includes.h" #include "hardware.h" #include "message.h" diff --git a/drivers/isdn/sc/interrupt.c b/drivers/isdn/sc/interrupt.c index 7e32c5a6880e..6a8541a55b9d 100644 --- a/drivers/isdn/sc/interrupt.c +++ b/drivers/isdn/sc/interrupt.c @@ -15,7 +15,6 @@ * +1 (416) 297-6433 Facsimile */ -#define __NO_VERSION__ #include "includes.h" #include "hardware.h" #include "message.h" diff --git a/drivers/isdn/sc/ioctl.c b/drivers/isdn/sc/ioctl.c index eada77ea096a..222ba3475af7 100644 --- a/drivers/isdn/sc/ioctl.c +++ b/drivers/isdn/sc/ioctl.c @@ -6,7 +6,6 @@ * */ -#define __NO_VERSION__ #include "includes.h" #include "hardware.h" #include "message.h" diff --git a/drivers/isdn/sc/message.c b/drivers/isdn/sc/message.c index 04ceff7d70f5..003d6bd606dd 100644 --- a/drivers/isdn/sc/message.c +++ b/drivers/isdn/sc/message.c @@ -17,7 +17,6 @@ * +1 (416) 297-6433 Facsimile */ -#define __NO_VERSION__ #include "includes.h" #include "hardware.h" #include "message.h" diff --git a/drivers/isdn/sc/packet.c b/drivers/isdn/sc/packet.c index 38644225b2a1..973f387b57df 100644 --- a/drivers/isdn/sc/packet.c +++ b/drivers/isdn/sc/packet.c @@ -15,7 +15,6 @@ * +1 (416) 297-6433 Facsimile */ -#define __NO_VERSION__ #include "includes.h" #include "hardware.h" #include "message.h" diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c index 94f7730ce858..efa0a8753332 100644 --- a/drivers/isdn/sc/shmem.c +++ b/drivers/isdn/sc/shmem.c @@ -17,7 +17,6 @@ * +1 (416) 297-6433 Facsimile */ -#define __NO_VERSION__ #include "includes.h" /* This must be first */ #include "hardware.h" #include "card.h" diff --git a/drivers/isdn/sc/timer.c b/drivers/isdn/sc/timer.c index e6c649f9dc32..f5f26a6d9450 100644 --- a/drivers/isdn/sc/timer.c +++ b/drivers/isdn/sc/timer.c @@ -15,7 +15,6 @@ * +1 (416) 297-6433 Facsimile */ -#define __NO_VERSION__ #include "includes.h" #include "hardware.h" #include "message.h" diff --git a/drivers/message/i2o/Makefile b/drivers/message/i2o/Makefile index 44ca1bbcc8f7..03a45ba12e50 100644 --- a/drivers/message/i2o/Makefile +++ b/drivers/message/i2o/Makefile @@ -5,7 +5,7 @@ # In the future, some of these should be built conditionally. # -export-objs := i2o_pci.o i2o_core.o i2o_config.o i2o_block.o i2o_lan.o i2o_scsi.o i2o_proc.o +export-objs := i2o_core.o obj-$(CONFIG_I2O_PCI) += i2o_pci.o obj-$(CONFIG_I2O) += i2o_core.o i2o_config.o diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7e5ffd0211bd..91b88a1cd0f5 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -513,12 +513,10 @@ static int tun_chr_fasync(int fd, struct file *file, int on) return ret; if (on) { + ret = f_setown(file, current->pid, 0); + if (ret) + return ret; tun->flags |= TUN_FASYNC; - if (!file->f_owner.pid) { - file->f_owner.pid = current->pid; - file->f_owner.uid = current->uid; - file->f_owner.euid = current->euid; - } } else tun->flags &= ~TUN_FASYNC; diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index fdf24b66f0f0..497523e5f7b1 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile @@ -2,7 +2,7 @@ # Makefile for the kernel pcmcia subsystem (c/o David Hinds) # -export-objs := ds.o cs.o yenta.o sa1100_pcmcia.o +export-objs := ds.o cs.o yenta.o sa1100_generic.o obj-$(CONFIG_PCMCIA) += pcmcia_core.o ds.o ifeq ($(CONFIG_CARDBUS),y) diff --git a/drivers/scsi/sym53c8xx.c b/drivers/scsi/sym53c8xx.c index 98a24b6bd196..5558ae08a692 100644 --- a/drivers/scsi/sym53c8xx.c +++ b/drivers/scsi/sym53c8xx.c @@ -14115,7 +14115,7 @@ printk("ncr_user_command: data=%ld\n", uc->data); if (len) return -EINVAL; else { - long flags; + unsigned long flags; NCR_LOCK_NCB(np, flags); ncr_usercmd (np); diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 04875c35c6a2..564802b6c8c2 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -1686,7 +1686,7 @@ printk("sym_user_command: data=%ld\n", uc->data); if (len) return -EINVAL; else { - long flags; + unsigned long flags; SYM_LOCK_HCB(np, flags); sym_exec_user_command (np, uc); diff --git a/drivers/video/Makefile b/drivers/video/Makefile index daf6c861c3cb..4de70f8d4e4d 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -6,12 +6,11 @@ # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. export-objs := fbmem.o fbcmap.o fbcon.o fbmon.o modedb.o \ - fbcon-afb.o fbcon-ilbm.o fbcon-accel.o \ - fbcon-vga.o fbcon-iplan2p2.o fbcon-iplan2p4.o \ + fbcon-afb.o fbcon-ilbm.o fbcon-accel.o cyber2000fb.o \ + fbcon-iplan2p2.o fbcon-iplan2p4.o fbgen.o \ fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-cfb16.o \ fbcon-cfb2.o fbcon-cfb24.o fbcon-cfb32.o fbcon-cfb4.o \ - fbcon-cfb8.o fbcon-mfb.o fbcon-hga.o \ - cyber2000fb.o sa1100fb.o fbgen.o + fbcon-cfb8.o fbcon-mfb.o fbcon-hga.o # Each configuration option enables a list of files. diff --git a/fs/Makefile b/fs/Makefile index 810e4af0f0a2..1a2f9a2dc9e6 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -7,7 +7,8 @@ O_TARGET := fs.o -export-objs := open.o dcache.o buffer.o bio.o inode.o dquot.o mpage.o aio.o +export-objs := open.o dcache.o buffer.o bio.o inode.o dquot.o mpage.o aio.o \ + fcntl.o obj-y := open.o read_write.o devices.o file_table.o buffer.o \ bio.o super.o block_dev.o char_dev.o stat.o exec.o pipe.o \ diff --git a/fs/dnotify.c b/fs/dnotify.c index 5efe642266b9..4979e1055e5c 100644 --- a/fs/dnotify.c +++ b/fs/dnotify.c @@ -68,7 +68,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) struct dnotify_struct **prev; struct inode *inode; fl_owner_t id = current->files; - int error; + int error = 0; if ((arg & ~DN_MULTISHOT) == 0) { dnotify_flush(filp, id); @@ -89,21 +89,15 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) odn->dn_fd = fd; odn->dn_mask |= arg; inode->i_dnotify_mask |= arg & ~DN_MULTISHOT; - kmem_cache_free(dn_cache, dn); - goto out; + goto out_free; } prev = &odn->dn_next; } - error = security_ops->file_set_fowner(filp); - if (error) { - write_unlock(&dn_lock); - return error; - } + error = f_setown(filp, current->pid, 1); + if (error) + goto out_free; - filp->f_owner.pid = current->pid; - filp->f_owner.uid = current->uid; - filp->f_owner.euid = current->euid; dn->dn_mask = arg; dn->dn_fd = fd; dn->dn_filp = filp; @@ -113,7 +107,10 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) inode->i_dnotify = dn; out: write_unlock(&dn_lock); - return 0; + return error; +out_free: + kmem_cache_free(dn_cache, dn); + goto out; } void __inode_dir_notify(struct inode *inode, unsigned long event) @@ -131,8 +128,7 @@ void __inode_dir_notify(struct inode *inode, unsigned long event) continue; } fown = &dn->dn_filp->f_owner; - if (fown->pid) - send_sigio(fown, dn->dn_fd, POLL_MSG); + send_sigio(fown, dn->dn_fd, POLL_MSG); if (dn->dn_mask & DN_MULTISHOT) prev = &dn->dn_next; else { diff --git a/fs/fcntl.c b/fs/fcntl.c index b26bdbcb2930..c68baf1f81da 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -11,13 +11,13 @@ #include <linux/smp_lock.h> #include <linux/slab.h> #include <linux/iobuf.h> +#include <linux/module.h> #include <linux/security.h> #include <asm/poll.h> #include <asm/siginfo.h> #include <asm/uaccess.h> -extern int sock_fcntl (struct file *, unsigned int cmd, unsigned long arg); extern int fcntl_setlease(unsigned int fd, struct file *filp, long arg); extern int fcntl_getlease(struct file *filp); @@ -259,6 +259,35 @@ static int setfl(int fd, struct file * filp, unsigned long arg) return error; } +static void f_modown(struct file *filp, unsigned long pid, + uid_t uid, uid_t euid, int force) +{ + write_lock_irq(&filp->f_owner.lock); + if (force || !filp->f_owner.pid) { + filp->f_owner.pid = pid; + filp->f_owner.uid = uid; + filp->f_owner.euid = euid; + } + write_unlock_irq(&filp->f_owner.lock); +} + +int f_setown(struct file *filp, unsigned long arg, int force) +{ + int err; + + err = security_ops->file_set_fowner(filp); + if (err) + return err; + + f_modown(filp, arg, current->uid, current->euid, force); + return 0; +} + +void f_delown(struct file *filp) +{ + f_modown(filp, 0, 0, 0, 1); +} + static long do_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file * filp) { @@ -302,21 +331,7 @@ static long do_fcntl(unsigned int fd, unsigned int cmd, err = filp->f_owner.pid; break; case F_SETOWN: - lock_kernel(); - - err = security_ops->file_set_fowner(filp); - if (err) { - unlock_kernel(); - break; - } - - filp->f_owner.pid = arg; - filp->f_owner.uid = current->uid; - filp->f_owner.euid = current->euid; - err = 0; - if (S_ISSOCK (filp->f_dentry->d_inode->i_mode)) - err = sock_fcntl (filp, F_SETOWN, arg); - unlock_kernel(); + err = f_setown(filp, arg, 1); break; case F_GETSIG: err = filp->f_owner.signum; @@ -339,10 +354,6 @@ static long do_fcntl(unsigned int fd, unsigned int cmd, err = fcntl_dirnotify(fd, filp, arg); break; default: - /* sockets need a few special fcntls. */ - err = -EINVAL; - if (S_ISSOCK (filp->f_dentry->d_inode->i_mode)) - err = sock_fcntl (filp, cmd, arg); break; } @@ -418,14 +429,20 @@ static long band_table[NSIGPOLL] = { POLLHUP | POLLERR /* POLL_HUP */ }; +static inline int sigio_perm(struct task_struct *p, + struct fown_struct *fown) +{ + return ((fown->euid == 0) || + (fown->euid == p->suid) || (fown->euid == p->uid) || + (fown->uid == p->suid) || (fown->uid == p->uid)); +} + static void send_sigio_to_task(struct task_struct *p, struct fown_struct *fown, int fd, int reason) { - if ((fown->euid != 0) && - (fown->euid ^ p->suid) && (fown->euid ^ p->uid) && - (fown->uid ^ p->suid) && (fown->uid ^ p->uid)) + if (!sigio_perm(p, fown)) return; if (security_ops->file_send_sigiotask(p, fown, fd, reason)) @@ -464,12 +481,17 @@ static void send_sigio_to_task(struct task_struct *p, void send_sigio(struct fown_struct *fown, int fd, int band) { struct task_struct * p; - int pid = fown->pid; + int pid; + + read_lock(&fown->lock); + pid = fown->pid; + if (!pid) + goto out_unlock_fown; read_lock(&tasklist_lock); if ( (pid > 0) && (p = find_task_by_pid(pid)) ) { send_sigio_to_task(p, fown, fd, band); - goto out; + goto out_unlock_task; } for_each_task(p) { int match = p->pid; @@ -479,8 +501,49 @@ void send_sigio(struct fown_struct *fown, int fd, int band) continue; send_sigio_to_task(p, fown, fd, band); } -out: +out_unlock_task: read_unlock(&tasklist_lock); +out_unlock_fown: + read_unlock(&fown->lock); +} + +static void send_sigurg_to_task(struct task_struct *p, + struct fown_struct *fown) +{ + if (sigio_perm(p, fown)) + send_sig(SIGURG, p, 1); +} + +int send_sigurg(struct fown_struct *fown) +{ + struct task_struct *p; + int pid, ret = 0; + + read_lock(&fown->lock); + pid = fown->pid; + if (!pid) + goto out_unlock_fown; + + ret = 1; + + read_lock(&tasklist_lock); + if ((pid > 0) && (p = find_task_by_pid(pid))) { + send_sigurg_to_task(p, fown); + goto out_unlock_task; + } + for_each_task(p) { + int match = p->pid; + if (pid < 0) + match = -p->pgrp; + if (pid != match) + continue; + send_sigurg_to_task(p, fown); + } +out_unlock_task: + read_unlock(&tasklist_lock); +out_unlock_fown: + read_unlock(&fown->lock); + return ret; } static rwlock_t fasync_lock = RW_LOCK_UNLOCKED; @@ -543,7 +606,7 @@ void __kill_fasync(struct fasync_struct *fa, int sig, int band) /* Don't send SIGURG to processes which have not set a queued signum: SIGURG has its own default signalling mechanism. */ - if (fown->pid && !(sig == SIGURG && fown->signum == 0)) + if (!(sig == SIGURG && fown->signum == 0)) send_sigio(fown, fa->fa_fd, band); fa = fa->fa_next; } @@ -566,3 +629,6 @@ static int __init fasync_init(void) } module_init(fasync_init) + +EXPORT_SYMBOL(f_setown); +EXPORT_SYMBOL(f_delown); diff --git a/fs/file_table.c b/fs/file_table.c index 26a00610fcee..e200cce0be37 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -54,6 +54,7 @@ struct file * get_empty_filp(void) f->f_version = ++event; f->f_uid = current->fsuid; f->f_gid = current->fsgid; + f->f_owner.lock = RW_LOCK_UNLOCKED; list_add(&f->f_list, &anon_list); file_list_unlock(); return f; diff --git a/fs/intermezzo/kml_utils.c b/fs/intermezzo/kml_utils.c index b1c60f90deab..45f7735f33d0 100644 --- a/fs/intermezzo/kml_utils.c +++ b/fs/intermezzo/kml_utils.c @@ -25,7 +25,7 @@ char * bdup_printf (char *format, ...) va_list args; int i; char *path; - long flags; + unsigned long flags; spin_lock_irqsave(&kml_lock, flags); va_start(args, format); diff --git a/fs/locks.c b/fs/locks.c index 369988a6a403..a0461a42bc19 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -997,9 +997,7 @@ static int lease_modify(struct file_lock **before, int arg) if (arg == F_UNLCK) { struct file *filp = fl->fl_file; - filp->f_owner.pid = 0; - filp->f_owner.uid = 0; - filp->f_owner.euid = 0; + f_delown(filp); filp->f_owner.signum = 0; locks_delete_lock(before); } @@ -1277,13 +1275,7 @@ int fcntl_setlease(unsigned int fd, struct file *filp, long arg) *before = fl; list_add(&fl->fl_link, &file_lock_list); - error = security_ops->file_set_fowner(filp); - if (error) - goto out_unlock; - - filp->f_owner.pid = current->pid; - filp->f_owner.uid = current->uid; - filp->f_owner.euid = current->euid; + error = f_setown(filp, current->pid, 1); out_unlock: unlock_kernel(); return error; diff --git a/fs/partitions/Makefile b/fs/partitions/Makefile index c6003298ccdc..aa6f3cd8e4ee 100644 --- a/fs/partitions/Makefile +++ b/fs/partitions/Makefile @@ -2,7 +2,7 @@ # Makefile for the linux kernel. # -export-objs := check.o msdos.o +export-objs := msdos.o obj-y := check.o diff --git a/include/linux/fs.h b/include/linux/fs.h index 598561bc18c2..befc2bbb5f3c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -432,6 +432,7 @@ static inline struct inode *SOCK_INODE(struct socket *socket) #include <linux/efs_fs_i.h> struct fown_struct { + rwlock_t lock; /* protects pid, uid, euid fields */ int pid; /* pid or -pgrp where SIGIO should be sent */ uid_t uid, euid; /* uid/euid of process setting the owner */ int signum; /* posix.1b rt signal to be delivered on IO */ @@ -615,6 +616,10 @@ extern void kill_fasync(struct fasync_struct **, int, int); /* only for net: no internal synchronization */ extern void __kill_fasync(struct fasync_struct *, int, int); +extern int f_setown(struct file *filp, unsigned long arg, int force); +extern void f_delown(struct file *filp); +extern int send_sigurg(struct fown_struct *fown); + /* * Umount options */ diff --git a/include/linux/pci.h b/include/linux/pci.h index 8ee2d9cf4053..3c76341f02bf 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -591,8 +591,6 @@ static int inline pci_write_config_dword(struct pci_dev *dev, int where, u32 val extern spinlock_t pci_lock; -extern spinlock_t pci_lock; - int pci_enable_device(struct pci_dev *dev); void pci_disable_device(struct pci_dev *dev); void pci_set_master(struct pci_dev *dev); diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 78512fa922b9..a0378ef64867 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -24,6 +24,7 @@ #define PTRACE_SYSCALL 24 #include <asm/ptrace.h> +#include <linux/sched.h> extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char *dst, int len); extern int ptrace_writedata(struct task_struct *tsk, char * src, unsigned long dst, int len); diff --git a/include/net/inet_common.h b/include/net/inet_common.h index bbb1fa70099e..3dcab5199cc1 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h @@ -34,9 +34,6 @@ extern int inet_setsockopt(struct socket *sock, int level, extern int inet_getsockopt(struct socket *sock, int level, int optname, char *optval, int *optlen); -extern int inet_fcntl(struct socket *sock, - unsigned int cmd, - unsigned long arg); extern int inet_listen(struct socket *sock, int backlog); extern void inet_sock_release(struct sock *sk); diff --git a/include/net/sock.h b/include/net/sock.h index ccf82ecab360..da47601e4290 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -132,7 +132,6 @@ struct sock { unsigned char rcvtstamp; unsigned char no_largesend; int route_caps; - int proc; unsigned long lingertime; int hashent; @@ -292,7 +291,6 @@ static __inline__ void sock_prot_dec_use(struct proto *prot) #define SOCK_BINDADDR_LOCK 4 #define SOCK_BINDPORT_LOCK 8 -#include <linux/fs.h> /* just for inode - yeuch.*/ /* Used by processes to "lock" a socket state, so that @@ -362,6 +360,7 @@ extern struct sk_buff *sock_alloc_send_pskb(struct sock *sk, int *errcode); extern void *sock_kmalloc(struct sock *sk, int size, int priority); extern void sock_kfree_s(struct sock *sk, void *mem, int size); +extern void sk_send_sigurg(struct sock *sk); /* * Functions to fill in entries in struct proto_ops when a protocol @@ -388,8 +387,6 @@ extern int sock_no_getsockopt(struct socket *, int , int, char *, int *); extern int sock_no_setsockopt(struct socket *, int, int, char *, int); -extern int sock_no_fcntl(struct socket *, - unsigned int, unsigned long); extern int sock_no_sendmsg(struct socket *, struct msghdr *, int, struct scm_cookie *); diff --git a/kernel/futex.c b/kernel/futex.c index ef3dc8b00a5f..ac9fda58181e 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -276,9 +276,14 @@ static int futex_fd(struct list_head *head, filp->f_dentry = dget(futex_mnt->mnt_root); if (signal) { - filp->f_owner.pid = current->tgid; - filp->f_owner.uid = current->uid; - filp->f_owner.euid = current->euid; + int ret; + + ret = f_setown(filp, current->tgid, 1); + if (ret) { + put_unused_fd(fd); + put_filp(filp); + return ret; + } filp->f_owner.signum = signal; } diff --git a/kernel/sched.c b/kernel/sched.c index 0588a29a9393..90344435318c 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1032,15 +1032,12 @@ asmlinkage void preempt_schedule(void) { struct thread_info *ti = current_thread_info(); - if (unlikely(ti->preempt_count)) - return; - if (unlikely(irqs_disabled())) { - preempt_disable(); - printk("bad: schedule() with irqs disabled!\n"); - show_stack(NULL); - preempt_enable_no_resched(); + /* + * If there is a non-zero preempt_count or interrupts are disabled, + * we do not want to preempt the current task. Just return.. + */ + if (unlikely(ti->preempt_count || irqs_disabled())) return; - } need_resched: ti->preempt_count = PREEMPT_ACTIVE; diff --git a/kernel/softirq.c b/kernel/softirq.c index 4405e83aaf21..14cff3f400f8 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -59,7 +59,7 @@ static inline void wakeup_softirqd(unsigned cpu) asmlinkage void do_softirq() { __u32 pending; - long flags; + unsigned long flags; __u32 mask; int cpu; @@ -129,7 +129,7 @@ inline void cpu_raise_softirq(unsigned int cpu, unsigned int nr) void raise_softirq(unsigned int nr) { - long flags; + unsigned long flags; local_irq_save(flags); cpu_raise_softirq(smp_processor_id(), nr); diff --git a/net/802/Makefile b/net/802/Makefile index cc21e2c476c0..0abaeaad1b7b 100644 --- a/net/802/Makefile +++ b/net/802/Makefile @@ -2,7 +2,7 @@ # Makefile for the Linux 802.x protocol layers. # -export-objs := p8022.o psnap.o tr.o +export-objs := p8022.o psnap.o obj-y := p8023.o diff --git a/net/core/sock.c b/net/core/sock.c index 0d5d04e0bdb3..07abf8bf43f4 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -103,7 +103,6 @@ #include <linux/string.h> #include <linux/sockios.h> #include <linux/net.h> -#include <linux/fcntl.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/interrupt.h> @@ -1048,34 +1047,6 @@ int sock_no_getsockopt(struct socket *sock, int level, int optname, return -EOPNOTSUPP; } -/* - * Note: if you add something that sleeps here then change sock_fcntl() - * to do proper fd locking. - */ -int sock_no_fcntl(struct socket *sock, unsigned int cmd, unsigned long arg) -{ - struct sock *sk = sock->sk; - - switch(cmd) - { - case F_SETOWN: - /* - * This is a little restrictive, but it's the only - * way to make sure that you can't send a sigurg to - * another process. - */ - if (current->pgrp != -arg && - current->pid != arg && - !capable(CAP_KILL)) return(-EPERM); - sk->proc = arg; - return(0); - case F_GETOWN: - return(sk->proc); - default: - return(-EINVAL); - } -} - int sock_no_sendmsg(struct socket *sock, struct msghdr *m, int flags, struct scm_cookie *scm) { @@ -1179,6 +1150,13 @@ void sock_def_destruct(struct sock *sk) kfree(sk->protinfo); } +void sk_send_sigurg(struct sock *sk) +{ + if (sk->socket && sk->socket->file) + if (send_sigurg(&sk->socket->file->f_owner)) + sk_wake_async(sk, 3, POLL_PRI); +} + void sock_init_data(struct socket *sock, struct sock *sk) { skb_queue_head_init(&sk->receive_queue); diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 1034945a82b3..a40e27684219 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c @@ -651,13 +651,10 @@ static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg case SIOCSPGRP: if (get_user(pid, (int *) arg)) return -EFAULT; - if (current->pid != pid && current->pgrp != -pid && !capable(CAP_NET_ADMIN)) - return -EPERM; - sk->proc = pid; - return(0); + return f_setown(sock->file, pid, 1); case FIOGETOWN: case SIOCGPGRP: - return put_user(sk->proc, (int *)arg); + return put_user(sock->file->f_owner.pid, (int *)arg); case SIOCGSTAMP: if(sk->stamp.tv_sec==0) return -ENOENT; diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 2dcea8fd874c..37670ef9cf88 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -857,16 +857,12 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) case SIOCSPGRP: if (get_user(pid, (int *)arg)) err = -EFAULT; - else if (current->pid != pid && - current->pgrp != -pid && - !capable(CAP_NET_ADMIN)) - err = -EPERM; else - sk->proc = pid; + err = f_setown(sock->file, pid, 1); break; case FIOGETOWN: case SIOCGPGRP: - err = put_user(sk->proc, (int *)arg); + err = put_user(sock->file->f_owner.pid, (int *)arg); break; case SIOCGSTAMP: if (!sk->stamp.tv_sec) diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile index 38fd72287d16..452f0fd0658d 100644 --- a/net/ipv4/netfilter/Makefile +++ b/net/ipv4/netfilter/Makefile @@ -2,7 +2,7 @@ # Makefile for the netfilter modules on top of IPv4. # -export-objs := ip_conntrack_standalone.o ip_fw_compat.o ip_nat_standalone.o \ +export-objs := ip_conntrack_standalone.o ip_nat_standalone.o \ ip_tables.o arp_tables.o # objects for the conntrack and NAT core (used by standalone and backw. compat) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 97b867a086dd..7072ab51cf27 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -3103,13 +3103,7 @@ static void tcp_check_urg(struct sock * sk, struct tcphdr * th) return; /* Tell the world about our new urgent pointer. */ - if (sk->proc != 0) { - if (sk->proc > 0) - kill_proc(sk->proc, SIGURG, 1); - else - kill_pg(-sk->proc, SIGURG, 1); - sk_wake_async(sk, 3, POLL_PRI); - } + sk_send_sigurg(sk); /* We may be adding urgent data when the last byte read was * urgent. To do this requires some care. We cannot just ignore diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 1404bdf390c8..5371c054796e 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -676,7 +676,6 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req, newsk->done = 0; newsk->userlocks = sk->userlocks & ~SOCK_BINDPORT_LOCK; - newsk->proc = 0; newsk->backlog.head = newsk->backlog.tail = NULL; newsk->callback_lock = RW_LOCK_UNLOCKED; skb_queue_head_init(&newsk->error_queue); diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index f917f1eef12b..4d5a98c77fc7 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -463,15 +463,10 @@ int inet6_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) case SIOCSPGRP: if (get_user(pid, (int *) arg)) return -EFAULT; - /* see sock_no_fcntl */ - if (current->pid != pid && current->pgrp != -pid && - !capable(CAP_NET_ADMIN)) - return -EPERM; - sk->proc = pid; - return(0); + return f_setown(sock->file, pid, 1); case FIOGETOWN: case SIOCGPGRP: - return put_user(sk->proc,(int *)arg); + return put_user(sock->file->f_owner.pid, (int *)arg); case SIOCGSTAMP: if(sk->stamp.tv_sec==0) return -ENOENT; diff --git a/net/ipx/Makefile b/net/ipx/Makefile index 5bf1385eabd9..0c40039074f3 100644 --- a/net/ipx/Makefile +++ b/net/ipx/Makefile @@ -2,8 +2,6 @@ # Makefile for the Linux IPX layer. # -export-objs = af_ipx.o - obj-$(CONFIG_IPX) += ipx.o ipx-y := af_ipx.o diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index edad9e2f8b7a..d6a74275f757 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -1463,15 +1463,11 @@ static int packet_ioctl(struct socket *sock, unsigned int cmd, int pid; if (get_user(pid, (int *) arg)) return -EFAULT; - if (current->pid != pid && current->pgrp != -pid && - !capable(CAP_NET_ADMIN)) - return -EPERM; - sk->proc = pid; - break; + return f_setown(sock->file, pid, 1); } case FIOGETOWN: case SIOCGPGRP: - return put_user(sk->proc, (int *)arg); + return put_user(sock->file->f_owner.pid, (int *)arg); case SIOCGSTAMP: if(sk->stamp.tv_sec==0) return -ENOENT; diff --git a/net/socket.c b/net/socket.c index c9be97e26a5e..cc08dc247e76 100644 --- a/net/socket.c +++ b/net/socket.c @@ -1516,24 +1516,6 @@ out: return err; } - -/* - * Perform a file control on a socket file descriptor. - * - * Doesn't acquire a fd lock, because no network fcntl - * function sleeps currently. - */ - -int sock_fcntl(struct file *filp, unsigned int cmd, unsigned long arg) -{ - struct socket *sock; - - sock = SOCKET_I (filp->f_dentry->d_inode); - if (sock && sock->ops) - return sock_no_fcntl(sock, cmd, arg); - return(-EINVAL); -} - /* Argument list sizes for sys_socketcall */ #define AL(x) ((x) * sizeof(unsigned long)) static unsigned char nargs[18]={AL(0),AL(3),AL(3),AL(3),AL(2),AL(3), diff --git a/net/wanrouter/af_wanpipe.c b/net/wanrouter/af_wanpipe.c index cf585a136e29..5c9f18298921 100644 --- a/net/wanrouter/af_wanpipe.c +++ b/net/wanrouter/af_wanpipe.c @@ -1876,14 +1876,10 @@ static int wanpipe_ioctl(struct socket *sock, unsigned int cmd, unsigned long ar err = get_user(pid, (int *) arg); if (err) return err; - if (current->pid != pid && current->pgrp != -pid && - !capable(CAP_NET_ADMIN)) - return -EPERM; - sk->proc = pid; - return(0); + return f_setown(sock->file, pid, 1); case FIOGETOWN: case SIOCGPGRP: - return put_user(sk->proc, (int *)arg); + return put_user(sock->file->f_owner.pid, (int *)arg); case SIOCGSTAMP: if(sk->stamp.tv_sec==0) return -ENOENT; diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c index 0df826f47c29..17d9b71d5324 100644 --- a/net/x25/x25_in.c +++ b/net/x25/x25_in.c @@ -283,13 +283,7 @@ static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametyp skb_queue_tail(&x25->interrupt_in_queue, skb); queued = 1; } - if (sk->proc != 0) { - if (sk->proc > 0) - kill_proc(sk->proc, SIGURG, 1); - else - kill_pg(-sk->proc, SIGURG, 1); - sock_wake_async(sk->socket, 3, POLL_PRI); - } + sk_send_sigurg(sk); x25_write_internal(sk, X25_INTERRUPT_CONFIRMATION); break; |
