[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Oct 2017 21:11:30 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: Mario Limonciello <mario.limonciello@...l.com>
Cc: dvhart@...radead.org, Andy Shevchenko <andy.shevchenko@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
platform-driver-x86@...r.kernel.org,
Andy Lutomirski <luto@...nel.org>, quasisec@...gle.com,
rjw@...ysocki.net, mjg59@...gle.com, hch@....de,
Greg KH <greg@...ah.com>
Subject: Re: [PATCH v6 13/14] platform/x86: wmi: create character devices
when requested by drivers
On Monday 09 October 2017 17:51:51 Mario Limonciello wrote:
> + /* make sure we're not calling a higher instance than exists*/
> + if (_IOC_NR(cmd) > wblock->gblock.instance_count - 1)
> + return -EINVAL;
Is this condition really working? instance_count is unsigned, cmd is
also unsigned... and when instance_count is zero, then IIRC error would
not be thrown.
--
Pali Rohár
pali.rohar@...il.com
Powered by blists - more mailing lists