From nobody Fri Nov 29 00:44:57 2024 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4E0F27733 for ; Sat, 28 Sep 2024 10:04:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727517848; cv=none; b=B8wpo5W20jx9yHzmjznRmZyjkL2AHTZJCnwA9D1to1yBukZ8wfd9rkNe1HDGRXIXHxGE0o99NLaBSK6er2aeZYAdGxaXPz6x3a2rZh+jF7/UYgd5/cBhBUvX1/2frVzDbOqSdJ4FrcOYiIlst3jjF/22bfeDhpyJDWnwIqca09s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727517848; c=relaxed/simple; bh=4+1mwT5zLcDgrEjzOfG3P87kf1xwTT+nnr6GaCcnKBA=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=cQw3ZhaeStVAwsdz+QWhFFOPNQQEbIhkR6luobpk9k1SyyRrvLZ/ZsshNnbWcMDq84cYA7Uv1z4eZCxv97xjPOlaWjuuZVk+vk3YZUT+nv1vi6V2nPnD3PIRyxJzqo79gaotyQnTqvr2YS4D31Zt2i+ORqs214b67f6pPzu0PDc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=z59+6Mbn; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="z59+6Mbn" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-42ca6ba750eso17900555e9.0 for ; Sat, 28 Sep 2024 03:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727517845; x=1728122645; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=BtK7Ih0GNRwfLjqmfDTPx6+2O4u4ad9cD8UabTfETxE=; b=z59+6Mbn0z12d0b6sfK3VujYXpDl+fAONeq6/3sRkzxfclJOo0YdqcHN8qMLffwNIb nOnmj6tC1TN3jdRd0Mt6ATBTD5+sThmB0Y7lCFzUCOG0MxmHr2qRWO60kEiJNcvkDFos kjkW3K+K+Zr+j7c+sehw0q3cjzcsIEGMSmU7d1z7s/CIw9+70XtdxssTUjo4vbJ2Z0J7 LAwg8sR67A5wyIOKgiNGMifq4ezv4IZ91S6Cd1I+yl93ekw4Wa/Md0ki/5AqTZCd47CQ ut0H0gO9AC5Wi+SNqMq6gopKeTUt4GDUHgrCwWUHvUK+bA6ESBvM1F6ptLfXtgLxHwmM JV0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727517845; x=1728122645; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BtK7Ih0GNRwfLjqmfDTPx6+2O4u4ad9cD8UabTfETxE=; b=umN4R0YTeqm5eFJKbaK2TaErcnvQCGkJcHCL6fdzfT0coCiFOzy2z4A19l44IJ6ARS SaRnGA2hhKSx2YIV+s3bLshMA/grvkYgXWddXvoejVOSRtInVYXs1XW4OPliC4jzo5dM 7QPiFJ5+dCQnnftU4esJagtVyJx9ffhrsRV3ewIBepniP2T3HGlKNExaB/wRFlpf8LHx Bc3dWDnsyTJqHLCMn4f2XYLPOhBRWuEqCjIHcTYnXMcUqdDeGfRuEgWGDgJ9z4XQIwUN Zp/r+ReipUmIVxGMnrV3cO+624ly7R8TNftn8KVRKPyTi4/EbRuKKeuNwWrJkkBmG5Pv eT2Q== X-Forwarded-Encrypted: i=1; AJvYcCUYW9j7m+i8QUPv+kOrWAU43QV56ewBL+9OQ2VzcXB8brr0LimupHBoxjBcCiOabjySsyxsiNeCMBDGWhA=@vger.kernel.org X-Gm-Message-State: AOJu0Ywfq+Y67Lx/pj8JvoQT3mVzxi/YtMprhcXGmydyTAQK2viDLMOc mMqtcc0fwN0YqwwANecLPbrjlHkbeL70wSrmpIXkmLdej+qPbzjkMFYDGabHQzg= X-Google-Smtp-Source: AGHT+IFU0bjRjLrQLfM0b06xv21LP9ly86RjBkJWZbMkiF/UDbns48K3HU5bwc/Yb08Uix53u3u4mg== X-Received: by 2002:a05:600c:1d08:b0:42c:b697:a62c with SMTP id 5b1f17b1804b1-42f521ce1a4mr63768475e9.5.1727517845154; Sat, 28 Sep 2024 03:04:05 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e969ddb4csm97336095e9.6.2024.09.28.03.04.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 03:04:04 -0700 (PDT) Date: Sat, 28 Sep 2024 13:04:01 +0300 From: Dan Carpenter To: Roger Quadros Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Julien Panis , Dan Carpenter , Alexander Sverdlin , Grygorii Strashko , Chintan Vankar , Simon Horman , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH v2 net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code Message-ID: <8e7960cc-415d-48d7-99ce-f623022ec7b5@stanley.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This error handling has a typo. It should i++ instead of i--. In the original code the error handling will loop until it crashes. Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue R= x") Signed-off-by: Dan Carpenter Reviewed-by: Alexander Sverdlin Reviewed-by: Roger Quadros --- v2: The first version of this patch had white space corruption and didn't a= pply. drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/etherne= t/ti/am65-cpsw-nuss.c index cbe99017cbfa..d253727b160f 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -763,7 +763,7 @@ static int am65_cpsw_nuss_common_open(struct am65_cpsw_= common *common) k3_udma_glue_disable_rx_chn(rx_chn->rx_chn); =20 fail_rx: - for (i =3D 0; i < common->rx_ch_num_flows; i--) + for (i =3D 0; i < common->rx_ch_num_flows; i++) k3_udma_glue_reset_rx_chn(rx_chn->rx_chn, i, &rx_chn->flows[i], am65_cpsw_nuss_rx_cleanup, 0); =20 --=20 2.45.2