Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1ff99175 authored by Conner Huff's avatar Conner Huff Committed by Gerrit - the friendly Code Review server
Browse files

drivers: rmnet: perf: Safely free recycle buffers



Only free recycled buffers which have successfully been
allocated. In the event allocation fails, we deallocate
all previously allocated buffers, and we disable the feature
entirely. Also, handle other resources more carefully
during module bring up and teardown. Make sure resources
are null if they fail to allocate.

Additionally, modify the way that handling of allocation
failures on init works. Now if one feature fails it won't
bring down the operation of another feature. Now core_meta
has access to a flag which indicates if the callbacks were
completed successfully. If they were not, it is set to
indicate that we must flush at the end of every chain since
we can't rely on bm/ps.

[ 1026.970767] Unable to handle kernel paging request at virtual
address ffffffbfaaaaaaa0
[ 1026.979098] Mem abort info:
[ 1026.981973] Exception class = DABT (current EL), IL = 32 bits
[ 1026.988147] SET = 0, FnV = 0
[ 1026.991687] EA = 0, S1PTW = 0
[ 1026.995578] FSC = 6
[ 1026.997993] Data abort info:
[ 1027.001962] ISV = 0, ISS = 0x00000006
[ 1027.006283] CM = 0, WnR = 0
[ 1027.011503] swapper pgtable: 4k pages, 39-bit VAs, pgd = ffffff812120f000
[ 1027.018667] [ffffffbfaaaaaaa0] *pgd=00000001bcbfc003,
*pud=00000001bcbfc003, *pmd=0000000000000000
[ 1027.028686] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[ 1027.048533] mhi 0001:01:00.0: enabling device (0000 - 0002)
[ 1027.084511] CPU: 5 PID: 17777 Comm: modprobe Tainted: G S W O 4.14.83+ #1
[ 1027.101460] task: ffffffec3f430080 task.stack: ffffff8052338000
[ 1027.107541] pc : kfree+0xe8/0x62c
[ 1027.110954] lr : rmnet_perf_config_notify_cb+0xf8/0x484 [rmnet_perf]
[ 1027.328866] Call trace:
[ 1027.331381] kfree+0xe8/0x62c
[ 1027.334425] rmnet_perf_config_notify_cb+0xf8/0x484 [rmnet_perf]
[ 1027.340592] unregister_netdevice_notifier+0xc0/0x114
[ 1027.345780] rmnet_perf_exit+0x40/0x60c [rmnet_perf]
[ 1027.350870] SyS_delete_module+0x1b8/0x224
[ 1027.355078] el0_svc_naked+0x34/0x38
[ 1027.358746] Code: f2ffffe9 aa090109 d2dff7ea f2ffffea (f9400129)

Change-Id: Ieb12697fe23b6e7de39ae352a5481e6ae454e126
Signed-off-by: default avatarConner Huff <chuff@codeaurora.org>
parent 0e8ad333
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment