linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-scsi@vger.kernel.org
Subject: [Bug 64171] New: Block SCSI Generic Driver does not keep data
Date: Fri, 01 Nov 2013 19:49:52 +0000	[thread overview]
Message-ID: <bug-64171-11613@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=64171

            Bug ID: 64171
           Summary: Block SCSI Generic Driver does not keep data
           Product: SCSI Drivers
           Version: 2.5
    Kernel Version: 2.6.32.61
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: Other
          Assignee: scsi_drivers-other@kernel-bugs.osdl.org
          Reporter: af300wsm@gmail.com
        Regression: No

Data written to any given file descriptor should be unique to that descriptor
and processor space.  Currently, the BSG Driver does not keep this uniqueness. 
As the attached simple program demonstrates, a SCSI Command queued to the
device in one process is dequeued by another process which has opened a handle
to the same device.

The attached file sends the simple SCSI "Test Unit Ready" command from the SCSI
Primary Command Spec. to the device using the BSG driver.  As the program
demonstrates, the sg_io_v4.usr_ptr field, which is set in the "push" branch of
the program, is dequeued from the "pop" branch of the code.

I also tested this behavior on Fedora 19 and the bug exists there as well.  F19
uses kernel 3.9.5.

Compile the attachment:
g++ -o <out> combined.cpp


Execute as follows:
sudo combined pop /dev/bsg/0:0:0:0 &
sudo combined push /dev/bsg/0:0:0:0

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2013-11-01 19:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 19:49 bugzilla-daemon [this message]
2013-11-01 19:52 ` [Bug 64171] Block SCSI Generic Driver does not keep data bugzilla-daemon
2013-11-02 16:59 ` [Bug 64171] New: " Douglas Gilbert
2013-11-02 17:09 ` [Bug 64171] " bugzilla-daemon
2013-11-15 16:42   ` James Bottomley
2013-11-19  6:15     ` Douglas Gilbert
2013-11-15 15:52 ` bugzilla-daemon
2013-11-15 15:55 ` [Bug 64171] Block SCSI Generic Driver does not maintain file handle context bugzilla-daemon
2013-11-19  6:16 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64171-11613@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).