Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel Oops "Incompatible netdev->dev_addr #1088

Closed
fariouche opened this issue Jul 2, 2023 · 0 comments · Fixed by #1089
Closed

Kernel Oops "Incompatible netdev->dev_addr #1088

fariouche opened this issue Jul 2, 2023 · 0 comments · Fixed by #1089

Comments

@fariouche
Copy link

Hello,

Since some time ago, there is a check in the kernel to avoid direct copy of the mac addr. The reason is that it breaks the kernel rbtree and setting the mac address must be done through the helper function.

I didn't checked your module, but just looking at the code, I see this helper that still uses memcpy.

#define dev_addr_set(netdev, ethdata) _rtw_memcpy(netdev->dev_addr, ethdata, ETH_ALEN)

You have to change this code to use the helper function, like so:
#define dev_addr_set(netdev, ethdata) eth_hw_addr_set(netdev, ethdata)

I'm not using this driver as is, so this is not test on your repo, but this fixed the error using my fork.
You may add a kernel version check depending on the kernel version you want to support. This modification was introduce in the kernel 5.17.0

I believe this is the same error as #1075 (but he didn't include the begining of the crash dump)

The kernel module is so clean now compared to what it used to be !! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant