Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109748
b: refs/heads/master
c: 91cd99f
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Sep 9, 2008
1 parent 3fd67f7 commit 10c6497
Show file tree
Hide file tree
Showing 33 changed files with 367 additions and 201 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e550dfb0c2c31b6363aa463a035fc9f8dcaa3c9b
refs/heads/master: 91cd99f677ada2af90b06cb1f59e99f27ade5740
15 changes: 4 additions & 11 deletions trunk/Documentation/filesystems/Locking
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ prototypes:
void (*kill_sb) (struct super_block *);
locking rules:
may block BKL
get_sb yes yes
kill_sb yes yes
get_sb yes no
kill_sb yes no

->get_sb() returns error or 0 with locked superblock attached to the vfsmount
(exclusive on ->s_umount).
Expand Down Expand Up @@ -409,12 +409,12 @@ ioctl: yes (see below)
unlocked_ioctl: no (see below)
compat_ioctl: no
mmap: no
open: maybe (see below)
open: no
flush: no
release: no
fsync: no (see below)
aio_fsync: no
fasync: yes (see below)
fasync: no
lock: yes
readv: no
writev: no
Expand All @@ -431,13 +431,6 @@ For many filesystems, it is probably safe to acquire the inode
semaphore. Note some filesystems (i.e. remote ones) provide no
protection for i_size so you will need to use the BKL.

->open() locking is in-transit: big lock partially moved into the methods.
The only exception is ->open() in the instances of file_operations that never
end up in ->i_fop/->proc_fops, i.e. ones that belong to character devices
(chrdev_open() takes lock before replacing ->f_op and calling the secondary
method. As soon as we fix the handling of module reference counters all
instances of ->open() will be called without the BKL.

Note: ext2_release() was *the* source of contention on fs-intensive
loads and dropping BKL on ->release() helps to get rid of that (we still
grab BKL for cases when we close a file that had been opened r/w, but that
Expand Down
4 changes: 3 additions & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -750,11 +750,13 @@ P: Ville Syrjala
M: syrjala@sci.fi
S: Maintained

ATL1 ETHERNET DRIVER
ATLX ETHERNET DRIVERS
P: Jay Cliburn
M: jcliburn@gmail.com
P: Chris Snook
M: csnook@redhat.com
P: Jie Yang
M: jie.yang@atheros.com
L: atl1-devel@lists.sourceforge.net
W: http://sourceforge.net/projects/atl1
W: http://atl1.sourceforge.net
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/ia64/include/asm/sections.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@ extern char __start_gate_brl_fsys_bubble_down_patchlist[], __end_gate_brl_fsys_b
extern char __start_unwind[], __end_unwind[];
extern char __start_ivt_text[], __end_ivt_text[];

#undef dereference_function_descriptor
void *dereference_function_descriptor(void *);

#endif /* _ASM_IA64_SECTIONS_H */

12 changes: 12 additions & 0 deletions trunk/arch/ia64/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
#include <linux/elf.h>
#include <linux/moduleloader.h>
#include <linux/string.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>

#include <asm/patch.h>
#include <asm/sections.h>
#include <asm/unaligned.h>

#define ARCH_MODULE_DEBUG 0
Expand Down Expand Up @@ -941,3 +943,13 @@ module_arch_cleanup (struct module *mod)
if (mod->arch.core_unw_table)
unw_remove_unwind_table(mod->arch.core_unw_table);
}

void *dereference_function_descriptor(void *ptr)
{
struct fdesc *desc = ptr;
void *p;

if (!probe_kernel_address(&desc->ip, p))
ptr = p;
return ptr;
}
2 changes: 1 addition & 1 deletion trunk/arch/mips/sgi-ip22/ip22-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static int __init sgiseeq_devinit(void)
return res;

/* Second HPC is missing? */
if (!ip22_is_fullhouse() ||
if (ip22_is_fullhouse() ||
get_dbe(tmp, (unsigned int *)&hpc3c1->pbdma[1]))
return 0;

Expand Down
14 changes: 14 additions & 0 deletions trunk/arch/parisc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/bug.h>
#include <linux/uaccess.h>

#include <asm/sections.h>
#include <asm/unwind.h>

#if 0
Expand Down Expand Up @@ -860,3 +862,15 @@ void module_arch_cleanup(struct module *mod)
deregister_unwind_table(mod);
module_bug_cleanup(mod);
}

#ifdef CONFIG_64BIT
void *dereference_function_descriptor(void *ptr)
{
Elf64_Fdesc *desc = ptr;
void *p;

if (!probe_kernel_address(&desc->addr, p))
ptr = p;
return ptr;
}
#endif
3 changes: 3 additions & 0 deletions trunk/arch/powerpc/include/asm/sections.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ static inline int in_kernel_text(unsigned long addr)
return 0;
}

#undef dereference_function_descriptor
void *dereference_function_descriptor(void *);

#endif

#endif /* __KERNEL__ */
Expand Down
13 changes: 12 additions & 1 deletion trunk/arch/powerpc/kernel/module_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
#include <linux/err.h>
#include <linux/vmalloc.h>
#include <linux/bug.h>
#include <linux/uaccess.h>
#include <asm/module.h>
#include <asm/uaccess.h>
#include <asm/sections.h>
#include <asm/firmware.h>
#include <asm/code-patching.h>
#include <linux/sort.h>
Expand Down Expand Up @@ -451,3 +452,13 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,

return 0;
}

void *dereference_function_descriptor(void *ptr)
{
struct ppc64_opd_entry *desc = ptr;
void *p;

if (!probe_kernel_address(&desc->funcaddr, p))
ptr = p;
return ptr;
}
1 change: 1 addition & 0 deletions trunk/arch/s390/kernel/compat_ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ struct user_regs_struct32
u32 gprs[NUM_GPRS];
u32 acrs[NUM_ACRS];
u32 orig_gpr2;
/* nb: there's a 4-byte hole here */
s390_fp_regs fp_regs;
/*
* These per registers are in here so that gdb can modify them
Expand Down
28 changes: 28 additions & 0 deletions trunk/arch/s390/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ static unsigned long __peek_user(struct task_struct *child, addr_t addr)
*/
tmp = (addr_t) task_pt_regs(child)->orig_gpr2;

} else if (addr < (addr_t) &dummy->regs.fp_regs) {
/*
* prevent reads of padding hole between
* orig_gpr2 and fp_regs on s390.
*/
tmp = 0;

} else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) {
/*
* floating point regs. are stored in the thread structure
Expand Down Expand Up @@ -270,6 +277,13 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
*/
task_pt_regs(child)->orig_gpr2 = data;

} else if (addr < (addr_t) &dummy->regs.fp_regs) {
/*
* prevent writes of padding hole between
* orig_gpr2 and fp_regs on s390.
*/
return 0;

} else if (addr < (addr_t) (&dummy->regs.fp_regs + 1)) {
/*
* floating point regs. are stored in the thread structure
Expand Down Expand Up @@ -428,6 +442,13 @@ static u32 __peek_user_compat(struct task_struct *child, addr_t addr)
*/
tmp = *(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4);

} else if (addr < (addr_t) &dummy32->regs.fp_regs) {
/*
* prevent reads of padding hole between
* orig_gpr2 and fp_regs on s390.
*/
tmp = 0;

} else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) {
/*
* floating point regs. are stored in the thread structure
Expand Down Expand Up @@ -514,6 +535,13 @@ static int __poke_user_compat(struct task_struct *child,
*/
*(__u32*)((addr_t) &task_pt_regs(child)->orig_gpr2 + 4) = tmp;

} else if (addr < (addr_t) &dummy32->regs.fp_regs) {
/*
* prevent writess of padding hole between
* orig_gpr2 and fp_regs on s390.
*/
return 0;

} else if (addr < (addr_t) (&dummy32->regs.fp_regs + 1)) {
/*
* floating point regs. are stored in the thread structure
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/sparc64/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ void fixup_irqs(void)
}
spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
}

tick_ops->disable_irq();
}
#endif

Expand Down
13 changes: 8 additions & 5 deletions trunk/arch/x86/Kconfig.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,17 @@ config X86_OOSTORE
# P6_NOPs are a relatively minor optimization that require a family >=
# 6 processor, except that it is broken on certain VIA chips.
# Furthermore, AMD chips prefer a totally different sequence of NOPs
# (which work on all CPUs). As a result, disallow these if we're
# compiling X86_GENERIC but not X86_64 (these NOPs do work on all
# x86-64 capable chips); the list of processors in the right-hand clause
# are the cores that benefit from this optimization.
# (which work on all CPUs). In addition, it looks like Virtual PC
# does not understand them.
#
# As a result, disallow these if we're not compiling for X86_64 (these
# NOPs do work on all x86-64 capable chips); the list of processors in
# the right-hand clause are the cores that benefit from this optimization.
#
config X86_P6_NOP
def_bool y
depends on (X86_64 || !X86_GENERIC) && (M686 || MPENTIUMII || MPENTIUMIII || MPENTIUMM || MCORE2 || MPENTIUM4 || MPSC)
depends on X86_64
depends on (MCORE2 || MPENTIUM4 || MPSC)

config X86_TSC
def_bool y
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ static int __init parse_memmap_opt(char *p)
if (!p)
return -EINVAL;

if (!strcmp(p, "exactmap")) {
if (!strncmp(p, "exactmap", 8)) {
#ifdef CONFIG_CRASH_DUMP
/*
* If we are doing a crash dump, we still need to know
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/s390/cio/chp.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ int chp_new(struct chp_id chpid)
ret = sysfs_create_group(&chp->dev.kobj, &chp_attr_group);
if (ret) {
device_unregister(&chp->dev);
goto out_free;
goto out;
}
mutex_lock(&channel_subsystems[chpid.cssid]->mutex);
if (channel_subsystems[chpid.cssid]->cm_enabled) {
Expand All @@ -432,14 +432,15 @@ int chp_new(struct chp_id chpid)
sysfs_remove_group(&chp->dev.kobj, &chp_attr_group);
device_unregister(&chp->dev);
mutex_unlock(&channel_subsystems[chpid.cssid]->mutex);
goto out_free;
goto out;
}
}
channel_subsystems[chpid.cssid]->chps[chpid.id] = chp;
mutex_unlock(&channel_subsystems[chpid.cssid]->mutex);
return ret;
goto out;
out_free:
kfree(chp);
out:
return ret;
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/s390/cio/cio.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,10 @@ cio_start_key (struct subchannel *sch, /* subchannel structure */
case 1: /* status pending */
case 2: /* busy */
return -EBUSY;
default: /* device/path not operational */
case 3: /* device/path not operational */
return cio_start_handle_notoper(sch, lpm);
default:
return ccode;
}
}

Expand Down
32 changes: 18 additions & 14 deletions trunk/drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,11 @@ channel_subsystem_release(struct device *dev)

css = to_css(dev);
mutex_destroy(&css->mutex);
if (css->pseudo_subchannel) {
/* Implies that it has been generated but never registered. */
css_subchannel_release(&css->pseudo_subchannel->dev);
css->pseudo_subchannel = NULL;
}
kfree(css);
}

Expand Down Expand Up @@ -785,11 +790,15 @@ init_channel_subsystem (void)
}
channel_subsystems[i] = css;
ret = setup_css(i);
if (ret)
goto out_free;
if (ret) {
kfree(channel_subsystems[i]);
goto out_unregister;
}
ret = device_register(&css->device);
if (ret)
goto out_free_all;
if (ret) {
put_device(&css->device);
goto out_unregister;
}
if (css_chsc_characteristics.secm) {
ret = device_create_file(&css->device,
&dev_attr_cm_enable);
Expand All @@ -802,33 +811,28 @@ init_channel_subsystem (void)
}
ret = register_reboot_notifier(&css_reboot_notifier);
if (ret)
goto out_pseudo;
goto out_unregister;
css_init_done = 1;

/* Enable default isc for I/O subchannels. */
isc_register(IO_SCH_ISC);

for_each_subchannel(__init_channel_subsystem, NULL);
return 0;
out_pseudo:
device_unregister(&channel_subsystems[i]->pseudo_subchannel->dev);
out_file:
device_remove_file(&channel_subsystems[i]->device,
&dev_attr_cm_enable);
if (css_chsc_characteristics.secm)
device_remove_file(&channel_subsystems[i]->device,
&dev_attr_cm_enable);
out_device:
device_unregister(&channel_subsystems[i]->device);
out_free_all:
kfree(channel_subsystems[i]->pseudo_subchannel->lock);
kfree(channel_subsystems[i]->pseudo_subchannel);
out_free:
kfree(channel_subsystems[i]);
out_unregister:
while (i > 0) {
struct channel_subsystem *css;

i--;
css = channel_subsystems[i];
device_unregister(&css->pseudo_subchannel->dev);
css->pseudo_subchannel = NULL;
if (css_chsc_characteristics.secm)
device_remove_file(&css->device,
&dev_attr_cm_enable);
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/s390/cio/device_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,13 @@ ccw_device_offline(struct ccw_device *cdev)
{
struct subchannel *sch;

/* Allow ccw_device_offline while disconnected. */
if (cdev->private->state == DEV_STATE_DISCONNECTED ||
cdev->private->state == DEV_STATE_NOT_OPER) {
cdev->private->flags.donotify = 0;
ccw_device_done(cdev, DEV_STATE_NOT_OPER);
return 0;
}
if (ccw_device_is_orphan(cdev)) {
ccw_device_done(cdev, DEV_STATE_OFFLINE);
return 0;
Expand Down
Loading

0 comments on commit 10c6497

Please sign in to comment.