stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "staging: rtl8822be: Keep array subscript no lower than zero" has been added to the 4.14-stable tree
@ 2017-12-06 17:26 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-12-06 17:26 UTC (permalink / raw)
  To: Larry.Finger, alexander.levin, fengguang.wu, gregkh
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    staging: rtl8822be: Keep array subscript no lower than zero

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     staging-rtl8822be-keep-array-subscript-no-lower-than-zero.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Wed Dec  6 18:04:41 CET 2017
From: Larry Finger <Larry.Finger@lwfinger.net>
Date: Sat, 23 Sep 2017 19:36:04 -0500
Subject: staging: rtl8822be: Keep array subscript no lower than zero

From: Larry Finger <Larry.Finger@lwfinger.net>


[ Upstream commit 43d15c2013130a9fa230c2f5203aca818ae0bb86 ]

The kbuild test robot reports the following:
   drivers/staging//rtlwifi/phydm/phydm_dig.c: In function 'odm_pause_dig':
   drivers/staging//rtlwifi/phydm/phydm_dig.c:494:45: warning: array subscript is below array bounds [-Warray-bounds]
      odm_write_dig(dm, dig_tab->pause_dig_value[max_level]);

This condition is caused when a loop falls through. The fix is to pin
max_level to be >= 0.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
c: kbuild test robot <fengguang.wu@intel.com>
Fixes: 9ce99b04b5b82fdf11e4c76b60a5f82c1e541297 staging: r8822be: Add phydm mini driver
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/rtlwifi/phydm/phydm_dig.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/staging/rtlwifi/phydm/phydm_dig.c
+++ b/drivers/staging/rtlwifi/phydm/phydm_dig.c
@@ -490,6 +490,8 @@ void odm_pause_dig(void *dm_void, enum p
 				break;
 		}
 
+		/* pin max_level to be >= 0 */
+		max_level = max_t(s8, 0, max_level);
 		/* write IGI of lower level */
 		odm_write_dig(dm, dig_tab->pause_dig_value[max_level]);
 		ODM_RT_TRACE(dm, ODM_COMP_DIG,


Patches currently in stable-queue which might be from Larry.Finger@lwfinger.net are

queue-4.14/staging-rtl8822be-fix-wrong-dma-unmap-len.patch
queue-4.14/staging-rtl8822be-keep-array-subscript-no-lower-than-zero.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-06 17:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-06 17:26 Patch "staging: rtl8822be: Keep array subscript no lower than zero" has been added to the 4.14-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).