Category: Linux

[XTENSA]: Fix use of skb after netif_rx

Author: Julia Lawall <julia@diku.dk> Recently, Wang Chen submitted a patch (d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb) after a subsequent reference to skb, because netif_rx may call kfree_skb on its argument. The same problem occurs in some other drivers as well. This was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) // @@ expression skb, e,e1; …

Continue reading

[UM]: Fix use of skb after netif_rx

Author: Julia Lawall <julia@diku.dk> Recently, Wang Chen submitted a patch (d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb) after a subsequent reference to skb, because netif_rx may call kfree_skb on its argument. The same problem occurs in some other drivers as well. This was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) // @@ expression skb, e,e1; …

Continue reading

drivers/serial/uartlite.c: Add missing of_node_put

Author: Julia Lawall <julia@diku.dk> There should be an of_node_put when breaking out of a loop that iterates using for_each_compatible_node. This was detected and fixed using the following semantic patch. (http://www.emn.fr/x-info/coccinelle/) // @@ identifier d; type T; expression e; iterator for_each_compatible_node; @@ T *d; … for_each_compatible_node(d,…) {… when != of_node_put(d) when != e = d ( …

Continue reading