From patchwork Mon Mar 24 11:33:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3882481 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 F0847BF540 for ; Mon, 24 Mar 2014 11:33:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23D06201C0 for ; Mon, 24 Mar 2014 11:33:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4AEF52018E for ; Mon, 24 Mar 2014 11:33:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752249AbaCXLdv (ORCPT ); Mon, 24 Mar 2014 07:33:51 -0400 Received: from mail-bk0-f43.google.com ([209.85.214.43]:45837 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbaCXLdv (ORCPT ); Mon, 24 Mar 2014 07:33:51 -0400 Received: by mail-bk0-f43.google.com with SMTP id v15so444371bkz.16 for ; Mon, 24 Mar 2014 04:33:49 -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=pmRNViPQXW9oSNGJjzB0e2YeqFLRydYNvimByLes63I=; b=VhBu29cbvy1rqAlCM97QiDyZGdEUbRvQlphPqsL4eLdQLWVn1+c7b0MVwbWzwk8S9R lsRTWPWw2oW7x1CT6fPzSVkCKlpIta5UTVLSX6Mz8DrYj0oxizUXGlZG9eKlR6bXDAus 3RX5P/3SGS8+T0pjKcUJHvyG1ZHjLUvtJ8aRXCCYSFbkzoiGvAvC+7+KQczWBWDkKL4W 3/pY/dUvb+55SkqX3TfSj9o1zFSXDWFJ206DTD/lat1g2GA4bgS7P3UQ46/Nw2gq84eP DOywt52WMNADnyYwPIRd/E6Cl0dnSVEM2wYyyvg6+bGOIyLbh2lLeti3udnJUSnZFFJP z/xg== X-Gm-Message-State: ALoCoQlve3Lt7/6ie7CWGCu/+wmVYeK6jJhlgjh5ZUAZDkcxrj5RRBd/9msILuPU12HluQNLJ6YJ X-Received: by 10.204.180.67 with SMTP id bt3mr35849466bkb.16.1395660829667; Mon, 24 Mar 2014 04:33:49 -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 ey13sm13822600bkb.11.2014.03.24.04.33.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Mar 2014 04:33:48 -0700 (PDT) Message-ID: <5330181A.4000804@dev.mellanox.co.il> Date: Mon, 24 Mar 2014 07:33:46 -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 mtu limit parsin 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_MTU || *p_num < OSM_QOS_POLICY_MIN_MTU) + { + yyerror("mtu 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->mtu_limit = (uint8_t)(*p_num); free(p_num); p_current_qos_level->mtu_limit_set = TRUE;