From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B04AC4338F for ; Mon, 9 Aug 2021 09:11:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7733B6101D for ; Mon, 9 Aug 2021 09:11:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234167AbhHIJMG (ORCPT ); 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-usb@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