summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* README: add a section for giving hints on testingAmar Tumballi2018-10-111-0/+26
| | | | | | Change-Id: I1529494504c38172f56759c0f06231864e32df24 updates: bz#1193929 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* cluster/dht : Fix coverity issueAshish Pandey2018-10-111-2/+2
| | | | | | | | | | | | To check if the gfid is null or not we should use function gf_uuid_is_null CID: 1382364 https://scan6.coverity.com/reports.htm#v42607/p10714/fileInstanceId=86243257&defectInstanceId=26374360&mergedDefectId=1382364 Change-Id: I81944b823c9ee6e6dcc9695f64f7e5966e0d7030 updates: bz#789278 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* gfapi: fix crash of using uninitialized fs->ctxKinglong Mee2018-10-101-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 0 0x00007fb3db3a2ee4 in pub_glfs_fini (fs=0x7f8977d63f00) at glfs.c:1236 1 0x00007fb3db3a2065 in pub_glfs_new (volname=0x7f80de4d4d40 "openfs1") at glfs.c:784 2 0x00007fb3db5cf089 in glusterfs_get_fs (params=..., up_ops=up_ops@entry=0x7fb3ca643130) at /usr/src/debug/nfs-ganesha/src/FSAL/FSAL_GLUSTER/export.c:889 3 0x00007fb3db5cf99a in glusterfs_create_export ( fsal_hdl=0x7fb3db7e2490 <GlusterFS+112>, parse_node=0x7fb3ca6387d0, err_type=<optimized out>, up_ops=0x7fb3ca643130) at /usr/src/debug/nfs-ganesha/src/FSAL/FSAL_GLUSTER/export.c:1011 4 0x00007fb3e11c485f in mdcache_fsal_create_export ( sub_fsal=0x7fb3db7e2490 <GlusterFS+112>, parse_node=parse_node@entry=0x7fb3ca6387d0, err_type=err_type@entry=0x7fb3c0bef140, super_up_ops=<optimized out>) at /usr/src/debug/nfs-ganesha/src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_main.c:281 (gdb) p errno $1 = 12 Change-Id: I3dd5b84b52962ceb0b5d4f9b4f475bf4aa724292 updates: bz#1626313 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* afr: prevent winding inodelks twice for arbiter volumesRavishankar N2018-10-102-1/+45
| | | | | | | | | | | | | | | | | | Problem: In an arbiter volume, if there is a pending data heal of a file only on arbiter brick, self-heal takes inodelks twice due to a code-bug but unlocks it only once, leaving behind a stale lock on the brick. This causes the next write to the file to hang. Fix: Fix the code-bug to take lock only once. This bug was introduced master with commit eb472d82a083883335bc494b87ea175ac43471ff Thanks to Pranith Kumar K <pkarampu@redhat.com> for finding the RCA. fixes: bz#1637802 Change-Id: I15ad969e10a6a3c4bd255e2948b6be6dcddc61e1 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* libglusterfs: NULL pointer dereferencing clang fixIraj Jamali2018-10-101-0/+3
| | | | | | | | | Avoided NULL pointer dereferencing by doing GF_VALIDATE_OR_GOTO for rvec Updates: bz#1622665 Change-Id: I650e0203796dd705d79060f9506fc6c559b30f56 Signed-off-by: Iraj Jamali <ijamali@redhat.com>
* locks : fix coverity issueSunny Kumar2018-10-102-0/+8
| | | | | | | | | This patch fixes CID 1356544 and 1356539. Both are of type NULL_RETURNS. Change-Id: I2ef7c3ff9929c4d85b79fff00e835ebee3ff3ce0 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* socket: clear return value if error is going to be handled in event threadKinglong Mee2018-10-101-0/+3
| | | | | | Change-Id: Ibce94f282b0aafaa1ca60ab927a469b70595e81f updates: bz#1626313 Signed-off-by: Zhang Huan <zhanghuan@open-fs.com>
* all: fix warnings on non 64-bits architecturesXavi Hernandez2018-10-1060-250/+251
| | | | | | | | | | When compiling in other architectures there appear many warnings. Some of them are actual problems that prevent gluster to work correctly on those architectures. Change-Id: Icdc7107a2bc2da662903c51910beddb84bdf03c0 fixes: bz#1632717 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* logging: fix file handle leak when calls glfs_set_logging more timesKinglong Mee2018-10-101-0/+7
| | | | | | | | Closes the log file and reopens it to prevent leakage of file handles. Change-Id: Idfaa479961bb0088004d0d5558bdb0eb32cff632 updates: bz#1626313 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* libglusterfs/src/logging.c: reduce the use of stringsYaniv Kaul2018-10-101-124/+55
| | | | | | | | | | | | | | | | | | I did not see a good reason to copy the temp strings str1 and str2 into msg string, and just used str1 (sprintf'ed str2 into it first). Hope it makes logging somewhat faster, but I also hope there's more room for improvement for faster logging. Renamed str1 to logline and str2 to msg for better readability. Also, remove dead assignment in _gf_msg() (clang complained). Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I19457d705c0b043937d96a4db35d087bb8e9b35a
* features/snapview-client: replace gf_log with gf_msgRaghavendra Bhat2018-10-105-168/+207
| | | | | | Change-Id: I87f01d86f50eb2fca21febb0ea3e77fbd152eb93 updates: bz#1626610 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* cloudsync: coverity fixSusant Palai2018-10-102-2/+4
| | | | | | | | | CID: 1394649 1394657 Issue: Explicit null dereferenced Change-Id: Ic1040ffa5548e1ecd49cfdc9a8716be445cbdf0f Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* cli: memory leak issues reported by asanAmar Tumballi2018-10-093-5/+17
| | | | | | | | | With this fix, a run on 'rpc-coverage.t' passes properly. This should help to get started with other fixes soon! Change-Id: I257ae4e28b9974998a451d3b490cc18c02650ba2 updates: bz#1633930 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* cliutils : python2 to python3 compatSunny Kumar2018-10-091-13/+13
| | | | | | | | | | This patch fixes import issue in cliutils. Provided solution is to use relative import. Change-Id: I14c9a0b528ef52e7c91f6b17b569c68c2ced8912 updates: #411 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* extras: Script to collect system-statsPranith Kumar K2018-10-091-0/+52
| | | | | | | | | | | | | For debugging performance issues we found that this script is very useful. Script collects the stats of vmstat/iostat/top/sar to get metrics about memory/disk/cpu/network respectively at the configured interval. It is very important to collect all these metrics at the same time so that they can be correlated easily, so made this into a script fixes bz#1633926 Change-Id: Iea52e55179b21c505953722c8898293fe92cb8de Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* syncop: check syncenv status before pthread_cond_timedwait() to avoid 600s ↵Kinglong Mee2018-10-091-4/+3
| | | | | | | | | | | timeout If a syncenv_task starts after syncenv_destroy, the syncenv_task enters a 600s timeout cond timedwait, and syncenv_destroy must waits it timeout. Change-Id: I972a2b231e50cbebd3c71707800e58033e40c29d updates: bz#1626313 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* rpc: coverity fixesMilind Changire2018-10-092-1/+3
| | | | | | | | | | | | | CID: [1] 1394646 Unchecked return value from library CID: [2] 1394633 Unused value CID: 1382443 Sleeping while holding a lock [This is intentional] [1] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159112&defectInstanceId=26360786&mergedDefectId=1394646 [2] https://scan6.coverity.com/reports.htm#v40014/p10714/fileInstanceId=86159365&defectInstanceId=26360919&mergedDefectId=1394633 Change-Id: I03086f7a9672c9f50a2bc44cdbce0006c887357b updates: bz#789278 Signed-off-by: Milind Changire <mchangir@redhat.com>
* events: python2 to python3 compatKotresh HR2018-10-083-12/+13
| | | | | | | | | | 1. Fix imports 2. Use universal_newlines flag in Popen 3. encode msg used in 'sendto' Updates: #411 Change-Id: Ieacdc2ba86953ff3a2e9d9b9a97157e8e0e36836 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* georep: python2 to python3 compat - syscallsKotresh HR2018-10-087-35/+88
| | | | | | | | | | | | 1. ctypes/syscalls A) arguments is expected to be encoded B) Raw conversion of return value from bytearray into string 2. struct pack/unpack - Raw converstion of string to bytearray 3. basestring -> str Updates: #411 Change-Id: I80f939adcdec0ed0022c87c0b76d057ad5559e5a Signed-off-by: Kotresh HR <khiremat@redhat.com>
* packaging: remove RHEL5-isms from glusterfs.spec(.in)Kaleb S. KEITHLEY2018-10-083-100/+5
| | | | | | | | | | | CentOS5 too It's been a couple of years since we stopped doing anything with RHEL/CentOS 5 Change-Id: I83e78fa84b93fa5baddaf3fab92736d692a9bbca updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* core: glusterfsd keeping fd open in index xlatorMohit Agrawal2018-10-0813-81/+346
| | | | | | | | | | | | | | Problem: Current resource cleanup sequence is not perfect while brick mux is enabled Solution: 1) Destroying xprt after cleanup all fd associated with a client 2) Before call fini for brick xlators ensure no stub should be running on a brick Change-Id: I86195785e428f57d3ef0da3e4061021fafacd435 fixes: bz#1631357 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* cli: Resource leak coverity fixSanju Rakonde2018-10-081-0/+1
| | | | | | | | This patch fixes CID 1175017. Change-Id: I4968c35489aeb5bfa0461b2edf2a0d73b7f03c14 updates: bz#789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* changetimerecorder : fix coverity issueSunny Kumar2018-10-081-0/+1
| | | | | | | | | | This patch fixes CID : 1124725 Issue : Resource leak updates: bz#789278 Change-Id: I2afe65875fa393fd2d2f90b6f7cf7f6782dabf89 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* features/bit-rot: NULL pointer deferencing clang fixSheetal Pamecha2018-10-082-5/+13
| | | | | | | | | | | Problem: local could be NULL Added condition checks to address this issue Updates: bz#1622665 Change-Id: I7be7dacc5386a77441385240b43f22d85074b69d Signed-off-by: Sheetal Pamecha <sheetal.pamecha08@gmail.com>
* tests: add get-state command to testSanju Rakonde2018-10-071-0/+7
| | | | | | | | | | | | | | When geo-replication session is running, run "gluster get-state" command to test. https://review.gluster.org/#/c/glusterfs/+/20461/ patch fixes glusterd crash, when we run get-state command with geo-rep session configured. Adding the test now. Fixes: bz#1598345 Change-Id: I56283fba2c782f83669923ddfa4af3400255fed6 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* xlators/experimental: move template files to '.c.in' typeAmar Tumballi2018-10-0513-1691/+1598
| | | | | | | | | | | | | | | | | | | | | | This is critical because we shouldn't be applying the automated coding standard (clang-format) tool on these files. This patchset is done by below steps: * clang-format -i ${filename} This creates syntax errors. Fix them using below two commands: * sed -i -e 's/ @/@/g' ${filename} * sed -i -e 's/,@/, @/g' ${filename} With this, these files are having minimum changes requried to compile, and is as close to the coding standard as possible. * git rename ${filename} ${filename}.in Updates: bz#1564149 Change-Id: Icf90f7f81d6fa4400be4826e094fdff8e64508d0 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* cli : coverity fix in cli-rl.cSunny Kumar2018-10-051-3/+1
| | | | | | | | | | This patch fixes CID 1395248. Issue : Resource leak updates: bz#789278 Change-Id: I2fd4e36ac2c2a034e56883436abfc5199b095026 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* dht: coverity fixesSusant Palai2018-10-054-35/+30
| | | | | | | | | | CID: 1356541 Issue: Dereference null return value CID: 1382411 Issue: Dereference after null check CID: 1391409 Issue: Unchecked return value Change-Id: Id3d4feb4e88df424003cc8e8a1540e77bbe030e3 Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* libglusterfs : fix coverity issue in stack.cSunny Kumar2018-10-051-1/+4
| | | | | | | | | | This patch fixes CID : 1395323. Issue : Uninitialized scalar variable (UNINIT) updates: bz#789278 Change-Id: Id9567ca2ff9b5a36b9014afa70cc5795fe67161d Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* features/compress: NULL pointer dereferencing clang fixHarpreet Lalwani2018-10-051-2/+5
| | | | | | | | | Added a Label "err" to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I7ec02a9cbbc482c2cf77f66e5692e86cd251cd53 Signed-off-by: Harpreet Lalwani <hlalwani@redhat.com>
* cloudsync: coverity fixSusant Palai2018-10-051-1/+1
| | | | | | | | | | | CID: 1394631 1394634 1394643 1394645 1394652 1394655 1394661 1394666 1394669 1394670 1394671 Issue: Argument cannot be negative Change-Id: Id4a9b1adcc271374971e788f161d91e8c9ac442f Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* libglusterfs: coverity fixSusant Palai2018-10-051-2/+2
| | | | | | | | CID: 1395829 Issue: Uninitialized pointer read Change-Id: I2e03d7b2a2f28f4a46408402ae03beba0f4c8308 Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* dht: volume_options 'options' collision with nfs-ganesha's 'options'Kaleb S. KEITHLEY2018-10-044-7/+11
| | | | | | | | | | | | | | | | | When dht was converted to xlator_api, the variable 'options' was not changed to dht_options, the same as was done to all the other xlators that were converted to xlator_api. Thus the reference to 'options' in dht.c is not resolved until runtime, and the RTlinker's search path starts with symbols in the executable, i.e. ganesha.nfsd's 'options'. (Which is obviously not the right one.) The unused extern references to 'options' (now dht_options) in nufa.c and switch.c is curious. Change-Id: Idf4a5d5fbd39aadfa5a4b529bceea65a3cbdf8f3 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* Reduce execution time of bug-1559004-EMLINK-handling.tXavi Hernandez2018-10-041-12/+51
| | | | | | | | | | | This patch reduces the execution time of bug-1559004-EMLINK-handling.t from ~14 minutes to ~90 seconds. To do so, it creates some fake hard links directly on the brick instead of creating them through the volume. Change-Id: I9715ff1a4eba47574c733d4f28e68f42f56a7d3f updates: bz#1193929 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* mgmt/glusterd: use proper path to the volfileRaghavendra Bhat2018-10-043-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Till now, glusterd was generating the volfile path for the snapshot volume's bricks like this. /snaps/<snap name>/<brick volfile> But in reality, the path to the brick volfile for a snapshot volume is /snaps/<snap name>/<snap volume name>/<brick volfile> The above workaround was used to distinguish between a mount command used to mount the snapshot volume, and a brick of the snapshot volume, so that based on what is actually happening, glusterd can return the proper volfile (client volfile for the former and the brick volfile for the latter). But, this was causing problems for snapshot restore when brick multiplexing is enabled. Because, with brick multiplexing, it tries to find the volfile and sends GETSPEC rpc call to glusterd using the 2nd style of path i.e. /snaps/<snap name>/<snap volume name>/<brick volfile> So, when the snapshot brick (which is multiplexed) sends a GETSPEC rpc request to glusterd for obtaining the brick volume file, glusterd was returning the client volume file of the snapshot volume instead of the brick volume file. Change-Id: I28b2dfa5d9b379fe943db92c2fdfea879a6a594e fixes: bz#1635050 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* glusterd: ignore RPC events when glusterd is shutting downAtin Mukherjee2018-10-041-1/+11
| | | | | | | | | | | | | | | When glusterd receives a SIGTERM while it receives RPC connect/disconnect/destroy events, the thread might lead to a crash while accessing rcu_read_lock () as the clean up thread might have already freed up the resources. This is more observable when glusterd comes up with upgrade mode = on during upgrade process. The solution is to ignore these events if glusterd is already in the middle of cleanup_and_exit (). Fixes: bz#1635593 Change-Id: I12831d31c2f689d4deb038b83b9421bd5cce26d9 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* mgmt/glusterd: NULL pointer dereferencing clang fixIraj Jamali2018-10-031-15/+16
| | | | | | | | | Added checks to avoid NULL pointer dereferencing Updates: bz#1622665 Change-Id: I745c1f3ba4df0e486ce99301843f9f13d01c00e0 Signed-off-by: Iraj Jamali <ijamali@redhat.com>
* cli: fix glusterd memory leak cause by "gluster v status volume_name"shujun100862018-10-031-0/+1
| | | | | | | | | | | If use this command every some seconds for example 15s to check gluster brick status, the glusterd will use about 1G memory in a year. free the value of rsp in gf_cli_status_cbk. glusterd allocate the value of rsp and send it to cli, but cli do not free the value, that cause glusterd memory leak. fixes: bz#1635480 Change-Id: I3f19cd0d4b791ae1b35f9664b3a668b1579f1178 Signed-off-by: shujun10086 <shujun.huang@nokia-sbell.com>
* mgmt/glusterd: NULL pointer deferencing clang fixIraj Jamali2018-10-026-6/+6
| | | | | | | | | Changed this->name to "glusterd" Updates: bz#1622665 Change-Id: Ic8ce428cefd6a5cecf5547769d8b13f530065c56 Signed-off-by: Iraj Jamali <ijamali@redhat.com>
* python: remove shebangs of non-main scripts and make others executableNiels de Vos2018-10-0215-8/+0
| | | | | | | | | | | | | | | Some of the scripts that have a #!/usr/bin/python3 shebang do not have a main() like function. These scripts will not get executed but only imported. They do not need the shebang. A few others are not installed with 'make install', but do have a main() like function. These scripts are expected to be used by developers for different tasks (mostly code generation). Marking these scripts executable to make it easier to identify them. Change-Id: I73541471deb7e0830766b804786244e73dfe4221 Updates: #411 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* rpc: make binding to port 0 as the default if no option is providedAmar Tumballi2018-10-026-25/+45
| | | | | | | | | | | | | | | | | | | | | | | Right now, if no option is provided, the default port is assumed, which is 24007. Ideally, for 'glusterfsd' processes, it is better to not assume there are any ports given, so it can start listening on any port which is available. This helps us to cleanup the dependencies on glusterd from glusterfsd at the moment. No changes would be done to glusterd code, but making the right defaults helps to make glusterfsd more independent process later. NOTE: This patch is a reduced version of below set of patches: * https://review.gluster.org/14613/ & * https://review.gluster.org/14670/ & * https://review.gluster.org/14671/ Credits: Prasanna Kumar Kalever <pkalever@redhat.com> updates: bz#1343926 Change-Id: Ib874e10505e7366dc56ba754458252b67052e653 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* georep: python2 to python3 compat - pickleKotresh HR2018-10-021-4/+12
| | | | | | | | | | | | | | | | | | | | | | Handle py2 and py3 compatibility for pickling and unpickling. Geo-rep pickles and unpickles reading sys.stdin and sys.stdout streams. py2 and py3 compatibility expects the streams to be opened in binary mode but the sys.stdout objects are different in python2 and python3 python2: >>> type(sys.stdout) <type 'file'> python3: >>> type(sys.stdout) <class '_io.TextIOWrapper'> So in order to access binary stream, using sys.stdin.buffer in python3 Updates: #411 Change-Id: I1a633ccdddff5baf0cf05a8b493add39ddf75bd7 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* georep: python2 and python3 compat - bytes-strKotresh HR2018-10-021-3/+5
| | | | | | | | | 1. Fix fdopen used for pid file 2. Fix sha256 checksum calculation Updates: #411 Change-Id: Ic173d104a73822c29aca260ba6de872cd8d23f86 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* georep: python2 to python3 compatibility-mount writeKotresh HR2018-10-021-3/+9
| | | | | | | | | | python3 expects byte string for os.write. This works for both py2 and py3. Fixed the same for geo-rep mount testing code path. Updates: #411 Change-Id: I2dfedcb0869457707bcca4d2847ef0d52bff1987 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* MAINTAINERS: Add Sunny Kumar as a peer for snapshotsRaghavendra Manjunath2018-10-011-0/+1
| | | | | | Change-Id: I691a56125143fb60735073595d8c5e43273c9bc1 fixes: bz#1634102 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* cli: handle negative scenariosSanju Rakonde2018-10-014-17/+79
| | | | | | | | | | | When control flow reaches negative case code block, we added "goto out" statement without assigning ret to -1. This patch assigns return value to -1, before going to the lable "out". Change-Id: I6db651a3c9ca285ade9ee1ca23d0abe6b36fda3a updates: bz#1193929 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* index : fix coverity issues in index.cSunny Kumar2018-10-011-4/+13
| | | | | | | | This patch fixes CID 1356508 and 1356577. Change-Id: I09bc5398fbf6ee49fc066b42aaedf1170df39df8 updates: bz#789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* fuse: prevent error message "can't shift that many"Niels de Vos2018-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | On systems where /bin/sh is not Bash, running plain mount.glusterfs gives the unhelpful error "can't shift that many". The argument parsing can be a little improved. Adding a check for the number of arguments, minimal two (Gluster ip:/volume, and mountpoint), but possibly more (-o, -v etc.). With the additional check, running 'mount.glusterfs -h' now shows the following messags: Usage: /sbin/mount.glusterfs <server>:<volume/subdir> <mountpoint> -o<options> Options: man 8 mount.glusterfs To display the version number of the mount helper: /sbin/mount.glusterfs -V Change-Id: I50e3ade0c6217fab4155f35ad8cb35d99d52e133 Fixes: bz#1564890 Reported-by: Alexander Zimmermann <alexander.zimmermann96@gmail.com> Signed-off-by: Niels de Vos <ndevos@redhat.com>
* glusterd: fix coverity issuesSanju Rakonde2018-10-012-2/+3
| | | | | | | | | | | This patch fixes CID 1274175, 1175018. 1274175: Buffer size warning 1175018: Resource leak Change-Id: Id18960c249447b8dae35de3ad92bc570e62ddb09 updates: bz#789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* mdcache: Fix asan reported potential heap buffer overflowShyamsundarR2018-09-281-0/+1
| | | | | | | | | | | | | | The char pointer mdc_xattr_str in function mdc_xattr_list_populate is malloc'd and doing a strcat into a malloc'd region can overflow content allocated based on prior contents of the memory region. Added a NULL terimation to the malloc'd region to prevent the overflow, and treat it as an empty string. Change-Id: If0decab669551581230a8ede4c44c319ff04bac9 Updates: bz#1633930 Signed-off-by: ShyamsundarR <srangana@redhat.com>