datapath: add skb_clone NULL check in the recirc action.
authorAndy Zhou <azhou@nicira.com>
Thu, 10 Jul 2014 07:30:27 +0000 (00:30 -0700)
committerAndy Zhou <azhou@nicira.com>
Thu, 10 Jul 2014 21:58:55 +0000 (14:58 -0700)
commit37dfe5264b7a832f9e447217585df68158881578
treefda805701bcaa093cc41c11217f4d689cb265d2a
parentaa359b5f8b5c2e887a7b7d6434d04c7a04fe6d3d
datapath: add skb_clone NULL check in the recirc action.

Refactoring recirc action implementation.

The main change is to fix a bug where the NULL check after skb clone()
call is missing.  The fix is to return -ENOMEM whenever skb_clone()
failed to create a clone.

Also rearranged adjacent code to improve readability.

Reported-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/actions.c