platform: goldfish: pipe: don't log when dropping PIPE_ERROR_AGAIN
authorGreg Hackmann <ghackmann@google.com>
Tue, 29 Jul 2014 19:34:22 +0000 (12:34 -0700)
committerGreg Hackmann <ghackmann@google.com>
Tue, 29 Jul 2014 19:50:11 +0000 (12:50 -0700)
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>
drivers/platform/goldfish/goldfish_pipe.c

index 1283527a0399c33dabffd0605bad6c184bcb7c8d..adda434c1a6b2797ea273202f76669719ddee45d 100644 (file)
@@ -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;