Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3927678imm; Mon, 8 Oct 2018 11:49:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV60+7dxaYPnEr/f9KjBky70l+71rDPdrjkqSN6n+OmV+f6dJiOuTB2z6WF0m63suoyRg0m4h X-Received: by 2002:a62:8910:: with SMTP id v16-v6mr26373149pfd.106.1539024590356; Mon, 08 Oct 2018 11:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539024590; cv=none; d=google.com; s=arc-20160816; b=Ly3xHKEDtDqmK3tFAzIzUw9Y06Ty3JMBLep1mX3JKptD2kdV1c7kOboT1TahWdIpLe hfm1ubOo+dZaYLLxD6zhkRLW/uByIUYFAEdKxq1IdfPhQK3jO9s53MT+9N6q+Vl9IYh6 urX9uzvUAI7Cft7cmzwNFQxWiiitJrV7dD/4y81WJcbv0FTUHXYCoFtCTPGEREm9yk8V TaLaHqyMyu7hwnXMgZl1RKOFuIt/8j8+NcWJOOHwVQZUF62WhPQYxj2JJgNsbk7FCDh3 uqIM3cI3c1RIqD1gM/dTv1XIS93UOKcdQLb4a2oaTssoMhVbYxl5QrSTBnFeB6C7mmtR EZqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KvWo7d/x5v43OkA35h8NqpAfg37T0ZKKfaDiXMVbSx8=; b=SeOQUFMuexonS/GslbD0sz7NOC31jASnqRbGPmqkZjtWra/BXhl95UTLd/1adB2/NI 4pRHsVf8syUdBDocWX0i3AbONUDDfdj95j0X7z1ok/ngOFrIM7dd5tpeTcQXDhzv0MUc sVinsKsOvWtVCs8PVRcj/ox6jl0rLdH/W4x1+LGdZyuXJvvkX6fQT+34WuBUAKdAxW4I m/qH2ozPP2bt/o3lFyYnG0TiIfCxH/od3CUKWLUkS2M5Ww0DGSshPguTzZZB/2DOjrmZ nl/2E8waxB4Xn6HmiI4ogaM2WH9RPcpBFUpEB3gZyW5qMj0G/sUjLPmcX+rYHrXLUE4W 07zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ILpOVGYk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2-v6si17321466plo.412.2018.10.08.11.49.34; Mon, 08 Oct 2018 11:49:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ILpOVGYk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731620AbeJICBU (ORCPT + 99 others); Mon, 8 Oct 2018 22:01:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:50304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728239AbeJICBT (ORCPT ); Mon, 8 Oct 2018 22:01:19 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 47413204FD; Mon, 8 Oct 2018 18:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539024492; bh=NDgYbCf3K/X/0Bg78tqBgoLfka4p377X8rJqMlZ936s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ILpOVGYkEyH+ddYe1s2ML/Bz3qaGQj55VEn8wo8OOK+3P2ri0nXldVtv6JBC5KMXD 1Rb19P4tRPjSR+U6EwWzRJaB9yleyBlL5vfnPIzlmQkDfstCRjtqYv9jcnntkAhaWv gw2M88qqiAALzBglkwGSQXSuDWEOBgKQI3QLMIOg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Johannes Berg , Sasha Levin Subject: [PATCH 4.18 057/168] mac80211: fix an off-by-one issue in A-MSDU max_subframe computation Date: Mon, 8 Oct 2018 20:30:37 +0200 Message-Id: <20181008175622.220586721@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181008175620.043587728@linuxfoundation.org> References: <20181008175620.043587728@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lorenzo Bianconi [ Upstream commit 66eb02d839e8495ae6b612e2d09ff599374b80e2 ] Initialize 'n' to 2 in order to take into account also the first packet in the estimation of max_subframe limit for a given A-MSDU since frag_tail pointer is NULL when ieee80211_amsdu_aggregate routine analyzes the second frame. Fixes: 6e0456b54545 ("mac80211: add A-MSDU tx support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3174,7 +3174,7 @@ static bool ieee80211_amsdu_aggregate(st void *data; bool ret = false; unsigned int orig_len; - int n = 1, nfrags, pad = 0; + int n = 2, nfrags, pad = 0; u16 hdrlen; if (!ieee80211_hw_check(&local->hw, TX_AMSDU))