[systemd-devel] [PATCH 1/2] path-util: set pointer to null after calling free()

2012-12-13 Thread Michal Sekletar
In cases where path_strv_canonicalize() returns NULL, strv_free() is
called afterwards and it will call free() on pointers which were freed
already in path_strv_canonicalize()
---
 src/shared/path-util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index 70c8a8a..dd12d3d 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -181,6 +181,7 @@ char **path_strv_canonicalize(char **l) {
 
 t = path_make_absolute_cwd(*s);
 free(*s);
+*s = NULL;
 
 if (!t) {
 enomem = true;
-- 
1.7.11.7

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH 2/2] socket-util: added check of return value

2012-12-13 Thread Michal Sekletar
---
 src/shared/socket-util.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c
index 49ea758..42ea545 100644
--- a/src/shared/socket-util.c
+++ b/src/shared/socket-util.c
@@ -369,6 +369,8 @@ int socket_address_print(const SocketAddress *a, char **p) {
 if (r  0)
 return r;
 r = asprintf(p, %s %u, sfamily, a-sockaddr.nl.nl_groups);
+if (r  0)
+return -ENOMEM;
 
 return 0;
 }
-- 
1.7.11.7

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] udev device mapper rules for early boot?

2012-12-13 Thread Andrey Borzenkov
В Mon, 10 Dec 2012 11:03:54 -0800
Nikolaus Rath nikol...@rath.org пишет:

 Hello,
 
 I have created a udev rule to set the owner of a specific block device:
 
 SUBSYSTEM==block,
 ENV{DM_UUID}==LVM-yYuoI8k05GWxZnz9BeEIwPUGGeojzF3dZZmXTYRqC051Tllj76OHdDlzYhKZUu7u,
 OWNER=1000
 
 If I disable and re-enable this logical volume with lvchange, it gets
 created with the correct owner.
 
 However, when I boot the computer, the device is always owned by
 root:disk instead.
 
 I checked my initrd, and the rule is present in lib/udev/rules.d as
 99-udev-custom.rules.
 
 Does anyone have a suggestion of how I could debug this further? Why is
 my rule ignored when the volume comes up the first time?
 

The simplest reason would be that DM_UUID is not defined at all. It is
set by another udev rule and may be this rule is missing, or
prerequisites for this rule are missing ... if your initramfs supports
launching shell, you could udev database.

Or this device does not appear in initramfs and is setup later.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] After firmare

2012-12-13 Thread Andrey Borzenkov
В Wed, 12 Dec 2012 15:57:45 -0800
John Tobias john.tobias...@gmail.com пишет:

 ExecStart=/usr/sbin/wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
 
 One of the problem was the systemd called the said script before the
 kernel loads the firmware(/lib/firmware/TIInit_7.2.31.bts). I would
 like to know if there's a way to determine if the firmware is already
 loaded before the systemd execute the said service?.
 

Normally interface should appear only after firmware is loaded. So
making your script depend on wlan0.device should do it.

It may be a bit tricky to find correct dependency though. E.g. I have

Id=sys-devices-pci:00-:00:1c.1-:0c:00.0-net-wlan0.device
Names=sys-devices-pci:00-:00:1c.1-:0c:00.0-net-wlan0.device 
sys-subsystem-net-devices-wlan0.device
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] After firmare

2012-12-13 Thread John Tobias
I renamed the /lib/firmware to /lib/firmware.old and reboot my system.
After rebooting it, I was getting an error (pls see below) that the
kernel did not find the firmware.
wl1271: ERROR could not get nvs file: -2
wl1271: loaded
wl1271: initialized

Then, if I do ifconfig -a, the wlan0 interface is showing up.



On Thu, Dec 13, 2012 at 8:39 AM, Andrey Borzenkov arvidj...@gmail.com wrote:
 В Wed, 12 Dec 2012 15:57:45 -0800
 John Tobias john.tobias...@gmail.com пишет:

 ExecStart=/usr/sbin/wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf

 One of the problem was the systemd called the said script before the
 kernel loads the firmware(/lib/firmware/TIInit_7.2.31.bts). I would
 like to know if there's a way to determine if the firmware is already
 loaded before the systemd execute the said service?.


 Normally interface should appear only after firmware is loaded. So
 making your script depend on wlan0.device should do it.

 It may be a bit tricky to find correct dependency though. E.g. I have

 Id=sys-devices-pci:00-:00:1c.1-:0c:00.0-net-wlan0.device
 Names=sys-devices-pci:00-:00:1c.1-:0c:00.0-net-wlan0.device 
 sys-subsystem-net-devices-wlan0.device
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] udev device mapper rules for early boot?

2012-12-13 Thread Nikolaus Rath
On 12/13/2012 08:35 AM, Andrey Borzenkov wrote:
 В Mon, 10 Dec 2012 11:03:54 -0800
 Nikolaus Rath nikol...@rath.org пишет:

 Hello,

 I have created a udev rule to set the owner of a specific block device:

 SUBSYSTEM==block,
 ENV{DM_UUID}==LVM-yYuoI8k05GWxZnz9BeEIwPUGGeojzF3dZZmXTYRqC051Tllj76OHdDlzYhKZUu7u,
 OWNER=1000

 If I disable and re-enable this logical volume with lvchange, it gets
 created with the correct owner.

 However, when I boot the computer, the device is always owned by
 root:disk instead.

 I checked my initrd, and the rule is present in lib/udev/rules.d as
 99-udev-custom.rules.

 Does anyone have a suggestion of how I could debug this further? Why is
 my rule ignored when the volume comes up the first time?

 The simplest reason would be that DM_UUID is not defined at all. It is
 set by another udev rule and may be this rule is missing, or
 prerequisites for this rule are missing ... if your initramfs supports
 launching shell, you could udev database.
Yes, I think that's the problem. Thanks! If I understand the rule files
correctly, the DM_UUID is initialized by one of the /lib/udev/*-export
programs, which are not present in my initrd.

Now, I could add the missing rule and program to the initrd, but I feel
this is really opening a can of worms, since I don't really *need* to
change the device ownership that early.

Is there some way to have udev re-run this rule once it has been started
properly by the real init? I guess turning the lv off and on again in
some init script would do the trick, but that doesn't seem much cleaner
either...


Thanks,
Nikolaus


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] udev device mapper rules for early boot?

2012-12-13 Thread Andrey Borzenkov
В Thu, 13 Dec 2012 15:35:11 -0800
Nikolaus Rath nikol...@rath.org пишет:

 On 12/13/2012 08:35 AM, Andrey Borzenkov wrote:
 
 Now, I could add the missing rule and program to the initrd, but I feel
 this is really opening a can of worms, since I don't really *need* to
 change the device ownership that early.
 
 Is there some way to have udev re-run this rule once it has been started
 properly by the real init? I guess turning the lv off and on again in
 some init script would do the trick, but that doesn't seem much cleaner
 either...
 

This would be just another can of worms, really. Cannot you delay
starting your volume until normal system boot phase? The only devices
that are really required to be present in initrd are those for root
(and may be for /usr if it is separate). Everything else can be started
later.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] After firmare

2012-12-13 Thread Andrey Borzenkov
В Thu, 13 Dec 2012 10:43:56 -0800
John Tobias john.tobias...@gmail.com пишет:

 I renamed the /lib/firmware to /lib/firmware.old and reboot my system.
 After rebooting it, I was getting an error (pls see below) that the
 kernel did not find the firmware.
 wl1271: ERROR could not get nvs file: -2
 wl1271: loaded
 wl1271: initialized
 
 Then, if I do ifconfig -a, the wlan0 interface is showing up.
 

Yes, but it is initialized only after firmware is loaded.

 
 
 On Thu, Dec 13, 2012 at 8:39 AM, Andrey Borzenkov arvidj...@gmail.com wrote:
  В Wed, 12 Dec 2012 15:57:45 -0800
  John Tobias john.tobias...@gmail.com пишет:
 
  ExecStart=/usr/sbin/wpa_supplicant -Dwext -iwlan0 
  -c/etc/wpa_supplicant.conf
 
  One of the problem was the systemd called the said script before the
  kernel loads the firmware(/lib/firmware/TIInit_7.2.31.bts). I would
  like to know if there's a way to determine if the firmware is already
  loaded before the systemd execute the said service?.
 
 
  Normally interface should appear only after firmware is loaded. So
  making your script depend on wlan0.device should do it.
 
  It may be a bit tricky to find correct dependency though. E.g. I have
 
  Id=sys-devices-pci:00-:00:1c.1-:0c:00.0-net-wlan0.device
  Names=sys-devices-pci:00-:00:1c.1-:0c:00.0-net-wlan0.device 
  sys-subsystem-net-devices-wlan0.device

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] After firmare

2012-12-13 Thread John Tobias
Could you give me a sample .service in order to solve my problem?.

Regards,

john

On Thu, Dec 13, 2012 at 7:04 PM, Andrey Borzenkov arvidj...@gmail.com wrote:
 В Thu, 13 Dec 2012 10:43:56 -0800
 John Tobias john.tobias...@gmail.com пишет:

 I renamed the /lib/firmware to /lib/firmware.old and reboot my system.
 After rebooting it, I was getting an error (pls see below) that the
 kernel did not find the firmware.
 wl1271: ERROR could not get nvs file: -2
 wl1271: loaded
 wl1271: initialized

 Then, if I do ifconfig -a, the wlan0 interface is showing up.


 Yes, but it is initialized only after firmware is loaded.



 On Thu, Dec 13, 2012 at 8:39 AM, Andrey Borzenkov arvidj...@gmail.com 
 wrote:
  В Wed, 12 Dec 2012 15:57:45 -0800
  John Tobias john.tobias...@gmail.com пишет:
 
  ExecStart=/usr/sbin/wpa_supplicant -Dwext -iwlan0 
  -c/etc/wpa_supplicant.conf
 
  One of the problem was the systemd called the said script before the
  kernel loads the firmware(/lib/firmware/TIInit_7.2.31.bts). I would
  like to know if there's a way to determine if the firmware is already
  loaded before the systemd execute the said service?.
 
 
  Normally interface should appear only after firmware is loaded. So
  making your script depend on wlan0.device should do it.
 
  It may be a bit tricky to find correct dependency though. E.g. I have
 
  Id=sys-devices-pci:00-:00:1c.1-:0c:00.0-net-wlan0.device
  Names=sys-devices-pci:00-:00:1c.1-:0c:00.0-net-wlan0.device 
  sys-subsystem-net-devices-wlan0.device

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] vmware-datarecovery+systemd.automount+EVC = crash

2012-12-13 Thread Reindl Harald
i spent from 6 PM until now to find out why after hardware
upgrade Fedora 17 VM's are crashing on vSpere5 cluster while
make snapshot / suspend filesystem for VMware-Datarecovery

* EVC Intel® Westmere Generation (Xeon® 32nm Core™ i7)
* UUID=  /boot  ext4  defaults,comment=systemd.automount,noauto  0 1
* open-vm-tools-9.2.2.893683
* vSphere5 build 821926
* Fedora 17 x86_64 with any 3.6.8 to 3.6.10 Kernel (i guess others too)
* /boot was a ext2 without journal mounted as ext4, other FS native ext4

with EVC Xeon 45 nm Core2 on the same host no problem
without systemd.automount also no problem, even with 32nm i7 EVC
with manual snapshots no problem in any case

this happens really only in this combination on both hosts
one with dual socket E5-2640, one with dual socket E5640

below the stacktrace, may somebody have fun to debug this, i am done
after a whole night finding the workaround not use systemd.automount
in this environment killing the joy of new hardware..

[ cut here ]
WARNING: at fs/ext4/super.c:339 ext4_journal_start_sb+0x11e/0x130()
Hardware name: VMware Virtual Platform
Modules linked in: binfmt_misc cls_u32 sch_htb xt_hl xt_LOG xt_limit xt_recent 
nf_conntrack_ipv4 nf_defrag_ipv4
xt_state nf_conntrack xt_iprange xt_multiport vmw_balloon crc32c_intel 
ghash_clmulni_intel vmxnet3 vmw_pvscsi
Pid: 606, comm: master Not tainted 3.6.10-2.fc17.x86_64 #1
Call Trace:
 [8105c8ef] warn_slowpath_common+0x7f/0xc0
 [81216296] ? ext4_dirty_inode+0x26/0x60
 [8105c94a] warn_slowpath_null+0x1a/0x20
 [8123152e] ext4_journal_start_sb+0x11e/0x130
 [81216296] ext4_dirty_inode+0x26/0x60
 [811b85df] __mark_inode_dirty+0x3f/0x200
 [811a97a1] update_time+0x81/0xc0
 [811ade40] ? __mnt_want_write+0x40/0x60
 [811a9878] file_update_time+0x98/0xf0
 [811997b0] pipe_write+0x420/0x540
 [8118f9e7] do_sync_write+0xa7/0xe0
 [8119026c] vfs_write+0xac/0x180
 [8119059a] sys_write+0x4a/0x90
 [816270e9] system_call_fastpath+0x16/0x1b
---[ end trace 4af44fba571309d1 ]---
[ cut here ]
WARNING: at fs/ext4/super.c:339 ext4_journal_start_sb+0x11e/0x130()
Hardware name: VMware Virtual Platform
Modules linked in: binfmt_misc cls_u32 sch_htb xt_hl xt_LOG xt_limit xt_recent 
nf_conntrack_ipv4 nf_defrag_ipv4
xt_state nf_conntrack xt_iprange xt_multiport vmw_balloon crc32c_intel 
ghash_clmulni_intel vmxnet3 vmw_pvscsi
Pid: 606, comm: master Tainted: GW3.6.10-2.fc17.x86_64 #1
Call Trace:
 [8105c8ef] warn_slowpath_common+0x7f/0xc0
 [81216296] ? ext4_dirty_inode+0x26/0x60
 [8105c94a] warn_slowpath_null+0x1a/0x20
 [8123152e] ext4_journal_start_sb+0x11e/0x130
 [81216296] ext4_dirty_inode+0x26/0x60
 [811b85df] __mark_inode_dirty+0x3f/0x200
 [811a97a1] update_time+0x81/0xc0
 [811ade40] ? __mnt_want_write+0x40/0x60
 [811a9878] file_update_time+0x98/0xf0
 [811997b0] pipe_write+0x420/0x540
 [8118f9e7] do_sync_write+0xa7/0xe0
 [8119026c] vfs_write+0xac/0x180
 [8119059a] sys_write+0x4a/0x90
 [816270e9] system_call_fastpath+0x16/0x1b
---[ end trace 4af44fba571309d2 ]--



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel