summaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorTony Battersby <tonyb@cybernetics.com>2009-01-20 17:00:09 -0500
committerChris Wright <chrisw@sous-sol.org>2009-04-27 10:37:02 -0700
commitd4845ceede8c4087233198d2847b788a4e6f65b5 (patch)
treefa98e959bd881aae4ba2ffe811619086981265a0 /tools/perf/util/scripting-engines/trace-event-python.c
parentb21c6d2897cd455fa396f4041a0c8165784e949f (diff)
SCSI: sg: fix races with ioctl(SG_IO)
upstream commit: a2dd3b4cea335713b58996bb07b3abcde1175f47 sg_io_owned needs to be set before the command is sent to the midlevel; otherwise, a quickly-completing command may cause a different CPU to see "srp->done == 1 && !srp->sg_io_owned", which would lead to incorrect behavior. Check srp->done and set srp->orphan while holding rq_list_lock to prevent races with sg_rq_end_io(). There is no need to check sfp->closed from read/write/ioctl/poll/etc. since the kernel guarantees that this won't happen. The usefulness of sg_srp_done() was questionable before; now it is definitely not needed. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions