Skip to content

Commit

Permalink
platform: goldfish: pipe: don't log when dropping PIPE_ERROR_AGAIN
Browse files Browse the repository at this point in the history
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.

Change-Id: I578b17ef54cd00d6003bbce1ecf9438e3ae3657e
Signed-off-by: Greg Hackmann <ghackmann@google.com>
  • Loading branch information
greghackmann committed Jul 29, 2014
1 parent 3c56d07 commit 1bebc76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/platform/goldfish/goldfish_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,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;
Expand Down

0 comments on commit 1bebc76

Please sign in to comment.