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

Patchless linuxmodule V2 #12

Closed
wants to merge 5 commits into from
Closed

Conversation

joonwpark
Copy link
Collaborator

[PATCH 1/5] FromDevice: avoid kernel panic on device status change.
[PATCH 2/5] clickfs: use unlocked_ioctl on linux 2.6.36+
[PATCH 3/5] FromDevice: use netdev_rx_handler_register
[PATCH 4/5] proclikefs: use per_cpu super_block.s_files
[PATCH 5/5] ToUserDevice: use unlocked_ioctl if it's available

When device status changes (e.g. link bounce), if dev->br_port is not null
linux bridge's br_device_event will refer to dev->br_port.
But dev->br_port is a invalid pointer to linux bridge as it's fake_bridge
which was allocated by FromDevice.
To make linux bridge happy, set br_port to null with early notification
handler and set it again with late notification handler again.
Note: this fix is under *not* ideal assumption as it assumes
br_device_notifier's prioriy is higher than INT_MIN and less than INT_MAX.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
As of linux 2.6.36 file_operations.ioctl has removed.
Bobby Longpocket <bobbylongpocket@yahoo.com> pointed out different interface
between ioctl and unlocked_ioctl

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Linux net has removed function pointers which had used for intercepting
packet from protocol handlers/pesudo devices like bridge and introduced
netdev_rx_handler_register() instead.
Subsequently br_handle_frame_hook is not available anymore.
For patchless linux, use netdev_rx_handler_register().

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Use per_cpu super_blocks.s_files.
Detect and use lg_local_lock(files_lglock), file_list_lock() is removed.
Also use kzalloc to zero initialize newfs.
Recent linux calls file_system_type.mount if it's not null.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
@kohler
Copy link
Owner

kohler commented Jul 8, 2011

Hi Joonwoo,

I believe all changes in this pull request have been integrated, so I'm going to close it. Please let me know if I was wrong, and thanks!

E

@kohler kohler closed this Jul 8, 2011
tbarbette pushed a commit to tbarbette/click that referenced this pull request Aug 13, 2018
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 this pull request may close these issues.

None yet

2 participants