linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* re: ath9k: Add concurrent WLAN and BT tx support for MCI based chips
@ 2012-11-26 21:03 Dan Carpenter
  2012-11-27  8:28 ` Rajkumar Manoharan
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-11-26 21:03 UTC (permalink / raw)
  To: rmanohar; +Cc: linux-wireless, ath9k-devel

Hello Rajkumar Manoharan,

The patch db60428b1af1: "ath9k: Add concurrent WLAN and BT tx support
for MCI based chips" from Oct 12, 2012, leads to the following
warning:
drivers/net/wireless/ath/ath9k/btcoex.c:414
	ath9k_hw_btcoex_set_concur_txprio()
		error: buffer overflow 'stomp_txprio' 4 <= 4

stomp_txprio has 4 elements.
	u8 stomp_txprio[] = { 0, 0, 0, 0 }; /* all, low, none, low_ftp */

drivers/net/wireless/ath/ath9k/btcoex.c
   408  void ath9k_hw_btcoex_set_concur_txprio(struct ath_hw *ah, u8 *stomp_txprio)
   409  {
   410          struct ath_btcoex_hw *btcoex = &ah->btcoex_hw;
   411          int i;
   412  
   413          for (i = 0; i < ATH_BTCOEX_STOMP_MAX; i++)
                                ^^^^^^^^^^^^^^^^^^^^
This is 5.

   414                  btcoex->tx_prio[i] = stomp_txprio[i];
                                             ^^^^^^^^^^^^^^
We are reading one positition past the end of the array.

   415  }

Possibly we need to add some code to handle ATH_BTCOEX_STOMP_AUDIO which
was added recently in 2884561a "ath9k: stomp audio profiles on weak
signal strength."

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ath9k: Add concurrent WLAN and BT tx support for MCI based chips
  2012-11-26 21:03 ath9k: Add concurrent WLAN and BT tx support for MCI based chips Dan Carpenter
@ 2012-11-27  8:28 ` Rajkumar Manoharan
  2012-11-27  8:49   ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Rajkumar Manoharan @ 2012-11-27  8:28 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-wireless, ath9k-devel

On Tue, Nov 27, 2012 at 12:03:37AM +0300, Dan Carpenter wrote:
> Hello Rajkumar Manoharan,
> 
> The patch db60428b1af1: "ath9k: Add concurrent WLAN and BT tx support
> for MCI based chips" from Oct 12, 2012, leads to the following
> warning:
> drivers/net/wireless/ath/ath9k/btcoex.c:414
> 	ath9k_hw_btcoex_set_concur_txprio()
> 		error: buffer overflow 'stomp_txprio' 4 <= 4
> 
Dan,

Thanks a lot. Is there a way to enable all checks while building smatch tool?

-Rajkumar

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ath9k: Add concurrent WLAN and BT tx support for MCI based chips
  2012-11-27  8:28 ` Rajkumar Manoharan
@ 2012-11-27  8:49   ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-11-27  8:49 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linux-wireless, ath9k-devel

On Tue, Nov 27, 2012 at 01:58:35PM +0530, Rajkumar Manoharan wrote:
> On Tue, Nov 27, 2012 at 12:03:37AM +0300, Dan Carpenter wrote:
> > Hello Rajkumar Manoharan,
> > 
> > The patch db60428b1af1: "ath9k: Add concurrent WLAN and BT tx support
> > for MCI based chips" from Oct 12, 2012, leads to the following
> > warning:
> > drivers/net/wireless/ath/ath9k/btcoex.c:414
> > 	ath9k_hw_btcoex_set_concur_txprio()
> > 		error: buffer overflow 'stomp_txprio' 4 <= 4
> > 
> Dan,
> 
> Thanks a lot. Is there a way to enable all checks while building smatch tool?
> 

This one requires the sqlite database to get the cross function
info.  It's a two compile process, the first builds the db and the
next does the test.  Replace the path names as appropriate:

~/progs/smatch/devel/smatch_scripts/build_kernel_data.sh
~/progs/smatch/devel/smatch_scripts/test_kernel.sh

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-27  8:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26 21:03 ath9k: Add concurrent WLAN and BT tx support for MCI based chips Dan Carpenter
2012-11-27  8:28 ` Rajkumar Manoharan
2012-11-27  8:49   ` Dan Carpenter

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).