From: Yossi Etigin Date: Mon, 20 Apr 2009 20:58:08 +0000 (-0700) Subject: IPoIB: Disable NAPI while CQ is being drained X-Git-Tag: v2.6.30-rc4~5^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e028cc55cc5c90a1c57eefe560a0cbb4df1fed14;p=pandora-kernel.git IPoIB: Disable NAPI while CQ is being drained If NAPI is enabled while IPoIB's CQ is being drained, it creates a race on priv->ibwc between ipoib_poll() and ipoib_drain_cq(), leading to memory corruption. The solution is to enable/disable NAPI in ipoib_ib_dev_{open/stop}() instead of in ipoib_{open/stop}(), and sync NAPI on the INITIALIZED flag instead on the ADMIN_UP flag. This way NAPI will be disabled when ipoib_drain_cq() is called. This fixes . Signed-off-by: Yossi Etigin Signed-off-by: Roland Dreier --- Reading git-diff-tree failed