[ofa-general] Re: [PATCH 1/2] RDMA/nes: Correct handling of PBL resources
Roland Dreier
rdreier at cisco.com
Tue Oct 28 14:41:18 PDT 2008
> + if (nesfmr->nesmr.pbls_used != 0) {
> + spin_lock_irqsave(&nesadapter->pbl_lock, flags);
> + if (nesfmr->nesmr.pbl_4k) {
> + nesadapter->free_4kpbl += nesfmr->nesmr.pbls_used;
> + BUG_ON(nesadapter->free_4kpbl > nesadapter->max_4kpbl);
> + } else {
> + nesadapter->free_256pbl += nesfmr->nesmr.pbls_used;
> + BUG_ON(nesadapter->free_256pbl > nesadapter->max_256pbl);
> + }
> + spin_unlock_irqrestore(&nesadapter->pbl_lock, flags);
Can we make these WARN_ON instead of BUG_ON? Killing the machine just
because of a nes driver bug is kind of rude, and it reduces the chance
of actually getting the debug output.
- R.
More information about the general
mailing list