mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-28 19:20:30 +00:00
staging: r8188eu: clean up NULL check for rcu pointer
Clean up the NULL check for padapter->pnetdev->rx_handler_data. The current code calls rcu_dereference while it holds the rcu read lock and checks the pointer after releasing the lock. An rcu pointer may only be used between calls to rcu_read_lock and rcu_read_unlock. Replace the check with rcu_access_pointer. My understanding is that this function returns the value of the pointer and needs no locking. We can then check the pointer but we must not dereference it. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20230131090057.241779-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7f0c12449a
commit
c6dd307144
1 changed files with 2 additions and 6 deletions
Loading…
Add table
Add a link
Reference in a new issue