Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752614AbeAETOm (ORCPT + 1 other); Fri, 5 Jan 2018 14:14:42 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:39743 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752511AbeAETOh (ORCPT ); Fri, 5 Jan 2018 14:14:37 -0500 X-Google-Smtp-Source: ACJfBotax/rM3SzEhFQc2eP10XGQWlJGn1MlETWk4z6fpMO2URLOUZCDN49uY+NtHJUZLcn0B44x0A== From: Laura Abbott To: Greg KH , Sumit Semwal Cc: Laura Abbott , devel@driverdev.osuosl.org, LKML , Dan Carpenter Subject: [PATCH 2/2] staging: android: ion: Switch from WARN to pr_warn Date: Fri, 5 Jan 2018 11:14:09 -0800 Message-Id: <20180105191409.17807-2-labbott@redhat.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180105191409.17807-1-labbott@redhat.com> References: <20180105191409.17807-1-labbott@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Syzbot reported a warning with Ion: WARNING: CPU: 0 PID: 3502 at drivers/staging/android/ion/ion-ioctl.c:73 ion_ioctl+0x2db/0x380 drivers/staging/android/ion/ion-ioctl.c:73 Kernel panic - not syncing: panic_on_warn set ... This is a warning that validation of the ioctl fields failed. This was deliberately added as a warning to make it very obvious to developers that something needed to be fixed. In reality, this is overkill and disturbs fuzzing. Switch to pr_warn for a message instead. Reported-by: syzbot+fa2d5f63ee5904a0115a@syzkaller.appspotmail.com Reported-by: syzbot Signed-off-by: Laura Abbott --- drivers/staging/android/ion/ion-ioctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion-ioctl.c b/drivers/staging/android/ion/ion-ioctl.c index 6ed2cc15c8c0..a8d3cc412fb9 100644 --- a/drivers/staging/android/ion/ion-ioctl.c +++ b/drivers/staging/android/ion/ion-ioctl.c @@ -60,8 +60,10 @@ long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) return -EFAULT; ret = validate_ioctl_arg(cmd, &data); - if (WARN_ON_ONCE(ret)) + if (ret) { + pr_warn_once("%s: ioctl validate failed\n", __func__); return ret; + } if (!(dir & _IOC_WRITE)) memset(&data, 0, sizeof(data)); -- 2.14.3