Skip to content

Commit ff5c702

Browse files
committed
accel/habanalabs: move ioctl error print to debug level
We don't want to allow users to spam the kernel log and sending ioctls with bad opcodes is a sure way to do it. Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Ofir Bitton <[email protected]>
1 parent 8a20b38 commit ff5c702

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/accel/habanalabs/common/habanalabs_ioctl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ static long _hl_ioctl(struct file *filep, unsigned int cmd, unsigned long arg,
11951195

11961196
out_err:
11971197
if (retcode)
1198-
dev_dbg(dev, "error in ioctl: pid=%d, cmd=0x%02x, nr=0x%02x\n",
1198+
dev_dbg_ratelimited(dev, "error in ioctl: pid=%d, cmd=0x%02x, nr=0x%02x\n",
11991199
task_pid_nr(current), cmd, nr);
12001200

12011201
if (kdata != stack_kdata)
@@ -1219,7 +1219,7 @@ long hl_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
12191219
if ((nr >= HL_COMMAND_START) && (nr < HL_COMMAND_END)) {
12201220
ioctl = &hl_ioctls[nr];
12211221
} else {
1222-
dev_err(hdev->dev, "invalid ioctl: pid=%d, nr=0x%02x\n",
1222+
dev_dbg_ratelimited(hdev->dev, "invalid ioctl: pid=%d, nr=0x%02x\n",
12231223
task_pid_nr(current), nr);
12241224
return -ENOTTY;
12251225
}
@@ -1242,7 +1242,7 @@ long hl_ioctl_control(struct file *filep, unsigned int cmd, unsigned long arg)
12421242
if (nr == _IOC_NR(HL_IOCTL_INFO)) {
12431243
ioctl = &hl_ioctls_control[nr];
12441244
} else {
1245-
dev_err(hdev->dev_ctrl, "invalid ioctl: pid=%d, nr=0x%02x\n",
1245+
dev_dbg_ratelimited(hdev->dev_ctrl, "invalid ioctl: pid=%d, nr=0x%02x\n",
12461246
task_pid_nr(current), nr);
12471247
return -ENOTTY;
12481248
}

0 commit comments

Comments
 (0)