projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
027581f
)
dm crypt: fix avoid cloned bio ref after free
author
Olaf Kirch
<
[email protected]
>
Wed, 9 May 2007 09:32:52 +0000
(
02:32
-0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 9 May 2007 19:30:46 +0000
(12:30 -0700)
Do not access the bio after generic_make_request
We should never access a bio after generic_make_request - there's no guarantee
it still exists.
Signed-off-by: Olaf Kirch <
[email protected]
>
Signed-off-by: Alasdair G Kergon <
[email protected]
>
Cc: Jens Axboe <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/md/dm-crypt.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-crypt.c
b/drivers/md/dm-crypt.c
index db439363f97d61eddf3148b535348e49580993e2..1dc2c62200ee97b9b06cf406c7cbbd9f1eaa757d 100644
(file)
--- a/
drivers/md/dm-crypt.c
+++ b/
drivers/md/dm-crypt.c
@@
-655,9
+655,12
@@
static void process_write(struct crypt_io *io)
generic_make_request(clone);
+ /* Do not reference clone after this - it
+ * may be gone already. */
+
/* out of memory -> run queues */
if (remaining)
- congestion_wait(
bio_data_dir(clone)
, HZ/100);
+ congestion_wait(
WRITE
, HZ/100);
}
}