]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
dyndbg: fix a BUG_ON in ddebug_describe_flags
authorJim Cromie <jim.cromie@gmail.com>
Sun, 19 Jul 2020 23:10:47 +0000 (17:10 -0600)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Fri, 4 Sep 2020 19:29:03 +0000 (16:29 -0300)
commit828a031ab3942bbc43dff031034c96618d7a0a09
treeb6ca4c7e6de33ae0da3f22e023f8b381b44b196e
parent36e5278f80b0cc8871e8891c91224f56b5c15020
dyndbg: fix a BUG_ON in ddebug_describe_flags

BugLink: https://bugs.launchpad.net/bugs/1892417
[ Upstream commit f678ce8cc3cb2ad29df75d8824c74f36398ba871 ]

ddebug_describe_flags() currently fills a caller provided string buffer,
after testing its size (also passed) in a BUG_ON.  Fix this by
replacing them with a known-big-enough string buffer wrapped in a
struct, and passing that instead.

Also simplify ddebug_describe_flags() flags parameter from a struct to
a member in that struct, and hoist the member deref up to the caller.
This makes the function reusable (soon) where flags are unpacked.

Acked-by: <jbaron@akamai.com>
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20200719231058.1586423-8-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
lib/dynamic_debug.c