lkml.org 
[lkml]   [2015]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 5/8] platform: goldfish: pipe: don't log when dropping PIPE_ERROR_AGAIN
Date
From: Greg Hackmann <ghackmann@google.com>

On PIPE_ERROR_AGAIN, just stopping in the middle of a transfer and
returning the number of bytes actually handled is the right behavior.

Other errors should be returned on the next read() or write() call.
Continue logging those until we confirm nothing actually relies on the
existing (wrong) behavior of dropping errors on the floor.

Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Jin Qian <jinqian@android.com>
---
drivers/platform/goldfish/goldfish_pipe.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index 0b187ff..7a56be9 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -346,7 +346,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer,
* cannot change it until we check if any user space
* ABI relies on this behavior.
*/
- pr_info_ratelimited("android_pipe: backend returned error %d on %s\n",
+ if (status != PIPE_ERROR_AGAIN)
+ pr_info_ratelimited("goldfish_pipe: backend returned error %d on %s\n",
status, is_write ? "write" : "read");
ret = 0;
break;
--
2.6.0.rc2.230.g3dd15c0


\
 
 \ /
  Last update: 2015-12-02 21:01    [W:0.058 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site