[PATCH 13/21] dm: Move printing of dm_ioctl fields before allocation of extra data
Eugene Syromyatnikov
evgsyr at gmail.com
Sun Oct 9 13:30:48 UTC 2016
---
dm.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dm.c b/dm.c
index a11196f..73a9b57 100644
--- a/dm.c
+++ b/dm.c
@@ -335,6 +335,10 @@ dm_known_ioctl(struct tcb *tcp, const unsigned int code, long arg)
goto skip;
}
+ dm_decode_device(code, ioc);
+ dm_decode_values(tcp, code, ioc);
+ dm_decode_flags(ioc);
+
if (ioc->data_size > sizeof(ioc)) {
extra = malloc(ioc->data_size);
if (extra) {
@@ -346,9 +350,6 @@ dm_known_ioctl(struct tcb *tcp, const unsigned int code, long arg)
}
}
}
- dm_decode_device(code, ioc);
- dm_decode_values(tcp, code, ioc);
- dm_decode_flags(ioc);
if (abbrev(tcp))
tprints(", ...");
else
--
1.7.10.4
More information about the Strace-devel
mailing list