From: H Hartley Sweeten Date: Thu, 17 Apr 2014 17:07:47 +0000 (-0700) Subject: staging: comedi: drivers: properly validate cmd->scan_end_arg X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~36^2~1339 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f50cebb9baa5fd0e561f436bd53ffa35df16edb2;p=pandora-kernel.git staging: comedi: drivers: properly validate cmd->scan_end_arg When the async command 'scan_end_src' is TRIG_COUNT the 'scan_end_arg' is the cmd->chanlist_len. Fix a couple open-coded drivers. Add the check to the drivers that do not validate this command argument. The core validates that the cmd->chanlist_len is <= s->len_chanlist. During the post config after the attach the core also make sure that the s->len_chanlist is initialized. For clarity, initialize the s->len_chanlist in a couple drivers that are relying on the core to initialize it to '1'. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed