Re: [PATCH] P2P: Notify dbus about removing of stale group id

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

 



On Thu, 2019-01-03 at 20:58 +0530, Amit Khatri wrote:
> During PD request processing wpa_supplicant remove stale group.
> but not notifying to dbus for persistent group to unregister object.
> Some time it cause to crash in wpa_config_get_all() function.
> because during persistent group register
> "wpas_dbus_register_persistent_group" ->
> "wpa_dbus_register_object_per_iface"
> if DBUS_ERROR_OBJECT_PATH_IN_USE error occur; this indicate dbus
> knows object name; It should not happen;
> e.g.
> register a object on wpa_supplicant startup
> /fi/w1/wpa_supplicant1/PersistentGroups/3 but some how 3 numbered id
> removed during PD request processing of stale group. which tends to
> DBUS_ERROR_OBJECT_PATH_IN_USE error.
> and you execute GetAll properties of PersistentGroups/3 could crash
> wpa_supplicant
> 
> Signed-off-by: Amit Khatri <amit7861234@xxxxxxxxx>
> ---
>  wpa_supplicant/p2p_supplicant.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/wpa_supplicant/p2p_supplicant.c
> b/wpa_supplicant/p2p_supplicant.c
> index 3049894..c1d15a2 100644
> --- a/wpa_supplicant/p2p_supplicant.c
> +++ b/wpa_supplicant/p2p_supplicant.c
> @@ -3918,6 +3918,8 @@ static int wpas_remove_stale_groups(void *ctx,
> const u8 *peer, const u8 *go,
>  
>  		/* Remove stale persistent group */
>  		if (s->mode != WPAS_MODE_P2P_GO || s->num_p2p_clients
> <= 1) {
> +			wpa_dbg(MSG_ERROR,"Removing stale group
> ssid  id = %d",s->id);
> +			wpas_notify_persistent_group_removed(wpa_s,s);

Small nit, but wpa_supplicant code style uses a space after the comma
between arguments, eg:

wpas_notify_persistent_group_removed(wpa_s, s);

same for the wpa_dbg() just above.

Thanks,
Dan

>  			wpa_config_remove_network(wpa_s->conf, s->id);
>  			save_config = 1;
>  			continue;


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux