IB/ehca: Use proper GFP_ flags for get_zeroed_page()
authorHoang-Nam Nguyen <hnguyen@linux.vnet.ibm.com>
Tue, 9 Jan 2007 17:04:14 +0000 (18:04 +0100)
committerRoland Dreier <rolandd@cisco.com>
Tue, 9 Jan 2007 22:14:24 +0000 (14:14 -0800)
commitf2d9136133de257abbd97fec6f624d3a73d1e1fd
treeeece9275aaab3755855d49bbbaef9ec430fdd634
parent98714cb161b4b1a5d0c5bd0337a8578196b73677
IB/ehca: Use proper GFP_ flags for get_zeroed_page()

Here is a patch for ehca to use proper flag, ie. GFP_ATOMIC
resp. GFP_KERNEL, when calling get_zeroed_page() to prevent "Bug:
scheduling while atomic...". This error does not cause a kernel panic
but makes ipoib un-usable afterwards.  It is reproducible on
2.6.20-rc4 if one does ifconfig down during a flood ping test.  I have
not observed this error in earlier releases incl. 2.6.20-rc1.

This error occurs when a qp event/irq is received and ehca event
handler allocates a control block/page to obtain HCA error data block.
Use of GFP_ATOMIC when in interrupt context prevents this issue.

Signed-off-by Hoang-Nam Nguyen <hnguyen@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ehca/ehca_hca.c
drivers/infiniband/hw/ehca/ehca_irq.c
drivers/infiniband/hw/ehca/ehca_iverbs.h
drivers/infiniband/hw/ehca/ehca_main.c
drivers/infiniband/hw/ehca/ehca_mrmw.c
drivers/infiniband/hw/ehca/ehca_qp.c