From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: Marcin Dalecki <dalecki@evision.ag>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: [PATCH] 2.5.30 IDE 113
Date: Tue, 6 Aug 2002 12:16:45 +0200 [thread overview]
Message-ID: <13A77E76028@vcnet.vc.cvut.cz> (raw)
On 6 Aug 02 at 11:02, Marcin Dalecki wrote:
> diff -durNp -X /tmp/diff.hDAz3d linux-2.5.30/drivers/ide/ide-taskfile.c linux/drivers/ide/ide-taskfile.c
> --- linux-2.5.30/drivers/ide/ide-taskfile.c 2002-08-06 01:18:47.000000000 +0200
> +++ linux/drivers/ide/ide-taskfile.c 2002-08-04 02:24:49.000000000 +0200
> @@ -188,41 +188,26 @@ static ide_startstop_t special_intr(stru
>
> int ide_raw_taskfile(struct ata_device *drive, struct ata_taskfile *ar, char *buf)
> {
> - struct request *rq;
> - unsigned long flags;
> + struct request *rq = &drive->srequest;
> struct ata_channel *ch = drive->channel;
> request_queue_t *q = &drive->queue;
> - struct list_head *queue_head = &q->queue_head;
> DECLARE_COMPLETION(wait);
> - struct request req;
>
> #ifdef CONFIG_BLK_DEV_PDC4030
> if (ch->chipset == ide_pdc4030 && buf)
> return -ENOSYS; /* special drive cmds not supported */
> #endif
>
> - memset(&req, 0, sizeof(req));
> - rq = &req;
> -
> - rq->flags = REQ_SPECIAL;
> + memset(rq, 0, sizeof(*rq));
> +
Hi Marcin,
what synchronizes these accesses to make sure that you do not have
two ide_raw_taskfile requests on the flight, both using same
drive->srequest? It looks to me like that nothing, so you can overwrite
request's contents while somebody else already uses this buffer.
Petr Vandrovec
vandrove@vc.cvut.cz
next reply other threads:[~2002-08-06 10:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-06 10:16 Petr Vandrovec [this message]
2002-08-06 10:20 ` [PATCH] 2.5.30 IDE 113 Marcin Dalecki
2002-08-06 10:42 ` Jens Axboe
2002-08-06 10:43 ` Marcin Dalecki
2002-08-06 10:54 ` Jens Axboe
2002-08-06 10:52 ` Marcin Dalecki
2002-08-06 11:05 ` Jens Axboe
2002-08-06 11:09 ` Marcin Dalecki
2002-08-06 11:17 ` Jens Axboe
2002-08-06 11:57 ` Marcin Dalecki
-- strict thread matches above, loose matches on Subject: below --
2002-08-06 10:35 Petr Vandrovec
2002-08-06 10:44 ` Jens Axboe
2002-08-06 10:47 ` Marcin Dalecki
2002-08-06 11:03 ` Jens Axboe
2002-08-06 11:04 ` Marcin Dalecki
2002-08-06 11:12 ` Jens Axboe
2002-08-06 9:02 Marcin Dalecki
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=13A77E76028@vcnet.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=dalecki@evision.ag \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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