Tag: af32b36095147e1828496b58987c1e24ef40487d

mtd: lantiq-flash: drop iounmap for devm_ allocated data

Author: Julia Lawall <julia@diku.dk> Data allocated with devm_ioremap or devm_ioremap_nocache should not be freed using iounmap, because doing so causes a dangling pointer, and a subsequent double free. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ expression x; @@ ( x = devm_ioremap(…) | x = devm_ioremap_nocache(…) ) @@ expression …

Continue reading