- 30 Jul, 2017 36 commits
-
-
Laurentiu Tudor authored
The bus driver relies on generic msi domain ops. Fix compilation for architectures that don't provide it (e.g. x86_64). Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Laurentiu Tudor authored
Nothing from linux/irqchip/arm-gic-v3.h is used, so the #include can be safely dropped. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Laurentiu Tudor authored
No need to use arch-specific memory barriers; switch to using generic ones. The rmb()s were useless so drop them. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Laurentiu Tudor authored
The mc-bus specific field, fsl_mc in struct msi_desc is missing its comment so add it. Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xaralampos Mainas authored
Fix a comment misspell Signed-off-by: Xaralampos Mainas <xmrancho@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Simo Koskinen authored
Removes following warnings found by checkpatch.pl script: WARNING: Prefer using '"%s...", __func__' to using 'xxx', this function's name, in a string Signed-off-by: Simo Koskinen <koskisoft@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chris Coffey authored
Replace hard-coded function names in strings with "%s", __func__ in the goldfish_nand.c file. Issue found by checkpatch.pl. Signed-off-by: Chris Coffey <cmc@babblebit.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitriy Cherkasov authored
This #if 0 block has been commented out for years. Assume it is not needed and remove it. Signed-off-by: Dmitriy Cherkasov <dmitriy@oss-tech.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
Currently ll_initxattrs() initializes the security xattrs in a very non-standard using get_xattr_types() to get the struct handler that lustre created to then call indirectly the function to set the xattr. The available __vfs_setxattr() function does the same thing and also handles the case of when size is zero the xattr should be set to empty EA. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183 Reviewed-on: https://review.whamcloud.com/27240Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Sebastien Buisson <sbuisson@ddn.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Eremin authored
The reason xattr.c can compile without xattr.h is due to lustre_compact.h being included. That header will eventually go away so lets directly include xattr.h. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7244 Reviewed-on: http://review.whamcloud.com/16707Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Eremin authored
Move the freeing of all cached acls from ll_get_acl() to the function ll_clear_inode(). This way we free all cached acls for the inode just before clearing it. This allow us to take advantage of cached acls and correctly free them before free. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-on: https://review.whamcloud.com/25965 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
The function libcfs_ioctl_getdata() test to see if libcfs_ioctl_hdr is smaller than struct libcfs_ioctl_data in size. This is wrong and it breaks the ioctl that is used to collect LNet stats. The correct size to compare against is struct libcfs_ioctl_hdr. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5935 Reviewed-on: http://review.whamcloud.com/12782 Fixes: ed2f549d ("staging: lustre: libcfs: test if userland data is to small") Reported-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bob Glosman authored
report times and time diffs in seconds.microseconds instead of seconds Signed-off-by: Bob Glosman <bob.glossman@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7733 Reviewed-on: http://review.whamcloud.com/18335Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Minh Diep <minh.diep@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
The libcfs CFS_DURATION_T define is really only for jiffies and its being used with time64_t in some of the ptlrpc code. Lets remove CFS_DURATION_T and replaced it with normal %lld instead. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/24977 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4423Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
During the reorganization of ptlrpc_request some of the time64_t fields were incorrectly turned into time_t. Restore those fields back to time_64_t. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: https://review.whamcloud.com/24977 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4423 Fixes: 32c8728d ("staging/lustre/ptlrpc: reorganize ptlrpc_request") CC: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fan Yong authored
Under DNE mode, if we do not restrict the linkEA size, and if there are too many cross-MDTs hard links to the same object, then it will cause the llog overflow. On the other hand, too many linkEA entries in the linkEA will serious affect the linkEA performance because we only support to locate linkEA entry consecutively. So we need to restrict the linkEA size. Currently, it is 4096 bytes, that is independent from the backend. If too many hard links caused the linkEA overflowed, we will add overflow timestamp in the linkEA header. Signed-off-by: Fan Yong <fan.yong@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8569 Reviewed-on: https://review.whamcloud.com/23500Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: wangdi <di.wang@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
Remove all test of less than zero for unsigned values found with -Wtype-limits. Signed-off-by: James Simmons <uja.ornl@yahoo.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8843 Reviewed-on: https://review.whamcloud.com/23811Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jian Yu <jian.yu@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
James Simmons authored
Earlier the function interval_iterate_reverse function was removed since it wasn't used by anyone. Now it is being restored since it will be used by a future patch. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Niu Yawei authored
It's not necessary reassgin & re-adjust rq_mbits for replay request in ptlrpc_set_bulk_mbits(), they all must have already been correctly assigned before. Such unecessary reassign could make the first matchbit not PTLRPC_BULK_OPS_MASK aligned, that'll trigger LASSERT in ptlrpc_register_bulk(): - ptlrpc_set_bulk_mbits() is called when first time sending request, rq_mbits is set as xid, which is BULK_OPS aligned; - ptlrpc_set_bulk_mbits() continue to adjust the mbits for multi-bulk RPC, rq_mbits is not aligned anymore, then rq_xid is changed accordingly if client is connecting to an old server, so rq_xid became unaligned too; - The request is replayed, ptlrpc_set_bulk_mbits() reassign the rq_mbits as rq_xid, which isn't aligned already, but ptlrpc_register_bulk() still assumes this value as the first matchbits and LASSERT it's BULK_OPS aligned. Signed-off-by: Niu Yawei <yawei.niu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6808 Reviewed-on: http://review.whamcloud.com/23048Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
With people starting to test security enabled ptlrpc a list_del corruption was reported. The reason for this error was tracked down to wrong arguments to list_add_tail(). In sptlrpc_gc_add_sec() swap the arguments to list_add_tail() so that it does what we meant it to do. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8270 Reviewed-on: http://review.whamcloud.com/20784Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nathaniel Clark authored
If a backing filesystem (ZFS) returns that it supports very large (LLONG_MAX) object sizes, that should be correctly supported. This fixes the check for unitialized stripe_maxbytes in lsm_unpackmd_common(), so that ZFS can return LLONG_MAX and it will be okay. This issue is excersized by writing to or past the 2TB boundry of a singly stripped file. Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7890 Reviewed-on: http://review.whamcloud.com/19066Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
Assume a real connection in lmv_connect(). Mark OBD_CONNECT_REAL obsolete. Remove the then unnecessary refcount and exp members of struct lmv_obd. Remove calls to lmv_check_connect(). Disconnect the export in the appropriate error path of lmv_connect(). Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7669 Reviewed-on: http://review.whamcloud.com/18018Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: wangdi <di.wang@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
Remove: the tested but never set flag OBD_STATFS_PTLRPCD, the empty file lustre/lov/lovsub_io.c, the unused ld_emerg member of struct lov_device, the unused struct lov_device_emerg and supporting functions, the unused struct lov_lock_link and supporting functions, and the unused, get only, or set only members of struct lovsub_device, lovsub_lock, lov_sublock_env, lov_thread_info, lov_io_sub, lov_io, lov_request, and lov_request_set. Reduce the scope of several functions from lov_request.c. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814 Reviewed-on: http://review.whamcloud.com/14878Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Ben Evans <bevans@cray.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sebastien Buisson authored
Fix "control flow" issues found by Coverity version 6.6.1: Logically dead code (DEADCODE) Execution cannot reach this statement. Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4048 Reviewed-on: http://review.whamcloud.com/7824Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Emoly Liu <emoly.liu@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andriy Skulysh authored
cfs_hash_for_each_relax() assumes that cfs_hash_put_locked() doesn't release bd lock, but it isn't true for ldlm_res_hop_put_locked(). Add recfcount on next hnode in cfs_hash_for_each_relax() and remove ldlm_res_hop_put_locked() Signed-off-by: Andriy Skulysh <andriy.skulysh@seagate.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6304 Xyratex-bug-id: MRP-2352 Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com> Reviewed-by: Alexander Boyko <alexander.boyko@seagate.com> Tested-by: Alexander Lezhoev <alexander.lezhoev@seagate.com> Reviewed-on: http://review.whamcloud.com/13908Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
Restore the missing trailing newlines in /sys/fs/lustre/ldlm/namespaces/*/lru_{max_age,size}. Signed-off-by: John L. Hammond <john.hammond@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9109 Reviewed-on: https://review.whamcloud.com/25522Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Mike Pershin <mike.pershin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bobi Jam authored
It is possible that an osc_extent contains more than 256 chunks, and the IO engine won't add this extent in one RPC (try_to_add_extent_for_io) so that osc_check_rpcs() run into a loop upon this extent and never break. This patch changes osc_max_write_chunks() to make sure the value can cover all possible osc_extent, so that all osc_extent will be added into one RPC. This patch also add another field erd_max_extents in extent_rpc_data to make sure not to add too many fragments in a single RPC. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8680 Reviewed-on: http://review.whamcloud.com/23326Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bobi Jam authored
Add fiemap_for_stripe() to get file map extent from each stripe device. Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8773 Reviewed-on: https://review.whamcloud.com/23461Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bobi Jam authored
Change loff_t to u64 in lov_object_fiemap() since loff_t is a signed value type. Otherwise there could be an overflow in drivers/staging/lustre/lustre/lov/lov_object.c:1241 lov_object_fiemap() warn: signed overflow undefined. 'fm_start + fm_length < fm_start' Signed-off-by: Bobi Jam <bobijam.xu@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8773 Reviewed-on: https://review.whamcloud.com/23461Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Arvind Yadav authored
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Arvind Yadav authored
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Arvind Yadav authored
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 9489 992 40 10521 2919 lustre/lustre/osc/lproc_osc.o 1289 288 0 1577 629 lustre/lustre/lmv/lproc_lmv.o 3794 928 40 4762 129a lustre/lustre/lov/lproc_lov.o 3802 576 40 4418 1142 lustre/lustre/mdc/lproc_mdc.o File size After adding 'const': text data bss dec hex filename 9553 928 40 10521 2919 lustre/lustre/osc/lproc_osc.o 1353 224 0 1577 629 lustre/lustre/lmv/lproc_lmv.o 3858 864 40 4762 129a lustre/lustre/lov/lproc_lov.o 3866 512 40 4418 1142 lustre/lustre/mdc/lproc_mdc.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Colin Ian King authored
The arguments args->lstio_ses_force and args->lstio_ses_timeout are in the incorrect order. Fix this by swapping them around. Detected by CoverityScan, CID#1226833 ("Arguments in wrong order") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christopher Mårtensson authored
"checkpatch.pl -f ..." gave ERROR: open brace '{' following function definitions go on the next line Signed-off-by: Christopher Mårtensson <cribalik@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rob Herring authored
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Stuart Yoder <stuyoder@gmail.com> Cc: Laurentiu Tudor <laurentiu.tudor@nxp.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Julia Lawall authored
The hc_driver structure is only passed as the first argument to usb_create_hcd, which is declared as const. Thus the hc_driver structure itself can be const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 29 Jul, 2017 4 commits
-
-
Dan Carpenter authored
"val" can be negative, so we'd write before the start of the par->gpio.db[] array. Fixes: c296d5f9 ("staging: fbtft: core support") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jacob von Chorus authored
The return values on error are modified to be valid error codes. Theses error codes are propagated back to the init function's return. Signed-off-by: Jacob von Chorus <jacobvonchorus@cwphoto.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jacob von Chorus authored
The bitstream storage variables were changed from char to u8 arrays to prevent issues such as negative lengths. This change makes the code compatible with the "data" field in "struct firmware" which is of type u8. Signed-off-by: Jacob von Chorus <jacobvonchorus@cwphoto.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jacob von Chorus authored
Four fields in struct fpgaimage are char arrays of length MAX_STR (256). The amount of data read into these buffers is controlled by a length field in the bitstream file read from userspace. If a corrupt or malicious firmware file was supplied, kernel data beyond these buffers can be overwritten arbitrarily. This patch adds a check of the bitstream's length value to ensure it fits within the bounds of the allocated buffers. An error condition is returned from gs_read_bitstream if any of the reads fail. Signed-off-by: Jacob von Chorus <jacobvonchorus@cwphoto.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-