Search Linux Wireless

Re: [PATCH 2/3] ath10k: Ensure peer_map references are cleaned up.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31 March 2016 at 22:59,  <greearb@xxxxxxxxxxxxxxx> wrote:
[...]
> @@ -812,6 +813,15 @@ static void ath10k_peer_cleanup(struct ath10k *ar, u32 vdev_id)
>                         ar->peer_map[peer_id] = NULL;
>                 }
>
> +               /* Double check that peer is properly un-referenced from the peer_map */
> +               for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++) {
> +                       if (ar->peer_map[i] == peer) {
> +                               ath10k_warn(ar, "ERROR:  Faile to properly clean up peer: %p %pM, idx: %d, will fix.\n",
> +                                           peer, peer->addr, i);

The message doesn't fit the style and has typos. I think it's more
in-line with the preceeding warning to:
  "removing stale peer_map entry for %pM (ptr %p idx %d)"


[...]
> @@ -850,6 +861,11 @@ static void ath10k_peer_cleanup_all(struct ath10k *ar)
>                 list_del(&peer->list);
>                 kfree(peer);
>         }
> +
> +       /* Clean up peer-map */

No need for the comment.

> +       for (i = 0; i < ARRAY_SIZE(ar->peer_map); i++)
> +               ar->peer_map[i] = NULL;

Could use memset() as well?


Anyway, thanks for catching these! :)


Michał
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux