]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
iommu/omap: Fix debug_read_tlb() to use seq_printf()
authorSalva Peiró <speirofr@gmail.com>
Thu, 23 Jul 2015 12:26:19 +0000 (14:26 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 3 Aug 2015 15:23:41 +0000 (17:23 +0200)
commite203db293863fa15b4b1917d4398fb5bd63c4e88
treef5f4dcbded8e90623ee1aab4d5519a032e25a86a
parent5835b6a64ce39434d5cc9857769c73982d488b42
iommu/omap: Fix debug_read_tlb() to use seq_printf()

The debug_read_tlb() uses the sprintf() functions directly on the buffer
allocated by buf = kmalloc(count), without taking into account the size
of the buffer, with the consequence corrupting the heap, depending on
the count requested by the user.

The patch fixes the issue replacing sprintf() by seq_printf().

Signed-off-by: Salva Peiró <speirofr@gmail.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/omap-iommu-debug.c