Page MenuHomeFreeBSD

LinuxKPI/lindebugfs: stop panicing in lindebugfs, fix simple_read_from_buffer
Needs ReviewPublic

Authored by bz on Thu, Jun 27, 12:29 PM.

Details

Reviewers
jfree
wulf
manu
Group Reviewers
linuxkpi
Summary

Trying to use lindebugfs for debugging wirless drivers two issues
became apparent:
(a) a pnic in lindebugfs calling a hard coded release function if the

caller had not provided one.  This seems to be based on assumptions
that no longer hold up.  Remove the hard coded release function to
prevent panics.

(b) In LinuxKPI simple_read_from_buffer() would call copy_to_user() but

buffers weren't setup for this (lindebugfs has copies data from its
own buffer) and then pseudofs will do another copyout to the user
on this;  remove the copy_to_user() and simply copy the data over
to the provided buffer; this works for as long as the only consumers
remain debugfs callers (which currently seems to be the case).
[the only out-of-tree consumers I am aware off are two drm-kmod
drivers/gpu/drm/amd/pm/* debugfs functions I cannot test].

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 58373
Build 55261: arc lint + arc unit