Only squawk when md->start is NULL on non-zero length.
The md->start == NULL check prevents anyone from creating a ME/MD
with no buffer. These are used as backstop buffers to generate events
when traffic has exceeded the local buffer space.
See Oracle bug 21103 attachment 32922.
Change-Id: Id4fdf26b047df56cdf034952fea15f9a4e0dba62
Signed-off-by: Wally Wang <wang@cray.com>
int
lnet_md_validate(lnet_md_t *umd)
{
- if (umd->start == NULL) {
- CERROR("MD start pointer can not be NULL\n");
+ if (umd->start == NULL && umd->length != 0) {
+ CERROR("MD start pointer can not be NULL with length %u\n",
+ umd->length);
return -EINVAL;
}