Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
971f66d8
Commit
971f66d8
authored
Dec 03, 2018
by
Kees Cook
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-linus/pstore' into for-next/pstore
parents
ccda4af0
89d328f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
fs/pstore/ram.c
fs/pstore/ram.c
+6
-9
include/linux/pstore.h
include/linux/pstore.h
+4
-1
No files found.
fs/pstore/ram.c
View file @
971f66d8
...
...
@@ -816,17 +816,14 @@ static int ramoops_probe(struct platform_device *pdev)
cxt
->
pstore
.
data
=
cxt
;
/*
* Console can handle any buffer size, so prefer LOG_LINE_MAX. If we
* have to handle dumps, we must have at least record_size buffer. And
* for ftrace, bufsize is irrelevant (if bufsize is 0, buf will be
* ZERO_SIZE_PTR).
* Since bufsize is only used for dmesg crash dumps, it
* must match the size of the dprz record (after PRZ header
* and ECC bytes have been accounted for).
*/
if
(
cxt
->
console_size
)
cxt
->
pstore
.
bufsize
=
1024
;
/* LOG_LINE_MAX */
cxt
->
pstore
.
bufsize
=
max
(
cxt
->
record_size
,
cxt
->
pstore
.
bufsize
);
cxt
->
pstore
.
buf
=
kmalloc
(
cxt
->
pstore
.
bufsize
,
GFP_KERNEL
);
cxt
->
pstore
.
bufsize
=
cxt
->
dprzs
[
0
]
->
buffer_size
;
cxt
->
pstore
.
buf
=
kzalloc
(
cxt
->
pstore
.
bufsize
,
GFP_KERNEL
);
if
(
!
cxt
->
pstore
.
buf
)
{
pr_err
(
"cannot allocate pstore buffer
\n
"
);
pr_err
(
"cannot allocate pstore
crash dump
buffer
\n
"
);
err
=
-
ENOMEM
;
goto
fail_clear
;
}
...
...
include/linux/pstore.h
View file @
971f66d8
...
...
@@ -90,7 +90,10 @@ struct pstore_record {
*
* @buf_lock: spinlock to serialize access to @buf
* @buf: preallocated crash dump buffer
* @bufsize: size of @buf available for crash dump writes
* @bufsize: size of @buf available for crash dump bytes (must match
* smallest number of bytes available for writing to a
* backend entry, since compressed bytes don't take kindly
* to being truncated)
*
* @read_mutex: serializes @open, @read, @close, and @erase callbacks
* @flags: bitfield of frontends the backend can accept writes for
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment