No description
Find a file
Jacob Keller c1f3414df2 ice: cleanup allocations in ice_ptp_alloc_tx_tracker
The ice_ptp_alloc_tx_tracker function must allocate the timestamp array and
the bitmap for tracking the currently in use indexes. A future change is
going to add yet another allocation to this function.

If these allocations fail we need to ensure that we properly cleanup and
ensure that the pointers in the ice_ptp_tx structure are NULL.

Simplify this logic by allocating to local variables first. If any
allocation fails, then free everything and exit. Only update the ice_ptp_tx
structure if all allocations succeed.

This ensures that we have no side effects on the Tx structure unless all
allocations have succeeded. Thus, no code will see an invalid pointer and
we don't need to re-assign NULL on cleanup.

This is safe because kernel "free" functions are designed to be NULL safe
and perform no action if passed a NULL pointer. Thus its safe to simply
always call kfree or bitmap_free even if one of those pointers was NULL.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2022-12-08 13:15:03 -08:00
arch Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
block block-6.1-2022-11-25 2022-11-25 17:50:57 -08:00
certs
crypto
Documentation net/mlx5: E-Switch, Implement devlink port function cmds to control migratable 2022-12-07 20:09:18 -08:00
drivers ice: cleanup allocations in ice_ptp_alloc_tx_tracker 2022-12-08 13:15:03 -08:00
fs afs: Fix fileserver probe RTT handling 2022-11-28 18:40:07 -08:00
include devlink: Expose port function commands to control migratable 2022-12-07 20:09:18 -08:00
init init/Kconfig: fix CC_HAS_ASM_GOTO_TIED_OUTPUT test with dash 2022-11-22 22:42:38 +09:00
io_uring io_uring: clear TIF_NOTIFY_SIGNAL if set and task_work not available 2022-11-25 10:55:08 -07:00
ipc ipc/shm: call underlying open/close vm_ops 2022-11-22 18:50:42 -08:00
kernel jump_label: Prevent key->enabled int overflow 2022-12-01 15:53:05 -08:00
lib Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
LICENSES
mm 24 hotfixes. 8 marked cc:stable and 16 for post-6.0 issues. 2022-11-25 10:18:25 -08:00
net devlink: Expose port function commands to control migratable 2022-12-07 20:09:18 -08:00
rust
samples bpf-next-for-netdev 2022-11-28 19:42:17 -08:00
scripts Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
security
sound ASoC: Fixes for v6.1 2022-11-23 17:14:10 +01:00
tools selftests: Add a basic HSR test. 2022-12-01 20:26:22 -08:00
usr
virt Merge branch 'kvm-dwmw2-fixes' into HEAD 2022-11-23 18:59:45 -05:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap Including fixes from bpf, can and wifi. 2022-11-29 09:52:10 -08:00
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-11-29 13:04:52 -08:00
Makefile Linux 6.1-rc7 2022-11-27 13:31:48 -08:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.