diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2010-10-29 10:50:44 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-10-29 10:50:50 -0400 |
commit | f2166bb117952404689f0dc42624ee0b54a66e5e (patch) | |
tree | d77eebb80e4f0206a07f574ecd2af87f745d4bc3 /drivers/s390 | |
parent | 196339f1733726ffd69ab81ec1c66678585f5846 (diff) |
[S390] tape: fix dbf usage
Get rid of the format string "%s" usage with volatile strings
to prevent use after free errors in the s390dbf.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/tape_core.c | 9 | ||||
-rw-r--r-- | drivers/s390/char/tape_std.c | 4 |
2 files changed, 6 insertions, 7 deletions
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c index 29c2d73d719d..6c408670e08d 100644 --- a/drivers/s390/char/tape_core.c +++ b/drivers/s390/char/tape_core.c | |||
@@ -1077,15 +1077,14 @@ __tape_do_irq (struct ccw_device *cdev, unsigned long intparm, struct irb *irb) | |||
1077 | /* FIXME: What to do with the request? */ | 1077 | /* FIXME: What to do with the request? */ |
1078 | switch (PTR_ERR(irb)) { | 1078 | switch (PTR_ERR(irb)) { |
1079 | case -ETIMEDOUT: | 1079 | case -ETIMEDOUT: |
1080 | DBF_LH(1, "(%s): Request timed out\n", | 1080 | DBF_LH(1, "(%08x): Request timed out\n", |
1081 | dev_name(&cdev->dev)); | 1081 | device->cdev_id); |
1082 | case -EIO: | 1082 | case -EIO: |
1083 | __tape_end_request(device, request, -EIO); | 1083 | __tape_end_request(device, request, -EIO); |
1084 | break; | 1084 | break; |
1085 | default: | 1085 | default: |
1086 | DBF_LH(1, "(%s): Unexpected i/o error %li\n", | 1086 | DBF_LH(1, "(%08x): Unexpected i/o error %li\n", |
1087 | dev_name(&cdev->dev), | 1087 | device->cdev_id, PTR_ERR(irb)); |
1088 | PTR_ERR(irb)); | ||
1089 | } | 1088 | } |
1090 | return; | 1089 | return; |
1091 | } | 1090 | } |
diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c index 03f07e5dd6e9..3c3f342149ec 100644 --- a/drivers/s390/char/tape_std.c +++ b/drivers/s390/char/tape_std.c | |||
@@ -47,8 +47,8 @@ tape_std_assign_timeout(unsigned long data) | |||
47 | device->cdev_id); | 47 | device->cdev_id); |
48 | rc = tape_cancel_io(device, request); | 48 | rc = tape_cancel_io(device, request); |
49 | if(rc) | 49 | if(rc) |
50 | DBF_EVENT(3, "(%s): Assign timeout: Cancel failed with rc = %i\n", | 50 | DBF_EVENT(3, "(%08x): Assign timeout: Cancel failed with rc = " |
51 | dev_name(&device->cdev->dev), rc); | 51 | "%i\n", device->cdev_id, rc); |
52 | } | 52 | } |
53 | 53 | ||
54 | int | 54 | int |