aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2010-04-27 18:33:49 -0400
committerIngo Molnar <mingo@elte.hu>2010-05-11 03:14:25 -0400
commit829e92458532b1dbfeb972435d45bb060cdbf5a3 (patch)
tree755f5c5e590aec21730afc2bcd680629fe075770 /kernel/resource.c
parentde068ec048f807d4f62b7dda100c23a1365f086f (diff)
kprobes/x86: Fix removed int3 checking order
Fix kprobe/x86 to check removed int3 when failing to get kprobe from hlist. Since we have a time window between checking int3 exists on probed address and getting kprobe on that address, we can have following scenario: ------- CPU1 CPU2 hit int3 check int3 exists remove int3 remove kprobe from hlist get kprobe from hlist no kprobe->OOPS! ------- This patch moves int3 checking if there is no kprobe on that address for fixing this problem as follows: ------ CPU1 CPU2 hit int3 remove int3 remove kprobe from hlist get kprobe from hlist no kprobe->check int3 exists ->rollback&retry ------ Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> Cc: Dave Anderson <anderson@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <20100427223348.2322.9112.stgit@localhost6.localdomain6> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/resource.c')
0 files changed, 0 insertions, 0 deletions
mempool_t *r10bio_pool; mempool_t *r10buf_pool; struct page *tmppage; /* When taking over an array from a different personality, we store * the new thread here until we fully activate the array. */ struct md_thread *thread; }; /* * this is our 'private' RAID10 bio. * * it contains information about what kind of IO operations were started * for this RAID10 operation, and about their status: */ struct r10bio { atomic_t remaining; /* 'have we finished' count, * used from IRQ handlers */ sector_t sector; /* virtual sector number */ int sectors; unsigned long state; struct mddev *mddev; /* * original bio going to /dev/mdx */ struct bio *master_bio; /* * if the IO is in READ direction, then this is where we read */ int read_slot; struct list_head retry_list; /* * if the IO is in WRITE direction, then multiple bios are used, * one for each copy. * When resyncing we also use one for each copy. * When reconstructing, we use 2 bios, one for read, one for write. * We choose the number when they are allocated. * We sometimes need an extra bio to write to the replacement. */ struct r10dev { struct bio *bio; union { struct bio *repl_bio; /* used for resync and * writes */ struct md_rdev *rdev; /* used for reads * (read_slot >= 0) */ }; sector_t addr; int devnum; } devs[0]; }; /* bits for r10bio.state */ enum r10bio_state { R10BIO_Uptodate, R10BIO_IsSync, R10BIO_IsRecover, R10BIO_IsReshape, R10BIO_Degraded, /* Set ReadError on bios that experience a read error * so that raid10d knows what to do with them. */ R10BIO_ReadError, /* If a write for this request means we can clear some * known-bad-block records, we set this flag. */ R10BIO_MadeGood, R10BIO_WriteError, /* During a reshape we might be performing IO on the * 'previous' part of the array, in which case this * flag is set */ R10BIO_Previous, }; extern int md_raid10_congested(struct mddev *mddev, int bits); #endif