> How about also printing some warning if threshold is zero? Since Hmm, not a warning because a user of a kernel can't do much about it. A debug might make sense; it is for developers and will be compiled away for production use. > caller might expect that if msg->len >= threshold, they will get valid > pointer. But they will get valid pointer if (msg->len, threshold) is > (>0, 0) and NULL if (=0, 0). So warn them that the threshold is bogus. Well, callers should always check for NULL because a valid pointer can not be guaranteed (ENOMEM case). And I still don't get why would you want a valid DMA-able pointer if the msg length is 0? Thanks!
Attachment:
signature.asc
Description: PGP signature