[PATCH] ath10k: unregister spectral before mac

Kalle Valo kvalo at qca.qualcomm.com
Thu Aug 14 05:41:51 PDT 2014

Simon Wunderlich <sw at simonwunderlich.de> writes:

> On Thursday 14 August 2014 13:12:13 Kalle Valo wrote:
>> Simon Wunderlich <sw at simonwunderlich.de> writes:
>> > If spectral is unregistered after mac80211, the relayfs file has already
>> > been removed recursively by mac/cfg80211, and spectral tries to remove
>> > the file once more, thus leading to double free problems. Better clean
>> > up spectral before to avoid that problem.
>> > 
>> > Reported-by: Kalle Valo <kvalo at qca.qualcomm.com>
>> > Signed-off-by: Simon Wunderlich <sw at simonwunderlich.de>
>> Thanks for checking this. But I'm just wondering why even bother to call
>> relay_close() in the first place if mac80211 recursively removes
>> everything anyway? We don't remove any of the debugfs files anyway.
> We need to relay_close() in any case because this function also causes to 
> clean up internal buffers of relayfs.
> An alternative to this patch could be to instead having 
> remove_buf_file_handler() call debugfs_remove() just do nothing and relay on 
> the upper layers to (recursively) remove that file - then, the relayfs stuff 
> still can get cleaned up. But that's also not very elegant either. If you 
> prefer that I can prepare a patch though ....

Yeah, that's not really any better. I'll apply your original patch.

Kalle Valo

More information about the ath10k mailing list