Skip to content

Commit

Permalink
staging: android: ion: Switch from WARN to pr_warn
Browse files Browse the repository at this point in the history
commit e4e179a upstream.

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 <syzkaller@googlegroups.com>
Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
labbott authored and gregkh committed Feb 25, 2018
1 parent 458d2fc commit 3ee287d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/staging/android/ion/ion-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,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));
Expand Down

0 comments on commit 3ee287d

Please sign in to comment.