History log of /freebsd/sys/compat/linuxkpi/common/include/linux/cdev.h (Results 1 – 25 of 27)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# aca0bcbc 05-Apr-2022 Warner Losh <imp@FreeBSD.org>

linuxkpi: Move cdev_alloc into .c file

Move cdev_alloc into linux_compat.c since it encodes the size of struct
linux_cdev into the client modules otherwise.

Sponsored by: Netflix
Reviewed by: hse

linuxkpi: Move cdev_alloc into .c file

Move cdev_alloc into linux_compat.c since it encodes the size of struct
linux_cdev into the client modules otherwise.

Sponsored by: Netflix
Reviewed by: hselasky, emaste
Differential Revision: https://reviews.freebsd.org/D34771

show more ...


# 307f78f3 19-Dec-2021 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562


Revision tags: release/12.3.0
# b8f113ca 11-May-2021 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement cdev_device_add() and cdev_device_del() in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking


# 67807f50 11-May-2021 Hans Petter Selasky <hselasky@FreeBSD.org>

cdev_del() should only put it's kernel object in the LinuxKPI.

The destructor takes care of the rest.

MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking


Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0
# 85f2a00b 01-Jan-2019 Conrad Meyer <cem@FreeBSD.org>

linuxkpi: Remove extraneous NULL check on M_WAITOK allocation

The check was not introduced in r342628, but the subsequent unchecked access to
refs was added then, prompting a Coverity warning about

linuxkpi: Remove extraneous NULL check on M_WAITOK allocation

The check was not introduced in r342628, but the subsequent unchecked access to
refs was added then, prompting a Coverity warning about "Null pointer
dereferences (FORWARD_NULL)." The warning is bogus due to M_WAITOK, but so is
the NULL check that hints it, so just remove it.

CID: 1398588
Reported by: Coverity

show more ...


# f823a36e 30-Dec-2018 Konstantin Belousov <kib@FreeBSD.org>

Fix linux_destroy_dev() behaviour when there are still files open from
the destroying cdev.

Currently linux_destroy_dev() waits for the reference count on the
linux cdev to drain, and each open file

Fix linux_destroy_dev() behaviour when there are still files open from
the destroying cdev.

Currently linux_destroy_dev() waits for the reference count on the
linux cdev to drain, and each open file hold the reference.
Practically it means that linux_destroy_dev() is blocked until all
userspace processes that have the cdev open, exit. FreeBSD devfs does
not have such problem, because device refcount only prevents freeing
of the cdev memory, and separate 'active methods' counter blocks
destroy_dev() until all threads leave the cdevsw methods. After that,
attempts to enter cdevsw methods are refused with an error.

Implement somewhat similar mechanism for LinuxKPI cdevs. Demote cdev
refcount to only mean a hold on the linux cdev memory. Add sirefs
count to track both number of threads inside the cdev methods, and for
single-bit indicator that cdev is being destroyed. In the later case,
the call is redirected to the dummy cdev.

Reviewed by: markj
Discussed with: hselasky
Tested by: zeising
MFC after: 1 week
Sponsored by: Mellanox Technologies
Differential revision: https://reviews.freebsd.org/D18606

show more ...


# 67350cb5 09-Dec-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r340918 through r341763.


Revision tags: release/12.0.0
# 9c7b53cc 05-Dec-2018 Slava Shwartsman <slavash@FreeBSD.org>

linuxkpi: Fix for use-after-free when tearing down character devices.

Make sure we hold a reference on the character device for every opened file
to prevent the character device to be freed prematur

linuxkpi: Fix for use-after-free when tearing down character devices.

Make sure we hold a reference on the character device for every opened file
to prevent the character device to be freed prematurely.

Submitted by: hselasky@
Approved by: hselasky (mentor)
MFC after: 1 week
Sponsored by: Mellanox Technologies

show more ...


Revision tags: release/11.2.0
# 83630517 23-Mar-2018 Ed Maste <emaste@FreeBSD.org>

linuxkpi whitespace cleanup

Reviewed by: hselasky, markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14807


Revision tags: release/10.4.0
# 0275f9db 11-Aug-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r321383 through r322397.


# d59ead01 03-Aug-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r321970


# 86cc58dc 03-Aug-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r321960


# 2b79a966 02-Aug-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Fix LinuxKPI regression after r321920. The mda_unit and si_drv0 fields are not
wide enough to hold the full 64-bit dev_t. Instead use the "dev" field in
the "linux_cdev" structure to store and lookup

Fix LinuxKPI regression after r321920. The mda_unit and si_drv0 fields are not
wide enough to hold the full 64-bit dev_t. Instead use the "dev" field in
the "linux_cdev" structure to store and lookup this value.

While at it remove superfluous use of parenthesis inside the
MAJOR(), MINOR() and MKDEV() macros in the LinuxKPI.

MFC after: 1 week
Sponsored by: Mellanox Technologies

show more ...


Revision tags: release/11.1.0
# 1125dbc0 26-Dec-2016 Hans Petter Selasky <hselasky@FreeBSD.org>

Implement register and unregister chrdev in the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies


Revision tags: release/11.0.1, release/11.0.0
# 5a6748b2 24-May-2016 Hans Petter Selasky <hselasky@FreeBSD.org>

Use make_dev_s() instead of make_dev() to avoid race setting
"si_drv1". Convert panic() into regular error while at it.

Suggested by: jhb @
MFC after: 1 week
Sponsored by: Mellanox Technologies


# ed5f7812 23-May-2016 Hans Petter Selasky <hselasky@FreeBSD.org>

Add support for "cdev_add_ext()" to the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies


Revision tags: release/10.3.0
# 009e81b1 22-Jan-2016 Bjoern A. Zeeb <bz@FreeBSD.org>

MFH @r294567


# b626f5a7 04-Jan-2016 Glen Barber <gjb@FreeBSD.org>

MFH r289384-r293170

Sponsored by: The FreeBSD Foundation


# 8c490985 31-Dec-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r292951 through r293015.


# 06204f8e 31-Dec-2015 Hans Petter Selasky <hselasky@FreeBSD.org>

Minor LinuxKPI code cleanup:
- Declare some static functions in linux_compat.c instead if inside
various header files.
- Prefix FreeBSD local functions in the LinuxKPI with "linux_" to
avoid symb

Minor LinuxKPI code cleanup:
- Declare some static functions in linux_compat.c instead if inside
various header files.
- Prefix FreeBSD local functions in the LinuxKPI with "linux_" to
avoid symbol name conflicts in the future and to make debugging
easier.
- Make the "struct kobj_ktype" declaractions constant to shave off a
few bytes from the data segment.

MFC after: 1 week
Sponsored by: Mellanox Technologies

show more ...


# 337cb9f0 31-Dec-2015 Hans Petter Selasky <hselasky@FreeBSD.org>

Make the kobject refcounting compliant with Linux. Refcounting on the
parent kobject cannot be factored out and must be done by the kobject
consumers.

MFC after: 1 week
Sponsored by: Mellanox Techno

Make the kobject refcounting compliant with Linux. Refcounting on the
parent kobject cannot be factored out and must be done by the kobject
consumers.

MFC after: 1 week
Sponsored by: Mellanox Technologies

show more ...


# a5d8944a 19-Nov-2015 Navdeep Parhar <np@FreeBSD.org>

Catch up with head (r291075).


# 3e4f384e 07-Nov-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from head r290483


# 8e7baabc 03-Nov-2015 Hans Petter Selasky <hselasky@FreeBSD.org>

Make all the LinuxKPI include files compile standalone.

Sponsored by: Mellanox Technologies


12