> -----Original Message----- > From: ath10k <ath10k-bounces@xxxxxxxxxxxxxxxxxxx> On Behalf Of Kalle Valo > Sent: Tuesday, April 30, 2019 5:37 PM > To: Nicolas Boichat <drinkcat@xxxxxxxxxxxx> > Cc: Claire Chang <tientzu@xxxxxxxxxxxx>; linux-wireless@xxxxxxxxxxxxxxx; > ath10k@xxxxxxxxxxxxxxxxxxx; Wen Gong <wgong@xxxxxxxxxxxxxx> > Subject: [EXT] Re: [PATCH] ath10k: add peer id check in > ath10k_peer_find_by_id > >> --- a/drivers/net/wireless/ath/ath10k/txrx.c > >> +++ b/drivers/net/wireless/ath/ath10k/txrx.c > >> @@ -157,6 +157,9 @@ struct ath10k_peer > *ath10k_peer_find_by_id(struct ath10k *ar, int peer_id) > >> { > >> struct ath10k_peer *peer; > >> > >> + if (peer_id >= sizeof(peer->peer_ids) * BITS_PER_BYTE) > > > > I'd use >= BITS_PER_TYPE(peer->peer_ids). > > Nice, I didn't know about that. Wen, please submit v2 using this. > > -- > Kalle Valo Yes, I have send v2 yesterday: [PATCH v2] ath10k: add peer id check in ath10k_peer_find_by_id > > _______________________________________________ > ath10k mailing list > ath10k@xxxxxxxxxxxxxxxxxxx > http://lists.infradead.org/mailman/listinfo/ath10k