Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 24 Nov 2002 06:48:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 24 Nov 2002 06:48:50 -0500 Received: from leon.mat.uni.torun.pl ([158.75.2.17]:54454 "EHLO Leon.mat.uni.torun.pl") by vger.kernel.org with ESMTP id ; Sun, 24 Nov 2002 06:48:49 -0500 Date: Sun, 24 Nov 2002 12:55:45 +0100 (CET) From: Michal Wronski X-X-Sender: wrona@Leon To: linux-kernel@vger.kernel.org cc: Peter Waechtler , Krzysztof Benedyczak , "Gustafson, Geoffrey R" , "Abbas, Mohamed" Subject: Re: [PATCH] unified SysV and POSIX mqueues - complete rewrite In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 619 Lines: 21 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/