Commit b85df5b8 authored by Linus Torvalds's avatar Linus Torvalds

scsi_ioctl: only warn about unknown opcodes if they are truly unknown.

We could screw up and warn for opcodes that weren't write-safe and the
user tried to use without having write permissions.

Not so bad in itself, but that also destroyed the cmd type information.

Noticed by Michal Schmidt
parent 171b1609
......@@ -199,7 +199,7 @@ static int verify_command(struct file *file, unsigned char *cmd)
return 0;
}
if (!(type & CMD_WARNED)) {
if (!type) {
cmd_type[cmd[0]] = CMD_WARNED;
printk(KERN_WARNING "scsi: unknown opcode 0x%02x\n", cmd[0]);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment