lkml.org 
[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sysfs regression: wrong link counts
On Mon, Jan 30, 2012 at 10:56:26PM +0100, Jiri Slaby wrote:
> Hi,
>
> I cannot boot properly with this commit:
> commit 524b6c5b39b931311dfe5a2f5abae2f5c9731676
> Author: Eric W. Biederman <ebiederm@xmission.com>
> Date: Sun Dec 18 20:09:31 2011 -0800
>
> sysfs: Kill nlink counting.
>
>
> 1) network systemd rule doesn't start network
> 2) sensors complain:
> sensors_init: Kernel interface error

Odd.

What in systemd is causing a reliance on this?

> ad 2) look at what it does:
> /* returns !0 if sysfs filesystem was found, 0 otherwise */
> int sensors_init_sysfs(void)
> {
> struct stat statbuf;
>
> snprintf(sensors_sysfs_mount, NAME_MAX, "%s", "/sys");
> if (stat(sensors_sysfs_mount, &statbuf) < 0
> || statbuf.st_nlink <= 2) /* Empty directory */
> return 0;
>
> return 1;
> }

Ah, a hack to see if the directory is empty.

Isn't there some other "proper" way of doing this in userspace, or is
this really the correct way?

> So this looks like it became a part of ABI we cannot break...
>
> A revert of this commit on the top of today's -next fixes the problem.

Ick.

Eric, care to fix this up, or do you want me to revert it?

thanks,

greg k-h


\
 
 \ /
  Last update: 2012-01-30 23:09    [W:0.096 / U:5.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site