public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 ./WHATS_NEW ./WHATS_NEW_DM lib/device/dev ... Date: Sun, 04 Mar 2012 17:41:00 -0000 [thread overview] Message-ID: <20120304174059.28091.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2012-03-04 17:40:59 Modified files: . : WHATS_NEW WHATS_NEW_DM lib/device : dev-cache.c Log message: Validate udev structures Avoid using NULL pointers from udev. It seems like some older versions of udev were improperly returning NULL in some case, so do not silently break here, and give at least a warning to the user. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2340&r2=1.2341 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.585&r2=1.586 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/device/dev-cache.c.diff?cvsroot=lvm2&r1=1.72&r2=1.73 --- LVM2/WHATS_NEW 2012/03/04 17:36:23 1.2340 +++ LVM2/WHATS_NEW 2012/03/04 17:40:59 1.2341 @@ -1,6 +1,6 @@ Version 2.02.95 - ================================ - Deactivation of failed thin check on thin pool returns success. + Validate udev structures in _insert_udev_dir(). Scan all devices for lvmetad if 'pvscan --cache' used without device list. Populate lvmcache from lvmetad before displaying PVs in pvscan. (2.02.94) Suppress incorrect -n pvscan warning now always displayed. (2.02.94) --- LVM2/WHATS_NEW_DM 2012/03/03 02:08:37 1.585 +++ LVM2/WHATS_NEW_DM 2012/03/04 17:40:59 1.586 @@ -1,5 +1,6 @@ Version 1.02.74 - ================================ + Deactivation of failed thin check on thin pool returns success. Version 1.02.73 - 3rd March 2012 ================================ --- LVM2/lib/device/dev-cache.c 2012/02/23 13:11:09 1.72 +++ LVM2/lib/device/dev-cache.c 2012/03/04 17:40:59 1.73 @@ -509,14 +509,21 @@ goto bad; udev_list_entry_foreach(device_entry, udev_enumerate_get_list_entry(udev_enum)) { - device = udev_device_new_from_syspath(udev, udev_list_entry_get_name(device_entry)); + if (!(device = udev_device_new_from_syspath(udev, udev_list_entry_get_name(device_entry)))) { + log_warn("Udev returns NULL device."); + continue; + } - node_name = udev_device_get_devnode(device); - r &= _insert(node_name, 0, 0); + if (!(node_name = udev_device_get_devnode(device))) + log_warn("Udev returns NULL devnode."); + else + r &= _insert(node_name, 0, 0); udev_list_entry_foreach(symlink_entry, udev_device_get_devlinks_list_entry(device)) { - symlink_name = udev_list_entry_get_name(symlink_entry); - r &= _insert(symlink_name, 0, 0); + if (!(symlink_name = udev_list_entry_get_name(symlink_entry))) + log_warn("Udev returns NULL name."); + else + r &= _insert(symlink_name, 0, 0); } udev_device_unref(device);
next reply other threads:[~2012-03-04 17:41 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-03-04 17:41 zkabelac [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-02-08 11:05 zkabelac
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20120304174059.28091.qmail@sourceware.org \ --to=zkabelac@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).