From owner-p4-projects@FreeBSD.ORG Tue May 29 14:45:25 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 35F9016A421; Tue, 29 May 2007 14:45:25 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F216016A400 for ; Tue, 29 May 2007 14:45:24 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id E330713C45A for ; Tue, 29 May 2007 14:45:24 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l4TEjOVA072288 for ; Tue, 29 May 2007 14:45:24 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l4TEjOqo072275 for perforce@freebsd.org; Tue, 29 May 2007 14:45:24 GMT (envelope-from rdivacky@FreeBSD.org) Date: Tue, 29 May 2007 14:45:24 GMT Message-Id: <200705291445.l4TEjOqo072275@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 120558 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2007 14:45:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=120558 Change 120558 by rdivacky@rdivacky_witten on 2007/05/29 14:44:59 Dont allow zero or negative pid/tid arguments to tgkill/tkill. Affected files ... .. //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/linux/linux_signal.c#2 edit Differences ... ==== //depot/projects/soc2007/rdivacky/linux_futex/sys/compat/linux/linux_signal.c#2 (text+ko) ==== @@ -550,8 +550,8 @@ ka.pid = args->pid; ka.signum = args->sig; - if (args->tgid == -1) - return linux_kill(td, &ka); + if (args->pid <= 0 || args->tgid <= 0) + return EINVAL; if ((p = pfind(args->pid)) == NULL) return ESRCH; @@ -583,6 +583,8 @@ if (ldebug(tkill)) printf(ARGS(tkill, "%i, %i"), args->tid, args->sig); #endif + if (args->tid <= 0) + return EINVAL; return (linux_kill(td, (struct linux_kill_args *) args)); }