rpmsg: virtio_rpmsg_bus: replace "%p" with "%pK"
authorSuman Anna <s-anna@ti.com>
Wed, 24 Oct 2018 01:19:09 +0000 (20:19 -0500)
committerSuman Anna <s-anna@ti.com>
Tue, 3 Sep 2019 16:42:28 +0000 (11:42 -0500)
[ Upstream commit de4064af76537f13d74a814a962f4524e81436ac ]

The virtio_rpmsg_bus driver uses the "%p" format-specifier for
printing the vring buffer address. This prints only a hashed
pointer even for previliged users. Use "%pK" instead so that
the address can be printed during debug using kptr_restrict
sysctl.

[s-anna@ti.com: cherry-pick commit 'de4064af7653' from v5.4]
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/rpmsg/virtio_rpmsg_bus.c

index d9f401dd253402cccf1035722d78712c6bea7673..465042ad1ae36ddfe4385c34cb2e01ca9870e69d 100644 (file)
@@ -943,7 +943,7 @@ static int rpmsg_probe(struct virtio_device *vdev)
                goto vqs_del;
        }
 
-       dev_dbg(&vdev->dev, "buffers: va %p, dma %pad\n",
+       dev_dbg(&vdev->dev, "buffers: va %pK, dma %pad\n",
                bufs_va, &vrp->bufs_dma);
 
        /* half of the buffers is dedicated for RX */