linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Derek Foreman <manmower@signalmarketing.com>
To: Jens Axboe <axboe@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: CDROM_SEND_PACKET oddity
Date: Sun, 28 Sep 2003 11:56:32 -0500 (CDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0309281149590.3337@uberdeity.signalmarketing.com> (raw)
In-Reply-To: <20030928085119.GJ15415@suse.de>

On Sun, 28 Sep 2003, Jens Axboe wrote:

> On Sat, Sep 27 2003, Derek Foreman wrote:
> > On Sat, 27 Sep 2003, Jens Axboe wrote:
> > 
> > -			memcpy(hdr.cmdp, cgc.cmd, sizeof(cgc.cmd));
> > +			hdr.cmdp = (unsigned char *)arg
> > +			         + offsetof(struct cdrom_generic_command, cmd);
> 
> No that's buggy, arg is a user pointer. It needs to read:
> 
> 			hdr.cmdp = cgc.cmd;

Actually, hdr.cmdp is expected to be a user pointer.  in sg_io we do

        rq->cmd_len = hdr->cmd_len;
        if (copy_from_user(rq->cmd, hdr->cmdp, hdr->cmd_len))
                goto out_request;
        if (sizeof(rq->cmd) != hdr->cmd_len)

  reply	other threads:[~2003-09-28 16:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-27  3:33 CDROM_SEND_PACKET oddity Derek Foreman
2003-09-27 11:47 ` Jens Axboe
2003-09-27 12:27   ` Jens Axboe
2003-09-27 17:54     ` Jens Axboe
2003-09-27 18:11       ` Derek Foreman
2003-09-28  3:50       ` Derek Foreman
2003-09-28  8:51         ` Jens Axboe
2003-09-28 16:56           ` Derek Foreman [this message]
2003-09-28 18:14             ` Jens Axboe
2003-09-28 21:02               ` Derek Foreman

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=Pine.LNX.4.58.0309281149590.3337@uberdeity.signalmarketing.com \
    --to=manmower@signalmarketing.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@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).