Bug 437137 - Calling dlm_ls_lockx() wth LKF_VALBLK set and NULL sb_lvbptr seg faults libdlm.
Calling dlm_ls_lockx() wth LKF_VALBLK set and NULL sb_lvbptr seg faults libdlm.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: Christine Caulfield
GFS Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-12 12:05 EDT by Dean Jansa
Modified: 2009-04-16 18:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:52:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dean Jansa 2008-03-12 12:05:30 EDT
Description of problem:

I called dlm_ls_lock() with a the LKF_VALBLK flag and had initialized the lksb.sb_lvbptr to NULL.
This resulted in a SIGSEGV from libdlm:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912496179680 (LWP 16933)]
0x000000343ca0317b in unlock_resource () from /usr/lib64/libdlm.so.2
(gdb) bt
#0  0x000000343ca0317b in unlock_resource () from /usr/lib64/libdlm.so.2

(gdb) up
#1  0x00002aaaae09d854 in lockObjCmd (cdata=0x1cb5cd40, interp=0x1cb22100, 
    objc=7, objv=0x1cb37a58) at tcl_dlm.c:568
568		if (dlm_ls_lockx(dlmPtr->lsPtr->lsh, mode, lkPtr->lksb, flags, resourceStr,

(gdb) p lkPtr->lksb
$1 = (struct dlm_lksb *) 0x1cb925b0

(gdb) p (*lkPtr->lksb)
$2 = {sb_status = 0, sb_lkid = 0, sb_flags = 0 '\0', sb_lvbptr = 0x0}

Version-Release number of selected component (if applicable):
cman-devel-2.0.80-1.el5
cman-2.0.80-1.el5

How reproducible:

Every time

Steps to Reproduce:

Make a call to dlm_ls_lockx() with LKF_VALBLK flag and a NULL sb_lvbptr.

Expected results:

Error from libdlm.
Comment 1 Dean Jansa 2008-03-12 12:07:52 EDT
Forgot to include the flags in the gdb output:

(gdb) up
#1  0x00002aaaae09d854 in lockObjCmd (cdata=0x1cb5cd40, interp=0x1cb22100, 
    objc=7, objv=0x1cb37a58) at tcl_dlm.c:568
568		if (dlm_ls_lockx(dlmPtr->lsPtr->lsh, mode, lkPtr->lksb, flags, resourceStr,
(gdb) p flags
$3 = 8

Comment 2 Christine Caulfield 2008-03-13 12:45:50 EDT
The branch, master has been updated
       via  5c00e231b21d2b8e0be1b4dd028122313e603597 (commit)
      from  674aec455c8f4506c390532276d1392aa017f1b6 (commit)

The branch, STABLE2 has been updated
       via  31b6d55cadb4aa87a76d907dc2fa7696fda89379 (commit)
      from  088cad7ce9f46b501fcfd8475c71e0909a86d895 (commit)
Comment 3 David Teigland 2008-03-25 12:19:39 EDT
commit in RHEL5 branch 0484ef93e8d09313f8f110d23c2a6a6b4aca2f60
Comment 7 errata-xmlrpc 2009-01-20 16:52:21 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0189.html

Note You need to log in before you can comment on or make changes to this bug.