From: Zwane Mwaikambo <zwane@arm.linux.org.uk>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: William Lee Irwin III <wli@holomorphy.com>,
Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>,
Jens Axboe <axboe@suse.de>
Subject: Re: [PATCH][2.6] WARN_ON_STACK_VAR aka fighting variable lifetime bugs
Date: Sat, 9 Aug 2003 15:33:23 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.53.0308091529540.32166@montezuma.mastecende.com> (raw)
In-Reply-To: <Pine.LNX.4.53.0308091430410.32166@montezuma.mastecende.com>
This patch adds some elevator checks for stack variables, there are
in fact some in theory in the ide_do_drive_cmd path when the caller passes
args via rq->special as a stack variable and does not call with ide_wait*.
Index: linux-2.6-wli/drivers/block/elevator.c
===================================================================
RCS file: /home/cvs/linux-2.5/drivers/block/elevator.c,v
retrieving revision 1.48
diff -u -p -B -r1.48 elevator.c
--- linux-2.6-wli/drivers/block/elevator.c 27 Jul 2003 01:42:20 -0000 1.48
+++ linux-2.6-wli/drivers/block/elevator.c 9 Aug 2003 18:16:09 -0000
@@ -230,6 +230,11 @@ void __elv_add_request(request_queue_t *
{
struct list_head *insert = &q->queue_head;
+ if (!rq->waiting) {
+ WARN_ON_STACK_VAR(rq);
+ WARN_ON_STACK_VAR(rq->special);
+ }
+
if (at_end)
insert = insert->prev;
if (plug)
next prev parent reply other threads:[~2003-08-09 19:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-09 19:29 Zwane Mwaikambo
2003-08-09 19:33 ` Zwane Mwaikambo [this message]
2003-08-11 18:43 ` David Mosberger
2003-08-11 18:41 ` Zwane Mwaikambo
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.53.0308091529540.32166@montezuma.mastecende.com \
--to=zwane@arm.linux.org.uk \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=wli@holomorphy.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
all inboxes | Powered by JetHome®