Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp2514471pxt; Mon, 9 Aug 2021 02:15:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyowHJaLBbRfksTGuisE4TpjJwdzeWCoDj+WTl5tFgb1S0AVLRbO7RhspvW247yjMD4N5p X-Received: by 2002:aa7:cdcf:: with SMTP id h15mr28719724edw.45.1628500529466; Mon, 09 Aug 2021 02:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628500529; cv=none; d=google.com; s=arc-20160816; b=Atxlf9hQBSbvOsqtviRmGFkq/VxQj+iAtAQgVENCANnXz8+L4DtaatXThNlswi1Bzy dN0EajZB/2Hi+97h5WFV8Tc+OFacXHCp1BeqJEJRjwsEo2qGTPYoq144EVFJC/r+XZn9 cFGdefefXi6Qymn4y/Xmdz7qTXvfTTd9BlguDT3GL1G2eQo++ZMcXXZazoB7ezKpfrjy XMF8sBGzk+I4CGMLaCMGp80aLw+FbrSoc7AQ/TpyevlUd8F+gExb+JMPevq4xjffR29q sXi5VMQnDdhYjSIV9TvGM1T0m/RnjOE3RKE3qmdoc6C3BGkmYLtCS3+7l29mlsS3Smki K8fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=whpHWTZeU7NsBd9OFkVGyz+jf6wB7w5dnrLfMFni/iw=; b=J4MwTmLlOAxkCSLTTSlputtUMXqwoRDAeM9xEoBK0q0MxLhkdWABsOMX2lxR+6gi/B 6IDMRRn/cG5t1/rrBnzj4i4ZRIuJ379H3sgbb+o+LKcwBOT9Ln5FCE64d3HhjyrCAsBD B8LPFEefBx2PeN0O9duEppb6Oiy67Ai10IGxxIsJiB4f0/8li1ZRiWwKyGrEjqNLmxZE byH4C5QwG5UPyYYRVBca/vYEBhaaH1W+MChxI/Lqq1q6jySHlMAWWgDcs211iKHirIB2 47xOeJ81aTueS/EXz9aBzdltBQMsLbfuMZA/NFqTIgT0Oq6EceQvMnbwLgqysyw7juhs 4tyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AAfCz0PG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k20si5857736edr.586.2021.08.09.02.15.06; Mon, 09 Aug 2021 02:15:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AAfCz0PG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234180AbhHIJMG (ORCPT + 99 others); Mon, 9 Aug 2021 05:12:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:59798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234130AbhHIJMG (ORCPT ); Mon, 9 Aug 2021 05:12:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A562D6101D; Mon, 9 Aug 2021 09:11:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628500305; bh=UCLknj9tc8LczjOHUUN+VpDgDoLql2fB1/oOaHk0U18=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AAfCz0PGiIhXhwGWCYjbYcGQe5P9XYiS7XrTSkAINzG3Tv8LOJJSOxhTDE81G7Oty 42Dx+ZcLlxZWtIEOFGroZlWZAAN2A/TVkEM1uRAy8Va3jmvOgXAp+p9uqyjpqBMF3l BP/vLH9aUsg9j2tKycFfDaoEFQG1CDZnFQ8hGSVk= Date: Mon, 9 Aug 2021 11:11:42 +0200 From: Greg Kroah-Hartman To: Ikjoon Jang Cc: linux-usb@vger.kernel.org, Chunfeng Yun , linux-mediatek@lists.infradead.org, Matthias Brugger , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mathias Nyman Subject: Re: [RFC PATCH] usb: xhci-mtk: handle bandwidth table rollover Message-ID: References: <20210809165904.RFC.1.I5165a4a8da5cac23c9928b1ec3c3a1a7383b7c23@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210809165904.RFC.1.I5165a4a8da5cac23c9928b1ec3c3a1a7383b7c23@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 09, 2021 at 04:59:29PM +0800, Ikjoon Jang wrote: > xhci-mtk has 64 slots for periodic bandwidth calculations and each > slot represents byte budgets on a microframe. When an endpoint's > allocation sits on the boundary of the table, byte budgets' slot > should be rolled over but the current implementation doesn't. > > This patch applies a 6 bits mask to the microframe index to handle > its rollover 64 slots and prevent out-of-bounds array access. > > Signed-off-by: Ikjoon Jang > --- > > drivers/usb/host/xhci-mtk-sch.c | 79 +++++++++------------------------ > drivers/usb/host/xhci-mtk.h | 1 + > 2 files changed, 23 insertions(+), 57 deletions(-) Why is this "RFC"? What needs to be addressed in this change before it can be accepted? thanks, greg k-h