mtag: don't double record mtag data
commit17651f9b77132b6e9203c384c43cf6cce1323a59
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 18 Feb 2020 11:57:36 +0000 (18 14:57 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 18 Feb 2020 11:57:36 +0000 (18 14:57 +0300)
treea77fba740b7b2c562f6176741703734b1f440b92
parent3f73ebbe07701cfda7066261be0433378f8ca45e
mtag: don't double record mtag data

If we have an assignment like "foo = bar;" then it results in tons of
fake assignments like "foo->x = bar->x;".  Now say that bar points to an
mtag, that means foo points to an mtag.  And the update_mtag_data()
functions wants to record that we're setting mtag->x but that information
is already known so there is no need to record it.

Also I guess if we're doing a fresh_alloc() then we're not recording that
"foo = kmalloc();" sets foo->x to unknown.  (The problem is that kzalloc()
actually does set foo->x to zero so that's a bit wrong...)

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