Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752972AbdHTJTx (ORCPT ); Sun, 20 Aug 2017 05:19:53 -0400 Received: from mail-db5eur01on0080.outbound.protection.outlook.com ([104.47.2.80]:6304 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752810AbdHTJTu (ORCPT ); Sun, 20 Aug 2017 05:19:50 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=tariqt@mellanox.com; Subject: Re: [PATCH 3.16 124/134] net/mlx4_en: Avoid adding steering rules with invalid ring To: Ben Hutchings , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: akpm@linux-foundation.org, "David S. Miller" , Talat Batheesh References: From: Tariq Toukan Message-ID: <02d91acf-4b22-bb2e-8617-9277423c5789@mellanox.com> Date: Sun, 20 Aug 2017 12:19:41 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: VI1PR0102CA0034.eurprd01.prod.exchangelabs.com (2603:10a6:802::47) To DB5PR05MB1798.eurprd05.prod.outlook.com (2a01:111:e400:5bc5::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d602d525-04e7-4d76-2f6e-08d4e7ac9a44 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DB5PR05MB1798; X-Microsoft-Exchange-Diagnostics: 1;DB5PR05MB1798;3:icKLIb8V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KeT/qrFJYYGeyl/jYl0CvqHuCNnnorEF3mfI47PNHeJRcLckBMlJVGs/8YjRHYwO+EdBr4M6DWAuN9mhKGkQDHQ3+9AlzxA856YBGTxtLtFsI+h74eZUJiQKO8YwmdVGeW1zvphX4qlR9q7d0p3nAp4dofdohGsnPuys2GeJEqBnr39pYP4WJQaRzcPfZp8Vss1KsGjyNU6VIjH8UoiSrp8yZmrMnpfgT4iKzgpzrwU69j0e4WpxCAXtMJ8CtywSPkcTFvqviP7jLDN/DfPxT6Mn5CPvKBfITmVJRTyVk/Wu/goz9H8coZ0GwkRMiIWObLb+QIH2rRNj;4:QyrQqOyzYmoaO91+thjGDak2+xd6FvlnNYFA00UMehxaV2eBmVr9XedWYEEICXEkSH3ACt4gfuqinYSAtMZmmj8JMNOWnxafBXnGGlW4NryPDtUgmjCgvQ6TnVF5jpB70qfulTOU5+GYewzS6H/rbkEG49QxxyM6FqtdY9mg40kPpbAE/mglav6Dj0RGrkBxeSYPddupvTBPg8IhE1a3FEaW+TssJYN3LpEZl5dMxBt6S0RVnupiFjGRBSyDmbQI X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB5PR05MB1798;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB5PR05MB1798; X-Forefront-PRVS: 040513D301 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(7370300001)(4630300001)(6009001)(6049001)(39860400002)(24454002)(377454003)(199003)(189002)(81166006)(2950100002)(81156014)(31696002)(8676002)(31686004)(7350300001)(478600001)(25786009)(5660300001)(50986999)(54356999)(76176999)(65826007)(189998001)(86362001)(101416001)(6666003)(33646002)(47776003)(42186005)(65806001)(50466002)(66066001)(65956001)(6246003)(36756003)(106356001)(105586002)(305945005)(53936002)(64126003)(107886003)(7736002)(54906002)(110136004)(6116002)(230700001)(6486002)(4326008)(3846002)(4001350100001)(77096006)(5890100001)(2906002)(229853002)(83506001)(23676002)(97736004)(53546010)(68736007);DIR:OUT;SFP:1101;SCL:1;SRVR:DB5PR05MB1798;H:[10.8.2.253];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjVQUjA1TUIxNzk4OzIzOnUyUDRuY0pjRmY4ak9ZY0xXYjNvQlFRdERq?= =?utf-8?B?dCticFhBSkkyTlEwWWdKaklYMXdvMEhFM2d2VUY2eVhEbFNoaUxtRk51cE45?= =?utf-8?B?cXhEVEVoa1ZnNnFqUytvY243bXFwRDYrcHFKK09hdkxDSGFGQWN5T3F6Q3BB?= =?utf-8?B?RzVkM0Rqd2ZHM2x3RExuUW43ZG0xN0dXeEs2ZjNoVkE3ME9JeXp2OG9jaFgz?= =?utf-8?B?eWZNcjcyNktLRFdYbndXMmI2NStKRkE3MGRvbnFFSldrb1ZNUjdQMzRod3hu?= =?utf-8?B?S3l1bzZTalBpeERISXVoNU1Wd0lYVUlFZnNrdkp5RmdXaW1qVU96VjBpQUc0?= =?utf-8?B?cnQ4L0pmQkp0czkwaGFobWFLbjlzMm03MFN0Y2VuR1JWS25pM21VSXFqenp1?= =?utf-8?B?WnpGeTRMMUxiQU02Rmx4ZGxVcDczekNNR1AySGJJNEF3amFjbzVIR2Z0c3pF?= =?utf-8?B?YzV3ZnBTY3dMWURyT21HSGR5bkJuYi9wZ0MvcFlGREFSZ0tKbi96Y1hBdjhN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LQE01pl/q1JAcwEwtmf3Ftdxv2uhiaWwG7pds/mm4fUzdlGvYRTSgzF/HjvLLyPQrSJYXg5Kalz0+wOyQfHJJAPs8Ax9stZAMUEYCA==;24:mM4SD7NL4fy18ZJQNQw4PgyepxZDbMKq5CSAOFe+mU3Fca5337opc28zVYDLSzsY3wSams+2DkS7Sxlag6cY5VVuvmutW7c86K5yI+bwGr4=;7:yiDA3/E5TScWgdxE1mRzxYpCu9k686qnRD/m+gma9PfYd6SAPxNuMncX1Ry36MNrArcEXmly+B2qh1BdNvu5NbD7p68oXOBtMXopDN7xE2TxWm3SpcCvFYgGVyRtItkK8TMXaJW3BHOww2fVH2M+gcLKOVsKgjv+RYk4ob4/+OhprisPv9+zyhMw65Qfa9JMHw48TBoJFmtKNzSo5DU4I4rbgtVx2Idd4tVaWjqmKI8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Aug 2017 09:19:46.5414 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1798 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1518 Lines: 41 On 18/08/2017 4:13 PM, Ben Hutchings wrote: > 3.16.47-rc1 review patch. If anyone has any objections, please let me know. Please notice that there's a fix for this patch, here: 6dc06c08bef1 net/mlx4: Fix the check in attaching steering rules > > ------------------ > > From: Talat Batheesh > > commit 89c557687a32c294e9d25670a96e9287c09f2d5f upstream. > > Inserting steering rules with illegal ring is an invalid operation, > block it. > > Fixes: 820672812f82 ('net/mlx4_en: Manage flow steering rules with ethtool') > Signed-off-by: Talat Batheesh > Signed-off-by: Tariq Toukan > Signed-off-by: David S. Miller > Signed-off-by: Ben Hutchings > --- > drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 5 +++++ > 1 file changed, 5 insertions(+) > > --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c > +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c > @@ -930,6 +930,11 @@ static int mlx4_en_flow_replace(struct n > qpn = priv->drop_qp.qpn; > else if (cmd->fs.ring_cookie & EN_ETHTOOL_QP_ATTACH) { > qpn = cmd->fs.ring_cookie & (EN_ETHTOOL_QP_ATTACH - 1); > + if (qpn < priv->rss_map.base_qpn || > + qpn >= priv->rss_map.base_qpn + priv->rx_ring_num) { > + en_warn(priv, "rxnfc: QP (0x%x) doesn't exist\n", qpn); > + return -EINVAL; > + } > } else { > if (cmd->fs.ring_cookie >= priv->rx_ring_num) { > en_warn(priv, "rxnfc: RX ring (%llu) doesn't exist\n", >