On Tue, 2011-12-20 at 10:21 +0000, Bart Van Assche wrote:
> On Mon, Dec 19, 2011 at 12:07 AM, David Dillow <[email protected]> wrote:
> > They use a BUG_ON instead of WARN_ON, which
> > seems more appropriate, since we just overran a buffer...
> 
> Sorry, but I disagree. The guideline for Linux kernel code is to use
> BUG_ON() only if a crash can't be avoided. With SLUB red zoning
> enabled it is still possible to unload kernel modules after a (mild)
> buffer overrun. And if you have a look at mm/slub.c, you will see that
> slab_err() is invoked in case padding has been overwritten. That last
> function does something similar to WARN_ON().

You aren't guaranteed to have SLUB as your allocator, much less having
the red-zoning turned on, so you have no guarantee it is safe to
continue.

-- 
Dave Dillow
National Center for Computational Science
Oak Ridge National Laboratory
(865) 241-6602 office

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to