Hi GL team,
On a GL-BE9300 with firmware 4.10.1, installing NFS client support from the official feed crashes the router. `grace.ko` panics while it loads, and the router reboots. I traced the panic to the kmod feed rather than NFS itself. I also built modules that match the firmware kernel, which load and work. Details below, so you can reproduce it and rebuild the feed.
### Reproduce
Firmware 4.10.1, kernel `5.4.213 #0 SMP PREEMPT Fri Sep 18 10:38:06 2026`, feed `glinet_core https://fw.gl-inet.com/releases/qsdk_v12.5/kmod-4.7/be9300-ipq53xx`:
```
opkg update && opkg install kmod-fs-nfs nfs-utils
```
The kernel panics while `kmodloader` loads `grace`:
```
CPU: 1 PID: 26514 Comm: kmodloader Tainted: P C 5.4.213 #0
Hardware name: GL.iNet BE9300, Inc. IPQ5332/AP-MI01.6 (DT)
pc : opens_in_grace+0xa0/0xc0 [grace]
Call trace:
opens_in_grace+0xa0/0xc0 [grace]
ops_init+0xc8/0x100
register_pernet_operations+0xd4/0x1a0
register_pernet_subsys+0x34/0x54
init_module+0x14/0x1000 [grace]
Kernel panic - not syncing: Fatal exception
```
Local symbols are stripped, so `opens_in_grace+0xa0` is really the static `grace_init_net`.
**4.10.3 is affected too.** I upgraded the same router to 4.10.3 (kernel built Nov 24). The kernel config is identical, the firmware's own modules are byte-identical to 4.10.1's, and opkg still points at the same `kmod-4.7` feed. The release notes for 4.10.2 and 4.10.3 don't mention this. The 2024 MT2500 thread "Failed to install nfs-kernel-server on 4.5.16" shows the same `grace` panic, and the recent MT5000 kmod-gre panic (thread 72965) looks like the same class of problem.
### Cause: the kmod-4.7 feed was built from a different kernel than 4.10.1
The vermagic (`5.4.213 SMP preempt mod_unload aarch64`) and the `kernel (= 5.4.213-1-9bbeb3b…)` dependency both match, and `CONFIG_MODVERSIONS` is off, so opkg and the kernel accept these modules. But the structure layouts differ. Here is where each module looks for `net->gen`, the first load in `net_generic()`:
| Module | Source | `net->gen` read at |
|---|---|---|
| `ip_set.ko` | firmware 4.10.1 (`/lib/modules`) | `0xda8` |
| `ip_set.ko` | kmod-4.7 feed | `0xdb8` |
| `grace.ko` | kmod-4.7 feed | `0xda0` |
| `sunrpc.ko` | kmod-4.7 feed (every per-net function) | `0xda0` |
`grace_init_net` reads 8 bytes too early, gets 0, and faults on the next load (`x0: 0` in the panic registers).
I also compared each function's structure offsets and compare constants between the feed's modules and a build that matches the firmware. Functions using the same offsets: grace 3/6, sunrpc 337/368, lockd 72/81, nfs 217/231, nfsv4 245/262, auth_rpcgss 32/38, cifs 219/369, ip_set 8/24, nf_conntrack 65/146. The feed's modules are also built without the per-task stack protector that the firmware's kernel and modules use.
### A build that matches, tested on the router
- **Source:** Qualcomm's QSDK kernel `linux-ipq-5.4`, branch `NHSS.QSDK.12.5.r6` (5.4.213), from git.codelinaro.org.
- **Config:** the router's own `/proc/config.gz`. Kconfig drops `CONFIG_MPTCP`, because your MPTCP backport isn't in that tree.
- **MPTCP:** the one header effect of the backport I could detect is `IPPROTO_MAX`, which is 263 in the firmware. Adding `IPPROTO_MPTCP = 262` to `include/uapi/linux/in.h` was enough.
- **Version string:** an empty `.scmversion`, so the version is exactly `5.4.213`.
Before loading anything, I built nine modules that the firmware also ships (`ip_set`, `nf_conntrack`, `inet_diag`, `tcp_diag`, `udp_tunnel`, `l2tp_core`, `tun`, `veth`, `sit`). I compared them function by function with the firmware's copies, and the offsets and constants match. `inet_diag` matched only after the `IPPROTO_MPTCP` line.
Then, on the GL-BE9300 with 4.10.1, and again after upgrading to 4.10.3:
- **Loading:** `grace`, `sunrpc`, `auth_rpcgss`, `lockd`, `nfs`, `nfsv3` and `nfsv4` all load, with no panic.
- **NFSv4.2:** a mount to a Linux server works. A 64 MB file written from the router reads back with the same SHA-256 on the router, after dropping caches, and on the server.
- **Server outage:** with a soft mount, writes time out cleanly while the server is stopped and resume when it comes back.
- **SMB:** rebuilt `cifs` and `md4` mount and write too.
### A second, smaller issue: SMB logins fail without kmod-crypto-md4
On this 5.4 kernel, cifs gets MD4 (for the NT hash) from the kernel's crypto modules, but `kmod-fs-cifs` doesn't depend on `kmod-crypto-md4`. Without it, every password-protected SMB mount fails with `STATUS_LOGON_FAILURE` / `mount error(13)`, even with the right password. Installing `kmod-crypto-md4` fixes it. From Linux 5.15, cifs has its own MD4.
### What would fix it
1. Rebuild the BE9300 (ipq53xx) kmod feed from the exact 4.10.x kernel tree and config, and serve it at a path that matches the firmware, in place of `kmod-4.7`. It's probably worth checking the other models' feeds the same way.
2. Add `kmod-crypto-md4` to `kmod-fs-cifs`'s dependencies on 5.4 kernels.
3. Consider `CONFIG_MODVERSIONS`, or a kmod ABI hash per firmware build, so that a mismatched module is refused instead of crashing the router.
4. Please publish the GPL kernel source for the BE9300 4.10.x, including the MPTCP backport, so the community can build matching modules.
Until the feed is rebuilt, a workaround for others: **don't install `kmod-fs-nfs*` on a BE9300 with 4.10.x.**
I'm happy to share the panic log, the comparison script and the modules I built. Thanks!