On Mon, 17 Mar 2014, Mike Snitzer wrote: > > > I do however want you to add yet another BUG_ON for any bio that isn't > > > meant to be sent to this interface (only one so far is REQ_FLUSH AFAIK). > > > > Then, it triggers NULL pointer dereference. You don't have to add BUG_ON > > for it, it crashes anyway. > > I understand it'll NULL pointer, but that is _always_ confusing for > someone who wasn't the original developer. Please add the explicit > BUG_ON() for REQ_FLUSH. The user will not hit a BUG with REQ_FLUSH. Regarding the developer - it is expected that the kernel developer is able to decode the oops message, compare it with disassembled code and find out which variable was NULL. The function is small, so it's an easy task. We don't really need BUG_ON(!pointer); variable = *pointer; Mikulas -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel