Lingbo Kong <quic_lingbok@xxxxxxxxxxx> writes: >>> +struct ath12k_vif *ath12k_mac_get_vif_up(struct ath12k_base *ab) >>> +{ >>> + struct ath12k *ar; >>> + struct ath12k_pdev *pdev; >>> + struct ath12k_vif *arvif; >>> + int i; >>> + >>> + for (i = 0; i < ab->num_radios; i++) { >>> + pdev = &ab->pdevs[i]; >>> + ar = pdev->ar; >>> + list_for_each_entry(arvif, &ar->arvifs, list) { >>> + if (arvif->is_up) >>> + return arvif; >>> + } >>> + } >>> + >>> + return NULL; >>> +} >> I'm not seeing any protection here, is that on purpose? > > you means there need to add lockdep_assert_held(&ar->conf_mutex)? I mean what's the locking design here? Is it safe to concurrectly access ab->pdevs and arvif->is_up? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches