License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 15:07:57 +01:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-17 10:41:20 +01:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-03-01 13:02:00 -08:00
|
|
|
|
2010-01-13 17:03:23 -08:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
2010-05-20 10:40:19 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-15 22:10:17 -06:00
|
|
|
|
2013-03-13 20:50:01 -05:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2013-02-15 11:42:29 -06:00
|
|
|
|
2018-02-17 09:29:58 +01:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2013-02-15 11:42:29 -06:00
|
|
|
|
2018-02-17 09:29:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2013-02-15 11:42:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-13 20:50:00 -05:00
|
|
|
|
2013-02-15 22:10:17 -06:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-28 16:02:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-28 16:02:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2018-01-20 10:30:10 +01:00
|
|
|
|
|
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:10 +01:00
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
2018-05-04 16:57:30 +02:00
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-04 16:57:30 +02:00
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
2022-07-01 06:30:12 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-11 12:33:24 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
2013-04-15 14:50:36 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2013-04-15 14:50:36 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-11 12:33:24 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2013-04-15 14:50:36 -05:00
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-15 14:50:36 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
2013-04-15 14:50:36 -05:00
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:10 +01:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-04 16:57:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-04 16:57:30 +02:00
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-07-01 06:30:12 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-15 14:50:36 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-19 15:34:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
2013-04-19 15:34:49 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
2018-05-04 16:57:30 +02:00
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-04 16:57:30 +02:00
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-15 14:50:36 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-03 01:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
2022-07-01 06:30:12 -04:00
|
|
|
|
|
|
|
|
|
2013-04-03 01:28:58 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-28 16:02:53 +02:00
|
|
|
|
|
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2015-10-07 17:27:17 +02:00
|
|
|
|
2022-03-16 15:23:00 -04:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:02 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-27 11:02:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-08 10:03:53 +00:00
|
|
|
|
2018-10-15 16:45:58 +01:00
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-03 01:28:57 -05:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:53 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-09 11:57:56 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2020-06-09 11:59:08 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
2017-06-05 14:45:00 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2019-07-08 12:50:09 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-20 14:14:42 +04:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2014-06-20 14:14:42 +04:00
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2009-12-07 13:37:03 -08:00
|
|
|
|
2014-06-20 14:14:42 +04:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2014-06-20 14:14:42 +04:00
|
|
|
|
2009-12-07 13:37:03 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2012-06-04 14:43:32 -05:00
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
2013-02-14 12:16:43 -06:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2009-12-07 13:37:03 -08:00
|
|
|
|
2016-04-29 19:54:20 +02:00
|
|
|
|
2009-12-07 13:37:03 -08:00
|
|
|
|
|
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2014-06-20 14:14:42 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-14 17:29:48 +01:00
|
|
|
|
2014-06-20 14:14:42 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-26 15:05:29 +02:00
|
|
|
|
|
|
|
|
|
2016-11-14 17:29:48 +01:00
|
|
|
|
2016-04-26 15:05:29 +02:00
|
|
|
|
|
|
|
|
|
2014-06-20 14:14:42 +04:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2019-07-08 12:50:09 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
|
|
|
|
|
2013-02-25 16:11:12 -08:00
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
2012-11-13 21:11:15 -06:00
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
|
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
|
|
|
|
|
2013-04-03 21:32:51 -05:00
|
|
|
|
2016-04-26 15:39:47 +02:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
2017-06-15 16:30:53 +02:00
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
2016-04-29 19:54:20 +02:00
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
2016-04-29 19:54:20 +02:00
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
|
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
2016-02-11 13:09:15 +01:00
|
|
|
|
|
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2016-02-11 13:09:15 +01:00
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
2016-04-27 18:32:56 +02:00
|
|
|
|
|
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 14:51:47 -07:00
|
|
|
|
|
|
|
|
|
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-02 17:22:29 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-08 10:03:53 +00:00
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
|
|
|
|
|
2015-04-27 11:09:54 +08:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
2013-04-05 01:27:11 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:11 -05:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2015-04-27 11:09:54 +08:00
|
|
|
|
2013-04-05 01:27:11 -05:00
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
2013-02-11 12:33:24 -06:00
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:11 -05:00
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2013-08-15 11:51:44 +08:00
|
|
|
|
2015-10-07 17:27:17 +02:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-07 17:27:17 +02:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2016-02-08 13:39:46 +01:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:11 -05:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:05 -05:00
|
|
|
|
2013-04-05 01:27:11 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-19 11:21:29 +08:00
|
|
|
|
|
|
|
|
|
2013-03-14 14:09:05 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-07 17:32:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
2016-01-07 17:32:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-12 12:04:55 +08:00
|
|
|
|
2018-09-26 19:12:07 +02:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
2018-09-26 19:12:07 +02:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2019-07-03 17:59:20 +02:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
2018-09-28 15:38:34 +02:00
|
|
|
|
2018-04-12 12:04:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-03 17:59:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-03 17:59:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2016-02-08 13:39:46 +01:00
|
|
|
|
2018-04-12 12:04:55 +08:00
|
|
|
|
2019-07-03 17:59:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2013-04-03 01:28:58 -05:00
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
|
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
2019-07-03 17:59:20 +02:00
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-28 15:38:34 +02:00
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-03 17:59:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
2019-07-03 17:59:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-08 13:39:46 +01:00
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
2019-07-03 17:59:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: define source request op functions
The rbd code has a function that allocates and populates a
ceph_osd_req_op structure (the in-core version of an osd request
operation). When reviewed, Josh suggested two things: that the
big varargs function might be better split into type-specific
functions; and that this functionality really belongs in the osd
client rather than rbd.
This patch implements both of Josh's suggestions. It breaks
up the rbd function into separate functions and defines them
in the osd client module as exported interfaces. Unlike the
rbd version, however, the functions don't allocate an osd_req_op
structure; they are provided the address of one and that is
initialized instead.
The rbd function has been eliminated and calls to it have been
replaced by calls to the new routines. The rbd code now now use a
stack (struct) variable to hold the op rather than allocating and
freeing it each time.
For now only the capabilities used by rbd are implemented.
Implementing all the other osd op types, and making the rest of the
code use it will be done separately, in the next few patches.
Note that only the extent, cls, and watch portions of the
ceph_osd_req_op structure are currently used. Delete the others
(xattr, pgls, and snap) from its definition so nobody thinks it's
actually implemented or needed. We can add it back again later
if needed, when we know it's been tested.
This (and a few follow-on patches) resolves:
http://tracker.ceph.com/issues/3861
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2020-05-29 20:31:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-25 16:22:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-29 20:31:37 +02:00
|
|
|
|
|
|
|
|
|
2014-02-25 16:22:27 +02:00
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
2014-02-25 16:22:27 +02:00
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
2014-02-25 16:22:27 +02:00
|
|
|
|
|
|
|
|
|
2020-05-29 20:31:37 +02:00
|
|
|
|
2014-02-25 16:22:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2020-03-10 16:19:01 +01:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
2013-04-05 14:46:01 -05:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
2018-01-20 10:30:10 +01:00
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
2018-01-20 10:30:11 +01:00
|
|
|
|
|
|
|
|
|
2022-07-01 06:30:12 -04:00
|
|
|
|
|
|
|
|
|
2013-04-05 01:27:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2012-04-20 15:49:43 -05:00
|
|
|
|
2013-02-08 09:55:48 -06:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2015-10-07 17:27:17 +02:00
|
|
|
|
2013-08-15 11:51:44 +08:00
|
|
|
|
|
|
|
|
|
2013-03-08 13:35:36 -06:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-18 16:38:08 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2010-05-18 16:38:08 -07:00
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
2014-02-25 16:22:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-29 20:31:37 +02:00
|
|
|
|
2014-02-25 16:22:27 +02:00
|
|
|
|
2014-11-12 14:00:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-13 10:47:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-08 10:03:53 +00:00
|
|
|
|
2018-10-15 16:45:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-25 09:31:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2013-02-15 11:42:30 -06:00
|
|
|
|
2013-03-04 11:08:29 -06:00
|
|
|
|
2013-02-15 11:42:30 -06:00
|
|
|
|
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2014-02-25 16:22:26 +02:00
|
|
|
|
2013-03-13 20:50:00 -05:00
|
|
|
|
2014-02-25 16:22:26 +02:00
|
|
|
|
2016-02-08 13:39:46 +01:00
|
|
|
|
2013-03-08 13:35:36 -06:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-13 14:40:37 +08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: don't assign page info in ceph_osdc_new_request()
Currently ceph_osdc_new_request() assigns an osd request's
r_num_pages and r_alignment fields. The only thing it does
after that is call ceph_osdc_build_request(), and that doesn't
need those fields to be assigned.
Move the assignment of those fields out of ceph_osdc_new_request()
and into its caller. As a result, the page_align parameter is no
longer used, so get rid of it.
Note that in ceph_sync_write(), the value for req->r_num_pages had
already been calculated earlier (as num_pages, and fortunately
it was computed the same way). So don't bother recomputing it,
but because it's not needed earlier, move that calculation after the
call to ceph_osdc_new_request(). Hold off making the assignment to
r_alignment, doing it instead r_pages and r_num_pages are
getting set.
Similarly, in start_read(), nr_pages already holds the number of
pages in the array (and is calculated the same way), so there's no
need to recompute it. Move the assignment of the page alignment
down with the others there as well.
This and the next few patches are preparation work for:
http://tracker.ceph.com/issues/4127
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-03-01 18:00:15 -06:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2013-03-13 20:50:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-24 21:01:02 -07:00
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2013-08-15 11:51:44 +08:00
|
|
|
|
2014-11-13 10:47:25 +08:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
2010-04-06 15:01:27 -07:00
|
|
|
|
2013-03-14 14:09:05 -05:00
|
|
|
|
2012-11-13 21:11:15 -06:00
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-04-03 21:32:51 -05:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2013-03-13 20:50:01 -05:00
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
2013-03-13 20:50:01 -05:00
|
|
|
|
2014-11-13 10:47:25 +08:00
|
|
|
|
2015-04-27 11:09:54 +08:00
|
|
|
|
2014-11-13 10:47:25 +08:00
|
|
|
|
2016-02-03 21:24:49 +08:00
|
|
|
|
2014-11-13 10:47:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-02 18:40:23 +08:00
|
|
|
|
2014-11-13 14:40:37 +08:00
|
|
|
|
2014-11-13 10:47:25 +08:00
|
|
|
|
2013-03-13 20:50:01 -05:00
|
|
|
|
2013-03-13 20:50:01 -05:00
|
|
|
|
2016-02-03 21:24:49 +08:00
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
2016-04-29 19:54:20 +02:00
|
|
|
|
2020-06-04 11:12:34 +02:00
|
|
|
|
2013-02-15 22:10:17 -06:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-25 09:31:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
2022-08-25 09:31:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
2022-08-25 09:31:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
2022-08-25 09:31:16 -04:00
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-27 14:15:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2022-03-16 15:23:00 -04:00
|
|
|
|
|
|
|
|
|
2024-12-07 17:33:25 +01:00
|
|
|
|
|
|
|
|
|
2022-03-16 15:23:00 -04:00
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
|
|
|
|
|
2022-03-16 15:23:00 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2018-05-15 15:47:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-17 14:10:28 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2022-03-14 15:47:18 -04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-26 23:26:43 -05:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2012-05-26 23:26:43 -05:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2012-06-27 12:24:08 -07:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-17 14:10:28 +02:00
|
|
|
|
2025-09-25 09:57:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-09-25 09:57:26 +02:00
|
|
|
|
2017-03-17 14:10:28 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-05-27 14:15:49 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2015-05-15 12:02:17 +03:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2014-06-20 14:14:41 +04:00
|
|
|
|
|
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2012-12-07 09:57:58 -06:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2012-12-07 09:57:58 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2012-12-07 09:57:58 -06:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2012-12-07 09:57:58 -06:00
|
|
|
|
2014-01-16 19:18:27 +02:00
|
|
|
|
|
|
|
|
|
ceph: avoid reopening osd connections when address hasn't changed
We get a fault callback on _every_ tcp connection fault. Normally, we
want to reopen the connection when that happens. If the address we have
is bad, however, and connection attempts always result in a connection
refused or similar error, explicitly closing and reopening the msgr
connection just prevents the messenger's backoff logic from kicking in.
The result can be a console full of
[ 3974.417106] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.423295] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.429709] ceph: osd11 10.3.14.138:6800 connection failed
Instead, if we get a fault, and have outstanding requests, but the osd
address hasn't changed and the connection never successfully connected in
the first place, do nothing to the osd connection. The messenger layer
will back off and retry periodically, because we never connected and thus
the lossy bit is not set.
Instead, touch each request's r_stamp so that handle_timeout can tell the
request is still alive and kicking.
Signed-off-by: Sage Weil <sage@newdream.net>
2010-03-22 14:51:18 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ceph: avoid reopening osd connections when address hasn't changed
We get a fault callback on _every_ tcp connection fault. Normally, we
want to reopen the connection when that happens. If the address we have
is bad, however, and connection attempts always result in a connection
refused or similar error, explicitly closing and reopening the msgr
connection just prevents the messenger's backoff logic from kicking in.
The result can be a console full of
[ 3974.417106] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.423295] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.429709] ceph: osd11 10.3.14.138:6800 connection failed
Instead, if we get a fault, and have outstanding requests, but the osd
address hasn't changed and the connection never successfully connected in
the first place, do nothing to the osd connection. The messenger layer
will back off and retry periodically, because we never connected and thus
the lossy bit is not set.
Instead, touch each request's r_stamp so that handle_timeout can tell the
request is still alive and kicking.
Signed-off-by: Sage Weil <sage@newdream.net>
2010-03-22 14:51:18 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2012-12-07 09:57:58 -06:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2012-12-07 09:57:58 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:38 -05:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2022-03-14 15:47:18 -04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2022-03-14 15:47:18 -04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-14 15:47:18 -04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2022-03-14 15:47:18 -04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: block I/O when PAUSE or FULL osd map flags are set
The PAUSEWR and PAUSERD flags are meant to stop the cluster from
processing writes and reads, respectively. The FULL flag is set when
the cluster determines that it is out of space, and will no longer
process writes. PAUSEWR and PAUSERD are purely client-side settings
already implemented in userspace clients. The osd does nothing special
with these flags.
When the FULL flag is set, however, the osd responds to all writes
with -ENOSPC. For cephfs, this makes sense, but for rbd the block
layer translates this into EIO. If a cluster goes from full to
non-full quickly, a filesystem on top of rbd will not behave well,
since some writes succeed while others get EIO.
Fix this by blocking any writes when the FULL flag is set in the osd
client. This is the same strategy used by userspace, so apply it by
default. A follow-on patch makes this configurable.
__map_request() is called to re-target osd requests in case the
available osds changed. Add a paused field to a ceph_osd_request, and
set it whenever an appropriate osd map flag is set. Avoid queueing
paused requests in __map_request(), but force them to be resent if
they become unpaused.
Also subscribe to the next osd map from the monitor if any of these
flags are set, so paused requests can be unblocked as soon as
possible.
Fixes: http://tracker.ceph.com/issues/6079
Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-12-02 19:11:48 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
2017-04-18 09:21:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
2020-05-23 11:45:48 +02:00
|
|
|
|
|
|
|
|
|
2022-10-09 20:44:02 -06:00
|
|
|
|
2020-05-23 11:45:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-05 19:23:19 +01:00
|
|
|
|
2020-05-23 11:45:48 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2019-08-20 16:40:33 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2017-07-27 17:59:14 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-05 14:45:00 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2017-06-05 14:45:00 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-23 11:45:48 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2020-05-23 11:45:48 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
2018-05-23 14:46:53 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:56 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-27 17:59:14 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-05 19:23:19 +01:00
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2026-01-05 19:23:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2020-05-23 11:45:48 +02:00
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2017-06-15 16:30:56 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-27 17:59:14 +02:00
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2020-05-23 11:45:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
2019-08-20 16:40:33 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
2019-08-20 16:40:33 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2020-01-08 10:03:53 +00:00
|
|
|
|
2018-10-15 16:45:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-17 14:23:04 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-13 22:18:37 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2017-04-04 08:39:36 -04:00
|
|
|
|
2017-06-15 16:30:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 14:40:03 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
2017-07-25 14:40:03 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 14:40:03 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 14:40:03 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-25 14:40:03 +02:00
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2017-06-15 16:30:53 +02:00
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
2010-03-22 14:42:30 -07:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-05-26 00:29:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-04 08:39:37 -04:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2014-01-31 19:33:39 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2018-05-15 15:47:58 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2014-01-31 19:33:39 +02:00
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-21 13:57:18 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-31 19:33:39 +02:00
|
|
|
|
|
|
|
|
|
2018-05-15 15:47:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-18 09:21:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2018-12-18 04:31:48 -05:00
|
|
|
|
2018-05-15 15:47:58 +02:00
|
|
|
|
2018-05-17 16:13:07 +02:00
|
|
|
|
2022-03-12 11:09:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-17 16:13:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2014-01-31 19:33:39 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2014-01-31 19:33:39 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-15 15:47:58 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2018-05-22 16:26:51 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-11 18:48:41 +01:00
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
2020-06-04 11:12:34 +02:00
|
|
|
|
2017-02-12 17:11:07 +01:00
|
|
|
|
|
|
|
|
|
2020-03-19 23:45:01 -04:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-02 14:01:55 +01:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
|
|
|
|
|
2020-03-19 23:45:01 -04:00
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
2019-03-25 21:32:28 +02:00
|
|
|
|
2018-05-21 15:33:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
2018-05-21 15:33:48 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
2018-05-21 16:00:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-02 14:01:55 +01:00
|
|
|
|
2018-05-21 16:00:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-12-02 14:01:55 +01:00
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
libceph: always signal completion when done
r_safe_completion is currently, and has always been, signaled only if
on-disk ack was requested. It's there for fsync and syncfs, which wait
for in-flight writes to flush - all data write requests set ONDISK.
However, the pool perm check code introduced in 4.2 sends a write
request with only ACK set. An unfortunately timed syncfs can then hang
forever: r_safe_completion won't be signaled because only an unsafe
reply was requested.
We could patch ceph_osdc_sync() to skip !ONDISK write requests, but
that is somewhat incomplete and yet another special case. Instead,
rename this completion to r_done_completion and always signal it when
the OSD client is done with the request, whether unsafe, safe, or
error. This is a bit cleaner and helps with the cancellation code.
Reported-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2016-12-02 14:01:55 +01:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2017-02-12 17:11:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-15 15:47:58 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-25 20:16:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-18 09:21:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-16 18:21:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-30 16:29:14 +02:00
|
|
|
|
2018-05-16 18:21:34 +02:00
|
|
|
|
2018-05-30 14:58:25 +02:00
|
|
|
|
2018-05-16 18:21:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-04 08:39:39 -04:00
|
|
|
|
|
|
|
|
|
2017-04-18 09:21:16 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-04 08:39:39 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-18 09:21:16 -04:00
|
|
|
|
2017-04-04 08:39:39 -04:00
|
|
|
|
2018-12-18 04:31:48 -05:00
|
|
|
|
2018-05-30 16:29:14 +02:00
|
|
|
|
2018-05-16 18:21:34 +02:00
|
|
|
|
2017-04-04 08:39:39 -04:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2020-06-10 14:41:30 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 12:58:33 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-21 13:57:18 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 12:58:33 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-01 19:14:24 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-01 19:14:24 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2023-08-01 19:14:24 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2023-08-01 19:14:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-15 12:02:17 +03:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2017-02-12 17:11:07 +01:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2017-02-12 17:11:07 +01:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-12 17:11:07 +01:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-12 17:11:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2017-02-12 17:11:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-15 12:02:17 +03:00
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: follow redirect replies from osds
Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.
v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid. However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only. To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-27 17:40:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-13 19:05:13 +08:00
|
|
|
|
|
|
|
|
|
libceph: follow redirect replies from osds
Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.
v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid. However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only. To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-27 17:40:20 +02:00
|
|
|
|
|
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
2016-06-13 19:05:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
2016-06-13 19:05:13 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: follow redirect replies from osds
Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.
v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid. However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only. To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-27 17:40:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-03 09:37:09 -07:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-03 15:25:48 +01:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-25 16:11:12 -08:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-25 16:11:12 -08:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-25 16:11:12 -08:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-25 16:11:12 -08:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-25 16:11:12 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
2013-02-25 16:11:12 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-25 16:11:12 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-03 15:25:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: follow redirect replies from osds
Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.
v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid. However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only. To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-27 17:40:20 +02:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
libceph: follow redirect replies from osds
Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.
v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid. However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only. To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-27 17:40:20 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
libceph: follow redirect replies from osds
Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.
v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid. However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only. To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-27 17:40:20 +02:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
2016-06-13 19:05:13 +08:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
2016-06-13 19:05:13 +08:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
libceph: follow redirect replies from osds
Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.
v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid. However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only. To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-27 17:40:20 +02:00
|
|
|
|
2016-02-14 11:24:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-18 16:03:09 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: follow redirect replies from osds
Follow redirect replies from osds, for details see ceph.git commit
fbbe3ad1220799b7bb00ea30fce581c5eadaf034.
v1 (current) version of redirect reply consists of oloc and oid, which
expands to pool, key, nspace, hash and oid. However, server-side code
that would populate anything other than pool doesn't exist yet, and
hence this commit adds support for pool redirects only. To make sure
that future server-side updates don't break us, we decode all fields
and, if any of key, nspace, hash or oid have a non-default value, error
out with "corrupt osd_op_reply ..." message.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2014-01-27 17:40:20 +02:00
|
|
|
|
|
|
|
|
|
2020-05-23 11:45:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-25 09:31:05 -04:00
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-21 13:57:18 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-23 17:36:59 -05:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libceph: move linger requests sooner in kick_requests()
The kick_requests() function is called by ceph_osdc_handle_map()
when an osd map change has been indicated. Its purpose is to
re-queue any request whose target osd is different from what it
was when it was originally sent.
It is structured as two loops, one for incomplete but registered
requests, and a second for handling completed linger requests.
As a special case, in the first loop if a request marked to linger
has not yet completed, it is moved from the request list to the
linger list. This is as a quick and dirty way to have the second
loop handle sending the request along with all the other linger
requests.
Because of the way it's done now, however, this quick and dirty
solution can result in these incomplete linger requests never
getting re-sent as desired. The problem lies in the fact that
the second loop only arranges for a linger request to be sent
if it appears its target osd has changed. This is the proper
handling for *completed* linger requests (it avoids issuing
the same linger request twice to the same osd).
But although the linger requests added to the list in the first loop
may have been sent, they have not yet completed, so they need to be
re-sent regardless of whether their target osd has changed.
The first required fix is we need to avoid calling __map_request()
on any incomplete linger request. Otherwise the subsequent
__map_request() call in the second loop will find the target osd
has not changed and will therefore not re-send the request.
Second, we need to be sure that a sent but incomplete linger request
gets re-sent. If the target osd is the same with the new osd map as
it was when the request was originally sent, this won't happen.
This can be fixed through careful handling when we move these
requests from the request list to the linger list, by unregistering
the request *before* it is registered as a linger request. This
works because a side-effect of unregistering the request is to make
the request's r_osd pointer be NULL, and *that* will ensure the
second loop actually re-sends the linger request.
Processing of such a request is done at that point, so continue with
the next one once it's been moved.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-12-19 15:52:36 -06:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2019-08-21 13:57:18 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-23 17:36:59 -05:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
libceph: move linger requests sooner in kick_requests()
The kick_requests() function is called by ceph_osdc_handle_map()
when an osd map change has been indicated. Its purpose is to
re-queue any request whose target osd is different from what it
was when it was originally sent.
It is structured as two loops, one for incomplete but registered
requests, and a second for handling completed linger requests.
As a special case, in the first loop if a request marked to linger
has not yet completed, it is moved from the request list to the
linger list. This is as a quick and dirty way to have the second
loop handle sending the request along with all the other linger
requests.
Because of the way it's done now, however, this quick and dirty
solution can result in these incomplete linger requests never
getting re-sent as desired. The problem lies in the fact that
the second loop only arranges for a linger request to be sent
if it appears its target osd has changed. This is the proper
handling for *completed* linger requests (it avoids issuing
the same linger request twice to the same osd).
But although the linger requests added to the list in the first loop
may have been sent, they have not yet completed, so they need to be
re-sent regardless of whether their target osd has changed.
The first required fix is we need to avoid calling __map_request()
on any incomplete linger request. Otherwise the subsequent
__map_request() call in the second loop will find the target osd
has not changed and will therefore not re-send the request.
Second, we need to be sure that a sent but incomplete linger request
gets re-sent. If the target osd is the same with the new osd map as
it was when the request was originally sent, this won't happen.
This can be fixed through careful handling when we move these
requests from the request list to the linger list, by unregistering
the request *before* it is registered as a linger request. This
works because a side-effect of unregistering the request is to make
the request's r_osd pointer be NULL, and *that* will ensure the
second loop actually re-sends the linger request.
Processing of such a request is done at that point, so continue with
the next one once it's been moved.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-12-19 15:52:36 -06:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-02-26 15:32:31 -08:00
|
|
|
|
2011-01-17 20:34:08 -08:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-19 16:59:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2020-11-19 16:59:08 +01:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-17 20:34:08 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-21 13:57:18 +02:00
|
|
|
|
2017-06-15 16:30:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-18 16:50:41 -08:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2013-12-10 09:35:13 -08:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-14 09:59:09 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-14 09:59:09 -07:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-05-12 09:29:18 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2017-04-18 09:21:16 -04:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2011-05-12 09:29:18 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2017-04-04 08:39:39 -04:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-07-27 13:11:08 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-14 15:13:47 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-30 20:05:06 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-15 11:42:30 -06:00
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-10 16:19:01 +01:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
2014-09-11 12:18:53 +04:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 16:21:50 -04:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2014-06-19 11:38:13 +04:00
|
|
|
|
2022-05-16 17:17:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-19 11:38:13 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-19 11:38:13 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-13 11:04:33 +08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-11 18:46:08 +01:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-04-06 15:14:15 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-11 18:48:41 +01:00
|
|
|
|
2018-07-13 22:18:37 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2018-10-11 12:58:33 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-11 18:48:41 +01:00
|
|
|
|
2018-07-13 22:18:37 +02:00
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 16:21:50 -04:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-25 17:26:55 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2018-09-28 15:38:34 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-25 17:26:55 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 16:11:37 +02:00
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 16:11:37 +02:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 16:21:50 -04:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-06-25 17:26:55 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-14 12:16:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-11 12:58:33 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2023-08-01 19:14:24 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-04 14:35:18 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
2019-06-04 14:35:18 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-05-06 09:38:47 -04:00
|
|
|
|
2019-06-04 14:35:18 -04:00
|
|
|
|
|
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 16:11:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 16:21:50 -04:00
|
|
|
|
2015-07-17 13:18:07 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-28 21:43:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-06-10 20:30:13 -07:00
|
|
|
|
2013-08-28 21:43:09 -07:00
|
|
|
|
2016-08-12 16:11:41 +02:00
|
|
|
|
2013-08-28 21:43:09 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:28 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-28 21:43:09 -07:00
|
|
|
|
2015-06-17 14:49:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-01-25 18:16:21 +01:00
|
|
|
|
2015-06-17 14:49:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-14 18:16:51 +02:00
|
|
|
|
2015-06-17 14:49:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-14 18:16:51 +02:00
|
|
|
|
2017-01-25 18:16:21 +01:00
|
|
|
|
|
|
|
|
|
2015-06-17 14:49:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-26 19:12:07 +02:00
|
|
|
|
2018-04-12 12:04:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-17 14:49:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-14 18:16:51 +02:00
|
|
|
|
|
|
|
|
|
2017-01-25 18:16:21 +01:00
|
|
|
|
2015-06-17 14:49:45 -04:00
|
|
|
|
2018-10-15 16:11:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-30 16:21:50 -04:00
|
|
|
|
2015-06-17 14:49:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-14 18:16:51 +02:00
|
|
|
|
2015-06-17 14:49:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-25 20:16:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-08 15:15:24 +01:00
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
|
|
|
|
|
2009-11-18 14:52:18 -08:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-02-09 17:25:31 +01:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2012-07-09 14:22:34 -07:00
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2009-11-18 14:52:18 -08:00
|
|
|
|
2012-07-09 14:22:34 -07:00
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
|
|
|
|
|
2010-03-01 13:02:00 -08:00
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
2013-08-15 08:58:59 +03:00
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
2013-08-15 08:58:59 +03:00
|
|
|
|
2014-01-31 17:49:22 +02:00
|
|
|
|
|
|
|
|
|
2018-05-21 16:00:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2009-11-18 14:52:18 -08:00
|
|
|
|
2018-05-21 16:00:29 +02:00
|
|
|
|
|
|
|
|
|
2014-01-31 17:49:22 +02:00
|
|
|
|
|
|
|
|
|
2010-03-01 13:02:00 -08:00
|
|
|
|
|
|
|
|
|
2009-11-18 14:52:18 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
|
|
|
|
|
2009-11-18 14:52:18 -08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-21 16:00:29 +02:00
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2010-02-03 11:00:26 -08:00
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2017-03-17 14:10:28 +02:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 01:15:02 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:22 +02:00
|
|
|
|
2016-04-28 16:07:25 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2010-03-01 13:02:00 -08:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2021-11-04 12:31:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 16:45:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-01 11:54:43 -04:00
|
|
|
|
|
|
|
|
|
2018-10-15 16:45:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-08 10:03:53 +00:00
|
|
|
|
|
|
|
|
|
2018-10-15 16:45:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-04 12:31:46 +00:00
|
|
|
|
2018-10-15 16:45:58 +01:00
|
|
|
|
2018-03-10 20:32:05 +08:00
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
2016-02-09 17:50:15 +01:00
|
|
|
|
|
|
|
|
|
2013-05-01 12:43:04 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-19 21:43:23 -08:00
|
|
|
|
libceph: check data_len in ->alloc_msg()
Only ->alloc_msg() should check data_len of the incoming message
against the preallocated ceph_msg, doing it in the messenger is not
right. The contract is that either ->alloc_msg() returns a ceph_msg
which will fit all of the portions of the incoming message, or it
returns NULL and possibly sets skip, signaling whether NULL is due to
an -ENOMEM. ->alloc_msg() should be the only place where we make the
skip/no-skip decision.
I stumbled upon this while looking at con/osd ref counting. Right now,
if we get a non-extent message with a larger data portion than we are
prepared for, ->alloc_msg() returns a ceph_msg, and then, when we skip
it in the messenger, we don't put the con/osd ref acquired in
ceph_con_in_msg_alloc() (which is normally put in process_message()),
so this also fixes a memory leak.
An existing BUG_ON in ceph_msg_data_cursor_init() ensures we don't
corrupt random memory should a buggy ->alloc_msg() return an unfit
ceph_msg.
While at it, I changed the "unknown tid" dout() to a pr_warn() to make
sure all skips are seen and unified format strings.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-09-02 11:37:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-19 21:43:23 -08:00
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-01-11 14:47:13 -08:00
|
|
|
|
2014-01-09 20:08:21 +02:00
|
|
|
|
2010-02-19 21:43:23 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-11 14:47:13 -08:00
|
|
|
|
2016-02-19 11:38:57 +01:00
|
|
|
|
|
|
|
|
|
libceph: check data_len in ->alloc_msg()
Only ->alloc_msg() should check data_len of the incoming message
against the preallocated ceph_msg, doing it in the messenger is not
right. The contract is that either ->alloc_msg() returns a ceph_msg
which will fit all of the portions of the incoming message, or it
returns NULL and possibly sets skip, signaling whether NULL is due to
an -ENOMEM. ->alloc_msg() should be the only place where we make the
skip/no-skip decision.
I stumbled upon this while looking at con/osd ref counting. Right now,
if we get a non-extent message with a larger data portion than we are
prepared for, ->alloc_msg() returns a ceph_msg, and then, when we skip
it in the messenger, we don't put the con/osd ref acquired in
ceph_con_in_msg_alloc() (which is normally put in process_message()),
so this also fixes a memory leak.
An existing BUG_ON in ceph_msg_data_cursor_init() ensures we don't
corrupt random memory should a buggy ->alloc_msg() return an unfit
ceph_msg.
While at it, I changed the "unknown tid" dout() to a pr_warn() to make
sure all skips are seen and unified format strings.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-09-02 11:37:09 +03:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-01-11 14:47:13 -08:00
|
|
|
|
2010-03-01 13:02:00 -08:00
|
|
|
|
2013-04-01 16:12:14 -05:00
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2014-01-09 20:08:21 +02:00
|
|
|
|
libceph: check data_len in ->alloc_msg()
Only ->alloc_msg() should check data_len of the incoming message
against the preallocated ceph_msg, doing it in the messenger is not
right. The contract is that either ->alloc_msg() returns a ceph_msg
which will fit all of the portions of the incoming message, or it
returns NULL and possibly sets skip, signaling whether NULL is due to
an -ENOMEM. ->alloc_msg() should be the only place where we make the
skip/no-skip decision.
I stumbled upon this while looking at con/osd ref counting. Right now,
if we get a non-extent message with a larger data portion than we are
prepared for, ->alloc_msg() returns a ceph_msg, and then, when we skip
it in the messenger, we don't put the con/osd ref acquired in
ceph_con_in_msg_alloc() (which is normally put in process_message()),
so this also fixes a memory leak.
An existing BUG_ON in ceph_msg_data_cursor_init() ensures we don't
corrupt random memory should a buggy ->alloc_msg() return an unfit
ceph_msg.
While at it, I changed the "unknown tid" dout() to a pr_warn() to make
sure all skips are seen and unified format strings.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-09-02 11:37:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-09 20:08:21 +02:00
|
|
|
|
|
|
|
|
|
2010-04-01 16:06:19 -07:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-03-01 13:02:00 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
libceph: check data_len in ->alloc_msg()
Only ->alloc_msg() should check data_len of the incoming message
against the preallocated ceph_msg, doing it in the messenger is not
right. The contract is that either ->alloc_msg() returns a ceph_msg
which will fit all of the portions of the incoming message, or it
returns NULL and possibly sets skip, signaling whether NULL is due to
an -ENOMEM. ->alloc_msg() should be the only place where we make the
skip/no-skip decision.
I stumbled upon this while looking at con/osd ref counting. Right now,
if we get a non-extent message with a larger data portion than we are
prepared for, ->alloc_msg() returns a ceph_msg, and then, when we skip
it in the messenger, we don't put the con/osd ref acquired in
ceph_con_in_msg_alloc() (which is normally put in process_message()),
so this also fixes a memory leak.
An existing BUG_ON in ceph_msg_data_cursor_init() ensures we don't
corrupt random memory should a buggy ->alloc_msg() return an unfit
ceph_msg.
While at it, I changed the "unknown tid" dout() to a pr_warn() to make
sure all skips are seen and unified format strings.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-09-02 11:37:09 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
2010-01-11 14:47:13 -08:00
|
|
|
|
libceph: check data_len in ->alloc_msg()
Only ->alloc_msg() should check data_len of the incoming message
against the preallocated ceph_msg, doing it in the messenger is not
right. The contract is that either ->alloc_msg() returns a ceph_msg
which will fit all of the portions of the incoming message, or it
returns NULL and possibly sets skip, signaling whether NULL is due to
an -ENOMEM. ->alloc_msg() should be the only place where we make the
skip/no-skip decision.
I stumbled upon this while looking at con/osd ref counting. Right now,
if we get a non-extent message with a larger data portion than we are
prepared for, ->alloc_msg() returns a ceph_msg, and then, when we skip
it in the messenger, we don't put the con/osd ref acquired in
ceph_con_in_msg_alloc() (which is normally put in process_message()),
so this also fixes a memory leak.
An existing BUG_ON in ceph_msg_data_cursor_init() ensures we don't
corrupt random memory should a buggy ->alloc_msg() return an unfit
ceph_msg.
While at it, I changed the "unknown tid" dout() to a pr_warn() to make
sure all skips are seen and unified format strings.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Elder <elder@linaro.org>
2015-09-02 11:37:09 +03:00
|
|
|
|
|
|
|
|
|
2023-12-14 16:01:03 +08:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2010-03-01 13:02:00 -08:00
|
|
|
|
2010-01-11 14:47:13 -08:00
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-08 13:58:34 -08:00
|
|
|
|
2010-02-19 21:43:23 -08:00
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-15 17:38:23 +02:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-07-30 00:37:57 +00:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-10 16:19:01 +01:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-19 21:43:23 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-04 14:43:32 -05:00
|
|
|
|
2010-02-19 21:43:23 -08:00
|
|
|
|
|
|
|
|
|
2017-06-19 12:18:05 +02:00
|
|
|
|
2011-03-21 15:07:16 -07:00
|
|
|
|
2016-04-28 16:07:27 +02:00
|
|
|
|
2010-02-19 21:43:23 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-28 16:07:26 +02:00
|
|
|
|
|
|
|
|
|
2010-02-19 21:43:23 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-19 16:59:08 +01:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2020-11-19 19:13:58 +01:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2020-11-19 19:13:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2012-05-16 15:16:39 -05:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
2018-07-27 19:18:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-26 16:47:20 +01:00
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2020-10-26 16:47:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
|
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
2010-02-02 16:21:06 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-03-25 10:26:14 -07:00
|
|
|
|
2010-02-02 16:21:06 -08:00
|
|
|
|
|
|
|
|
|
2009-11-18 16:19:57 -08:00
|
|
|
|
2020-11-19 16:59:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
2017-07-14 16:08:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
|
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
2014-11-04 16:33:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-14 16:01:03 +08:00
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 13:55:44 +08:00
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
This is the result of running the Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci. The script is designed to
avoid scalar types (which need careful case-by-case checking), and
instead replace kmalloc-family calls that allocate struct or union
object instances:
Single allocations: kmalloc(sizeof(TYPE), ...)
are replaced with: kmalloc_obj(TYPE, ...)
Array allocations: kmalloc_array(COUNT, sizeof(TYPE), ...)
are replaced with: kmalloc_objs(TYPE, COUNT, ...)
Flex array allocations: kmalloc(struct_size(PTR, FAM, COUNT), ...)
are replaced with: kmalloc_flex(*PTR, FAM, COUNT, ...)
(where TYPE may also be *VAR)
The resulting allocations no longer return "void *", instead returning
"TYPE *".
Signed-off-by: Kees Cook <kees@kernel.org>
2026-02-20 23:49:23 -08:00
|
|
|
|
|
|
|
|
|
2023-11-07 09:37:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2023-11-07 09:37:47 +08:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 13:55:44 +08:00
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2023-10-13 13:55:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-20 10:40:19 +02:00
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
|
|
|
|
|
2022-02-11 11:38:02 -05:00
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-15 16:30:54 +02:00
|
|
|
|
2020-12-23 16:32:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-26 22:23:56 +01:00
|
|
|
|
|
|
|
|
|
2020-11-19 16:59:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-06 11:31:10 -07:00
|
|
|
|