| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
jffs2_add_frag_to_fragtree()"
This reverts commit f2538f999345405f7d2e1194c0c8efa4e11f7b3a. The patch
stopped JFFS2 from being able to mount an existing filesystem with the
following errors:
jffs2: error: (77) jffs2_build_inode_fragtree: Add node to tree failed -22
jffs2: error: (77) jffs2_do_read_inode_internal: Failed to build final fragtree for inode #5377: error -22
Fixes: f2538f999345 ("jffs2: Fix possible null-pointer dereferences...")
Cc: stable@vger.kernel.org
Suggested-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
|
|
|
|
|
|
|
|
| |
In jffs2_scan_eraseblock(), 'sumptr' is allocated through kmalloc() if
'sumlen' is larger than 'buf_size'. However, it is not deallocated in the
following execution if jffs2_fill_scan_buf() fails, leading to a memory
leak bug. To fix this issue, free 'sumptr' before returning the error.
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
|
|
|
|
|
|
|
| |
Merge these two helpers into the only callers to get rid of some
amazingly bad calling conventions.
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In jffs2_add_frag_to_fragtree(), there is an if statement on line 223 to
check whether "this" is NULL:
if (this)
When "this" is NULL, it is used at several places, such as on line 249:
if (this->node)
and on line 260:
if (newfrag->ofs > this->ofs)
Thus possible null-pointer dereferences may occur.
To fix these bugs, -EINVAL is returned when "this" is NULL.
These bugs are found by a static analysis tool STCheck written by us.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux kernel tolerates C++ style comments these days. Actually, the
SPDX License tags for .c files start with //.
On the other hand, uapi headers are written in more strict C, where
the C++ comment style is forbidden.
I simply dropped these lines instead of fixing the comment style.
This code has been always commented out since it was added around
Linux 2.4.9 (i.e. commented out for more than 17 years).
'Maybe later...' will never happen.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
|
|
|
|
|
|
| |
free the symlink body after the same RCU delay we have for freeing the
struct inode itself, so that traversal during RCU pathwalk wouldn't step
into freed memory.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
|
|
|
|
|
|
| |
Need to tell the compiler that the acl entries follow the acl header.
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
|
| |
|
|
|
|
|
| |
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
|
|
|
|
|
| |
This file had no header, copyright, or license. Based on git history,
added appropriate copyright and license.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the following sequence causes a endless loop when extending an
IMFS file:
- Create a file with zero length and close it.
- Make sure nearly no allocatable memory is left.
- Open the file and write enough data into it that more than the
remaining memory will be used.
In that case when extending the IMFS file, the file currently need zero
blocks. If allocating enough new blocks fails, the already allocated new
blocks will be freed again.
The comparison of block>=old_blocks that has been used prior to this
patch compared two unsigned numbers. If old_blocks was zero, the
comparison of these two numbers always evaluated to true.
This patch frees the last block in a separate step to avoid this
problem.
Fixes #4639
|
| |
|
|
|
|
| |
Updates #3053.
|
|
|
|
|
|
|
| |
Eric Norum granted permission plus git log archeology to get year for
his copyright.
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
| |
Updates #3053.
|
|
|
|
|
|
| |
Use the same form of IMD in all copyright lines
Update #4625.
|
|
|
|
| |
Updates #4625.
|
|
|
|
| |
Updates #4625.
|
| |
|
|
|
|
|
|
|
| |
Also updated licenses.
Closes #4400
Updates #3899
|
|
|
|
| |
Update #3850
|
|
|
|
| |
Update #3850
|
|
|
|
|
|
| |
This speeds up reading fragmented files.
Fix #3689
|
|
|
|
| |
Update #3706.
|
|
|
|
| |
Update #3706.
|
|
|
|
| |
Update #3706.
|
|
|
|
|
|
|
| |
- Do not write past the last location of the search bit map
whe nit is being created.
Closes #4148
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently if mount fails, a converter isn't destroyed. We have to take
care of two cases:
1. The user doesn't provide a converter.
In this case mounting a dosfs creates a default converter. This patch
makes sure that the converter is destroyed again if mount failes for
this case.
2. The user provides a converter.
In this case it's not sure that the dosfs specific routines are reached
because mount can fail before that. Therefore the user has to destroy
the converter himself again. This patch adds a documentation for that
and implements it in the media server.
Closes #4042.
|
|
|
|
| |
Close #3420.
|
|
|
|
| |
This order change fixes the Latex documentation build via Doxygen.
|
|
|
|
|
|
|
|
| |
Use the following variant which was already used by most source files:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a simplified path evaluation function IMFS_eval_path_devfs() for a
device only IMFS configuration.
The code size can be further reduced by the application if it disables
the support for legacy IO drivers via:
#define CONFIGURE_IMFS_DISABLE_MKNOD
#define CONFIGURE_IMFS_DISABLE_MKNOD_DEVICE
Obsolete CONFIGURE_MAXIMUM_DEVICES. Remove BSP_MAXIMUM_DEVICES.
Update #3894.
Update #3898.
|
|
|
|
| |
Update #3894.
|
|
|
|
| |
Update #3894.
|
|
|
|
|
|
|
|
| |
The CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK value is validated by
<rtems/confdefs/libio.h>. Changing this value during runtime could lead
to memory corruption.
Update #3894.
|
|
|
|
| |
Update #3894.
|
|
|
|
| |
Update #3894.
|
|
|
|
| |
Update #3894.
|
|
|
|
|
|
|
|
| |
Remove IMFS_NODE_FLAG_NAME_ALLOCATED and instead replace the node
control in rename operations. This avoids a special case in the general
node destruction which pulled in free().
Update #3894.
|
|
|
|
|
| |
Dead code identified by Coverity (CID 1456674). The value of ret
at line 358 is always 0.
|
|
|
|
|
| |
Dead code identified by Coverity (CID 1456678). The value of ret
at line 293 is always 0.
|
|
|
|
|
|
|
| |
Use self-contained condition variables instead of Classic API barriers.
This simplifies the implementation and configuration.
Update #3840.
|
|
|
|
| |
Update #3823.
|
|
|
|
|
|
|
|
| |
Fix prototype.
Fix node size. Linfiles are dynamically turned into memfiles.
Update #3823.
|
|
|
|
| |
Update #3818.
|
| |
|
|
|
|
| |
Update #3706.
|
| |
|
| |
|