From: Jack Morgenstein Date: Tue, 15 May 2012 10:35:02 +0000 (+0000) Subject: net/mlx4_core: Fix potential kernel Oops in res tracker during Dom0 driver unload X-Git-Tag: v3.5-rc1~109^2~59 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8924951f633a0bb78972ef583d58ca8c26d8e73;p=pandora-kernel.git net/mlx4_core: Fix potential kernel Oops in res tracker during Dom0 driver unload Currently the slave and master resources are deleted after master freed all bitmaps. If any resources were not properly cleaned up during the shutdown process, an Oops would result. Fix so that delete slave (only) resources during cleanup. Master resources are cleaned up during unload process, and need not separately be cleaned. Note that during cleanup, we need to split the resource-tracker freeing functionality. Before removing all the bitmaps, we free any leftover slave resources. However, we can only remove the resource tracker linked list after all bitmap frees, since some of the freeing functions (e.g., mlx4_cleanup_eq_table) use paravirtualized FW commands which expect the resource tracker linked list to be present. Found-by: Aviad Yehezkel Signed-off-by: Jack Morgenstein Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller --- Reading git-diff-tree failed