Re: [PATCH] unified SysV and POSIX mqueues - complete rewrite

Michal Wronski (wrona@mat.uni.torun.pl)
Sun, 24 Nov 2002 12:55:45 +0100 (CET)


I found a "bug" in your implementation:

+ if (!(q = get_mqueue(filp)))
+ return -EBADF;
+ if ((filp->f_mode & O_ACCMODE) == O_RDONLY)
+ return -EBADF;
+ if ((unsigned int) msg_prio > (unsigned int) MQ_PRIO_MAX)
+ return -EINVAL;
+ if (msg_len > q->attr.mq_msgsize)
+ return -EMSGSIZE;

POSIX says: "The value of msg_prio shall be less than {MQ_PRIO_MAX}."

Michal Wronski

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/