From patchwork Mon Mar 24 11:33:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3882471 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1EBBEBF540 for ; Mon, 24 Mar 2014 11:33:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20156201C0 for ; Mon, 24 Mar 2014 11:33:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89B7E2018E for ; Mon, 24 Mar 2014 11:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752241AbaCXLdl (ORCPT ); Mon, 24 Mar 2014 07:33:41 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:40736 "EHLO mail-lb0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbaCXLdk (ORCPT ); Mon, 24 Mar 2014 07:33:40 -0400 Received: by mail-lb0-f180.google.com with SMTP id 10so3429489lbg.25 for ; Mon, 24 Mar 2014 04:33:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=c0CySzqirWuXXoC6nSjnS9FCgfdKH11PqdsZQ0tEp54=; b=Mren774LarP3GQYMvsij4bKypWdxEHhTMKyL2/8rnmh4QRkKUGLH5w0+kElck3BYXJ p9NTaiXv0quyS6RI3SNHEpUBEk8Q8BuW4BOhtldQZap/Y7O+Jvv7qmxtDqv6703U/8yu xXg+r8Oi0nX0t7L/ODf7P2rSR3Q1aLIUCJ3aYprlbhSoRm6bju9tBEz1vFe+MUW4cgtA H7nklTOjmfsSZeo/P+Wjuhia0Ca694davqDv1tQZXGCKxg5gPXHMS14t0xextzl2tNX+ 5npUb14O9Dd2Z5wGSg2UgnSK39iia50S8VFlvDmVxJnhgbq8kaZoVjatS4xMnG72UFtm +UCA== X-Gm-Message-State: ALoCoQnQ7812V0bLfzEhAHYExumllIo6ef7UOMXX91vWY/KlkwUJfv1rBdvpNHtDVQDIUhSV3p1c X-Received: by 10.152.2.225 with SMTP id 1mr1257253lax.37.1395660819359; Mon, 24 Mar 2014 04:33:39 -0700 (PDT) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id q4sm9355499lbl.14.2014.03.24.04.33.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Mar 2014 04:33:38 -0700 (PDT) Message-ID: <5330180E.5030802@dev.mellanox.co.il> Date: Mon, 24 Mar 2014 07:33:34 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Tomer Cohen Subject: [PATCH opensm] osm_qos_parser_y.y: Added range check for rate limit parsing Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tomer Cohen Signed-off-by: Tomer Cohen Signed-off-by: Hal Rosenstock OSM_QOS_POLICY_MAX_RATE || *p_num < OSM_QOS_POLICY_MIN_RATE) + { + yyerror("rate limit is out of range, value: %d", *p_num); + free(p_num); + cl_list_remove_all(&tmp_parser_struct.num_list); + return 1; + } p_current_qos_level->rate_limit = (uint8_t)(*p_num); free(p_num); p_current_qos_level->rate_limit_set = TRUE;