param_limit: make mtag limits more generic
commit5b3c30b59544df43d9ade5cca84b9c2aec1c53e6
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Sep 2018 14:46:24 +0000 (14 17:46 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Sep 2018 14:46:24 +0000 (14 17:46 +0300)
tree4d51d9733462e45c680151f0c3e3f711905ddbc0
parentf02a2f5053f0f64f425eb621822c90960e356950
param_limit: make mtag limits more generic

Say a function is only called with a known mtag parameter.  Then it has
a check for NULL "if (!p) return -EINVAL;" that is an impossible path and
we CULL it.  Fine.  But then the success path is limited to a specific
mtag.

So then we add a new caller, which passes a different mtag.  Then smatch is
like this mtag is impossible on every return path...  And it creates a
bunch of problems.  So what this does is we replace mtag limits with
"valid pointer" instead.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_param_limit.c