diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2015-12-17 19:06:02 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-12-18 14:43:21 +0100 |
commit | 272fa59ccb4fc802af28b1d699c2463db6a71bf7 (patch) | |
tree | 9c8bb0a6d3691063fac0f41198ff3fca43bd879e /drivers | |
parent | 2bc53b8046ce9a1543204b6c6da1ab95e4caac76 (diff) | |
download | linux-272fa59ccb4fc802af28b1d699c2463db6a71bf7.tar.bz2 |
s390/dis: Fix handling of format specifiers
The print_insn() function returns strings like "lghi %r1,0". To escape the
'%' character in sprintf() a second '%' is used. For example "lghi %%r1,0"
is converted into "lghi %r1,0".
After print_insn() the output string is passed to printk(). Because format
specifiers like "%r" or "%f" are ignored by printk() this works by chance
most of the time. But for instructions with control registers like
"lctl %c6,%c6,780" this fails because printk() interprets "%c" as
character format specifier.
Fix this problem and escape the '%' characters twice.
For example "lctl %%%%c6,%%%%c6,780" is then converted by sprintf()
into "lctl %%c6,%%c6,780" and by printk() into "lctl %c6,%c6,780".
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions