]> git.baikalelectronics.ru Git - kernel.git/commit
nl802154: stricter input checking for boolean inputs
authorStefan Schmidt <stefan@osg.samsung.com>
Thu, 20 Aug 2015 10:09:47 +0000 (12:09 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 28 Aug 2015 19:00:37 +0000 (21:00 +0200)
commite472a4d2fdd88ad8ac44471c49d685cf7845a76c
tree079a1a8ccd4fa1aae16d18c14d5e40d0b1d31f23
parent16283dc99909f589a326a5f661ac411006f40dc6
nl802154: stricter input checking for boolean inputs

So far we handled boolean input by forcing them with !! and assigning
them into a bool. This allowed userspace to send values > 1 which were
used as 1. We should be stricter here and return -EINVAL for all but
0 or 1.

Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/ieee802154/nl802154.c