lkml.org 
[lkml]   [2021]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rpmsg: virtio_rpmsg_bus: use dev_warn_ratelimited for msg with no recipient
Date
From: Alexandru Ardelean <ardeleanalex@gmail.com>

Even though it may be user-space's fault for this error (some application
terminated or crashed without cleaning up it's endpoint), the rpmsg
communication should not overflow the syslog with too many messages.

A dev_warn_ratelimited() seems like a good alternative in case this can
occur.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
---
drivers/rpmsg/virtio_rpmsg_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index 8e49a3bacfc7..546f0fb66f1d 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -749,7 +749,7 @@ static int rpmsg_recv_single(struct virtproc_info *vrp, struct device *dev,
/* farewell, ept, we don't need you anymore */
kref_put(&ept->refcount, __ept_release);
} else
- dev_warn(dev, "msg received with no recipient\n");
+ dev_warn_ratelimited(dev, "msg received with no recipient\n");

/* publish the real size of the buffer */
rpmsg_sg_init(&sg, msg, vrp->buf_size);
--
2.31.1
\
 
 \ /
  Last update: 2021-09-28 15:29    [W:0.107 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site