Search Linux Wireless

Re: [PATCH v3] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT

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

 



Hi,

On 13 December 2016 at 10:33, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> [snip]
>
> Please fix coding style, particularly indentation.

Ok, fixed the wrapped lines.

>
>> +static void cfg80211_disconnect_wk(struct work_struct *work)
>> +{
>> +       struct cfg80211_registered_device *rdev;
>> +       struct wireless_dev *wdev;
>> +
>> +       wdev = container_of(work, struct wireless_dev, disconnect_wk);
>> +       rdev = wiphy_to_rdev(wdev->wiphy);
>
>
> Those should also be possible as initializers on the same line, I
> guess?
>
> It might also be worthwhile moving this function into a better file,
> even if then it needs a prototype in core.h (it can't be inlined anyway
> since it's called through a function pointer in the work struct)

Ok, I pick sme.c because cfg80211_disconnect is there and I renamed
this function to autodisconnect_wk to avoid confusion.

>
>> +       if (!wdev->netdev)
>> +               return;
>
> This obviously cannot happen.
>
> All the code you added to nl80211.c is racy.

Will use wdev_lock in the command handlers.

Best regards



[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