]> www.infradead.org Git - mtd-utils.git/commit
flash_{un,}lock: don't allow "last byte + 1"
authorBrian Norris <computersforpeace@gmail.com>
Mon, 31 Aug 2015 21:34:55 +0000 (14:34 -0700)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 11 Nov 2015 22:05:36 +0000 (14:05 -0800)
commitba224c47a1f71f01c0e65da85718247af91a5cc4
tree0fd23d040bb730a529d7b4c6ab9b499bbcbc742c
parentc1bda1eaf2c80388fdd959a41d9da18d437d019e
flash_{un,}lock: don't allow "last byte + 1"

A lock/unlock/islocked ioctl() should be prevented from anything past
the last byte, inclusive. But we were doing an exclusive check.

This isn't a big deal, as the kernel MTD APIs would be guarding this
anyway, but let's do this for completeness.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
flash_unlock.c