mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
A few more fixes:
* prevent value bounce/glitch in rfkill GPIO probe * fix lockdep report in rfkill * fix error path leak in mac80211 key handling * use system_unbound_wq for wiphy work since it can take longer -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEpeA8sTs3M8SN2hR410qiO8sPaAAFAmUvhKQACgkQ10qiO8sP aAB+3A//eNEP5W9ZigsZ5pPYuxKyXoctyV3Qp8yChYWHEE46JbbnQsvvvGa6SYFu TzWS3dShLqXU83pWHrvNSuWo/AySaoT4kDp7c8TK7GIed8MHxguU9QXaPVqQiNEG tmAVwPz5y8Y4NzjytBU0MjuAfbWo/HTIs5nKxBhNTJp3imqlezCnhYz4pMjc0rcN CnWKH8bYW+ubqnJVi0l01GDwtGs4xROf+43is6sA8zu0zA3gx+V0BJdx3J7t1Jrd qCBmi8ZSFcUZ/GLqYE04MdlHGRrzGR5p+Rq+/MsF3AUoobIrbkVIXXP0VoPpLAqf xZwccVhWXI1ZGM3T5L91hrhONcwoCA67m79qhMcr2KZZ0flhBjNLVqCXXRAXn0Hs /gynjrvGVaZMYlJegAd0iOIAOn9FjYcdcYgYhDRFdbRCt7eCRSj3YMuO9rFhX6kL tbmIII6vMoPunzSwUeNI1CXUmJoTJMnzwWVPC0EZqT2gymhBAeS/GK8ELC3lG1dz aXoxX2dCHMk2rv86B3g/Pk2j0smxCNd+hXjFVfJIJ+t1xp8TvuEI8AGrae1nNzck c2cPn34u/5PLkO5bJqu2JgF9qAHgArqfPIFIKLZNcpAOvqCNWqSozc5KtNQ4ASMt f/cnPGQUxcHekAFsJWB9aqwW3oPAUkWR6tJ8jYHxZC47oGs/qnY= =Sth1 -----END PGP SIGNATURE----- Merge tag 'wireless-2023-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== A few more fixes: * prevent value bounce/glitch in rfkill GPIO probe * fix lockdep report in rfkill * fix error path leak in mac80211 key handling * use system_unbound_wq for wiphy work since it can take longer * tag 'wireless-2023-10-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: net: rfkill: reduce data->mtx scope in rfkill_fop_open net: rfkill: gpio: prevent value glitch during probe wifi: mac80211: fix error path key leak wifi: cfg80211: use system_unbound_wq for wiphy work ==================== Link: https://lore.kernel.org/r/20231018071041.8175-2-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
88343fbe5a
4 changed files with 6 additions and 8 deletions
|
@ -912,7 +912,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
|
|||
*/
|
||||
if (ieee80211_key_identical(sdata, old_key, key)) {
|
||||
ret = -EALREADY;
|
||||
goto unlock;
|
||||
goto out;
|
||||
}
|
||||
|
||||
key->local = sdata->local;
|
||||
|
@ -940,7 +940,6 @@ int ieee80211_key_link(struct ieee80211_key *key,
|
|||
|
||||
out:
|
||||
ieee80211_key_free_unused(key);
|
||||
unlock:
|
||||
mutex_unlock(&sdata->local->key_mtx);
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -1180,7 +1180,6 @@ static int rfkill_fop_open(struct inode *inode, struct file *file)
|
|||
init_waitqueue_head(&data->read_wait);
|
||||
|
||||
mutex_lock(&rfkill_global_mutex);
|
||||
mutex_lock(&data->mtx);
|
||||
/*
|
||||
* start getting events from elsewhere but hold mtx to get
|
||||
* startup events added first
|
||||
|
@ -1192,10 +1191,11 @@ static int rfkill_fop_open(struct inode *inode, struct file *file)
|
|||
goto free;
|
||||
rfkill_sync(rfkill);
|
||||
rfkill_fill_event(&ev->ev, rfkill, RFKILL_OP_ADD);
|
||||
mutex_lock(&data->mtx);
|
||||
list_add_tail(&ev->list, &data->events);
|
||||
mutex_unlock(&data->mtx);
|
||||
}
|
||||
list_add(&data->list, &rfkill_fds);
|
||||
mutex_unlock(&data->mtx);
|
||||
mutex_unlock(&rfkill_global_mutex);
|
||||
|
||||
file->private_data = data;
|
||||
|
@ -1203,7 +1203,6 @@ static int rfkill_fop_open(struct inode *inode, struct file *file)
|
|||
return stream_open(inode, file);
|
||||
|
||||
free:
|
||||
mutex_unlock(&data->mtx);
|
||||
mutex_unlock(&rfkill_global_mutex);
|
||||
mutex_destroy(&data->mtx);
|
||||
list_for_each_entry_safe(ev, tmp, &data->events, list)
|
||||
|
|
|
@ -108,13 +108,13 @@ static int rfkill_gpio_probe(struct platform_device *pdev)
|
|||
|
||||
rfkill->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
|
||||
gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_OUT_LOW);
|
||||
gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_ASIS);
|
||||
if (IS_ERR(gpio))
|
||||
return PTR_ERR(gpio);
|
||||
|
||||
rfkill->reset_gpio = gpio;
|
||||
|
||||
gpio = devm_gpiod_get_optional(&pdev->dev, "shutdown", GPIOD_OUT_LOW);
|
||||
gpio = devm_gpiod_get_optional(&pdev->dev, "shutdown", GPIOD_ASIS);
|
||||
if (IS_ERR(gpio))
|
||||
return PTR_ERR(gpio);
|
||||
|
||||
|
|
|
@ -1622,7 +1622,7 @@ void wiphy_work_queue(struct wiphy *wiphy, struct wiphy_work *work)
|
|||
list_add_tail(&work->entry, &rdev->wiphy_work_list);
|
||||
spin_unlock_irqrestore(&rdev->wiphy_work_lock, flags);
|
||||
|
||||
schedule_work(&rdev->wiphy_work);
|
||||
queue_work(system_unbound_wq, &rdev->wiphy_work);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(wiphy_work_queue);
|
||||
|
||||
|
|
Loading…
Reference in a new issue