linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the final tree (driver-core tree related)
@ 2012-05-08  8:02 Stephen Rothwell
  2012-05-08 11:04 ` Kay Sievers
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2012-05-08  8:02 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Kay Sievers, William Douglas

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

Hi all,

After merging the final tree, today's linux-next build (powerpc
allnoconfig) failed like this:

kernel/built-in.o: In function `devkmsg_read':
printk.c:(.text+0x27e8): undefined reference to `__udivdi3'

Caused by commit e11fea92e13f ("kmsg: export printk records to
the /dev/kmsg interface").  Most probably the "msg->ts_nsec / 1000" since
ts_nsec is a u64 and this is a 32 bit build ...

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failure after merge of the final tree (driver-core tree related)
  2012-05-08  8:02 linux-next: build failure after merge of the final tree (driver-core tree related) Stephen Rothwell
@ 2012-05-08 11:04 ` Kay Sievers
  0 siblings, 0 replies; 7+ messages in thread
From: Kay Sievers @ 2012-05-08 11:04 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Greg KH, linux-next, linux-kernel, William Douglas

On Tue, 2012-05-08 at 18:02 +1000, Stephen Rothwell wrote:
> After merging the final tree, today's linux-next build (powerpc
> allnoconfig) failed like this:
> 
> kernel/built-in.o: In function `devkmsg_read':
> printk.c:(.text+0x27e8): undefined reference to `__udivdi3'

Oops, let's use do_div().

Thanks,
Kay


From: Kay Sievers <kay@vrfy.org>
Subject: kmsg: use do_div() to divide 64bit integer

On Tue, May 8, 2012 at 10:02 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> kernel/built-in.o: In function `devkmsg_read':
> printk.c:(.text+0x27e8): undefined reference to `__udivdi3'
> Most probably the "msg->ts_nsec / 1000" since
> ts_nsec is a u64 and this is a 32 bit build ...

Signed-off-by: Kay Sievers <kay@vrfy.org>
---
 kernel/printk.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -407,6 +407,7 @@ static ssize_t devkmsg_read(struct file
 {
 	struct devkmsg_user *user = file->private_data;
 	struct log *msg;
+	u64 ts_usec;
 	size_t i;
 	size_t len;
 	ssize_t ret;
@@ -441,8 +442,10 @@ static ssize_t devkmsg_read(struct file
 	}
 
 	msg = log_from_idx(user->idx);
+	ts_usec = msg->ts_nsec;
+	do_div(ts_usec, 1000);
 	len = sprintf(user->buf, "%u,%llu,%llu;",
-		      msg->level, user->seq, msg->ts_nsec / 1000);
+		      msg->level, user->seq, ts_usec);
 
 	/* escape non-printable characters */
 	for (i = 0; i < msg->text_len; i++) {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failure after merge of the final tree (driver-core tree related)
  2011-05-09 23:18     ` Kay Sievers
@ 2011-05-10 19:38       ` Rafael J. Wysocki
  0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2011-05-10 19:38 UTC (permalink / raw)
  To: Kay Sievers
  Cc: Stephen Rothwell, Greg KH, linux-next, linux-kernel, Anton Guda

On Tuesday, May 10, 2011, Kay Sievers wrote:
> On Tue, 2011-05-10 at 00:19 +0200, Rafael J. Wysocki wrote:
> > On Monday, May 09, 2011, Kay Sievers wrote:
> > > On Mon, May 9, 2011 at 06:58, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > > After merging the final tree, today's linux-next build (powerpc allnoconfig)
> > > > failed like this:
> > > >
> > > > kernel/sys.c: In function 'kernel_restart_prepare':
> > > > kernel/sys.c:317: error: implicit declaration of function 'usermodehelper_disable'
> > > 
> > > Rafael, seems usermodehelper_disable() depends on CONFIG_PM_SLEEP.
> > > 
> > > Any reason for that conditional? Remove it now?
> > 
> > Aw, we have two conflicting changes.  Could you prepare a patch on top of:
> > 
> > git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6.git pm-next
> > 
> > removing that #ifdef?  That needs to be done in kmod.h too.
> 
> Like this?

Yes, thanks.

I applied it to suspend-2.6/linux-next.

Rafael

 
> From: Kay Sievers <kay.sievers@vrfy.org>
> Subject: kmod: always provide usermodehelper_disable()
> 
> We need to prevent kernel-forked processes during system poweroff.
> Such processes try to access the filesystem whose disks we are
> trying to shutdown at the same time. This causes delays and exceptions
> in the storage drivers.
> 
> A follow-up patch will add these calls and need usermodehelper_disable()
> also on systems without suspend support.
> 
> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
> ---
> 
> diff --git a/include/linux/kmod.h b/include/linux/kmod.h
> index 7f3dbcb..3102318 100644
> --- a/include/linux/kmod.h
> +++ b/include/linux/kmod.h
> @@ -111,12 +111,8 @@ call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait)
>  
>  extern void usermodehelper_init(void);
>  
> -#ifdef CONFIG_PM_SLEEP
>  extern int usermodehelper_disable(void);
>  extern void usermodehelper_enable(void);
>  extern bool usermodehelper_is_disabled(void);
> -#else
> -static inline bool usermodehelper_is_disabled(void) { return false; }
> -#endif
>  
>  #endif /* __LINUX_KMOD_H__ */
> diff --git a/kernel/kmod.c b/kernel/kmod.c
> index 9ab513b..5ae0ff3 100644
> --- a/kernel/kmod.c
> +++ b/kernel/kmod.c
> @@ -245,7 +245,6 @@ static void __call_usermodehelper(struct work_struct *work)
>  	}
>  }
>  
> -#ifdef CONFIG_PM_SLEEP
>  /*
>   * If set, call_usermodehelper_exec() will exit immediately returning -EBUSY
>   * (used for preventing user land processes from being created after the user
> @@ -321,12 +320,6 @@ static void helper_unlock(void)
>  	if (atomic_dec_and_test(&running_helpers))
>  		wake_up(&running_helpers_waitq);
>  }
> -#else /* CONFIG_PM_SLEEP */
> -#define usermodehelper_disabled	0
> -
> -static inline void helper_lock(void) {}
> -static inline void helper_unlock(void) {}
> -#endif /* CONFIG_PM_SLEEP */
>  
>  /**
>   * call_usermodehelper_setup - prepare to call a usermode helper
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failure after merge of the final tree (driver-core tree related)
  2011-05-09 22:19   ` Rafael J. Wysocki
@ 2011-05-09 23:18     ` Kay Sievers
  2011-05-10 19:38       ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Kay Sievers @ 2011-05-09 23:18 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Stephen Rothwell, Greg KH, linux-next, linux-kernel, Anton Guda

On Tue, 2011-05-10 at 00:19 +0200, Rafael J. Wysocki wrote:
> On Monday, May 09, 2011, Kay Sievers wrote:
> > On Mon, May 9, 2011 at 06:58, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > After merging the final tree, today's linux-next build (powerpc allnoconfig)
> > > failed like this:
> > >
> > > kernel/sys.c: In function 'kernel_restart_prepare':
> > > kernel/sys.c:317: error: implicit declaration of function 'usermodehelper_disable'
> > 
> > Rafael, seems usermodehelper_disable() depends on CONFIG_PM_SLEEP.
> > 
> > Any reason for that conditional? Remove it now?
> 
> Aw, we have two conflicting changes.  Could you prepare a patch on top of:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6.git pm-next
> 
> removing that #ifdef?  That needs to be done in kmod.h too.

Like this?

Thanks,
Kay


From: Kay Sievers <kay.sievers@vrfy.org>
Subject: kmod: always provide usermodehelper_disable()

We need to prevent kernel-forked processes during system poweroff.
Such processes try to access the filesystem whose disks we are
trying to shutdown at the same time. This causes delays and exceptions
in the storage drivers.

A follow-up patch will add these calls and need usermodehelper_disable()
also on systems without suspend support.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---

diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 7f3dbcb..3102318 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -111,12 +111,8 @@ call_usermodehelper(char *path, char **argv, char **envp, enum umh_wait wait)
 
 extern void usermodehelper_init(void);
 
-#ifdef CONFIG_PM_SLEEP
 extern int usermodehelper_disable(void);
 extern void usermodehelper_enable(void);
 extern bool usermodehelper_is_disabled(void);
-#else
-static inline bool usermodehelper_is_disabled(void) { return false; }
-#endif
 
 #endif /* __LINUX_KMOD_H__ */
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 9ab513b..5ae0ff3 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -245,7 +245,6 @@ static void __call_usermodehelper(struct work_struct *work)
 	}
 }
 
-#ifdef CONFIG_PM_SLEEP
 /*
  * If set, call_usermodehelper_exec() will exit immediately returning -EBUSY
  * (used for preventing user land processes from being created after the user
@@ -321,12 +320,6 @@ static void helper_unlock(void)
 	if (atomic_dec_and_test(&running_helpers))
 		wake_up(&running_helpers_waitq);
 }
-#else /* CONFIG_PM_SLEEP */
-#define usermodehelper_disabled	0
-
-static inline void helper_lock(void) {}
-static inline void helper_unlock(void) {}
-#endif /* CONFIG_PM_SLEEP */
 
 /**
  * call_usermodehelper_setup - prepare to call a usermode helper

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: linux-next: build failure after merge of the final tree (driver-core tree related)
  2011-05-09  9:34 ` Kay Sievers
@ 2011-05-09 22:19   ` Rafael J. Wysocki
  2011-05-09 23:18     ` Kay Sievers
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2011-05-09 22:19 UTC (permalink / raw)
  To: Kay Sievers
  Cc: Stephen Rothwell, Greg KH, linux-next, linux-kernel, Anton Guda

On Monday, May 09, 2011, Kay Sievers wrote:
> On Mon, May 9, 2011 at 06:58, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > After merging the final tree, today's linux-next build (powerpc allnoconfig)
> > failed like this:
> >
> > kernel/sys.c: In function 'kernel_restart_prepare':
> > kernel/sys.c:317: error: implicit declaration of function 'usermodehelper_disable'
> 
> Rafael, seems usermodehelper_disable() depends on CONFIG_PM_SLEEP.
> 
> Any reason for that conditional? Remove it now?

Aw, we have two conflicting changes.  Could you prepare a patch on top of:

git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6.git pm-next

removing that #ifdef?  That needs to be done in kmod.h too.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: build failure after merge of the final tree (driver-core tree related)
  2011-05-09  4:58 Stephen Rothwell
@ 2011-05-09  9:34 ` Kay Sievers
  2011-05-09 22:19   ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Kay Sievers @ 2011-05-09  9:34 UTC (permalink / raw)
  To: Stephen Rothwell, Rafael J. Wysocki
  Cc: Greg KH, linux-next, linux-kernel, Anton Guda

On Mon, May 9, 2011 at 06:58, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> After merging the final tree, today's linux-next build (powerpc allnoconfig)
> failed like this:
>
> kernel/sys.c: In function 'kernel_restart_prepare':
> kernel/sys.c:317: error: implicit declaration of function 'usermodehelper_disable'

Rafael, seems usermodehelper_disable() depends on CONFIG_PM_SLEEP.

Any reason for that conditional? Remove it now?

Thanks,
Kay

^ permalink raw reply	[flat|nested] 7+ messages in thread

* linux-next: build failure after merge of the final tree (driver-core tree related)
@ 2011-05-09  4:58 Stephen Rothwell
  2011-05-09  9:34 ` Kay Sievers
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2011-05-09  4:58 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-next, linux-kernel, Kay Sievers, Anton Guda

[-- Attachment #1: Type: text/plain, Size: 533 bytes --]

Hi all,

After merging the final tree, today's linux-next build (powerpc allnoconfig)
failed like this:

kernel/sys.c: In function 'kernel_restart_prepare':
kernel/sys.c:317: error: implicit declaration of function 'usermodehelper_disable'

Caused by commit b50fa7c8077c ("reboot: disable usermodehelper to prevent
fs access").  See Rule 1 in Documentation/SubmitChecklist.

I have reverted that commit for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-05-08 11:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-08  8:02 linux-next: build failure after merge of the final tree (driver-core tree related) Stephen Rothwell
2012-05-08 11:04 ` Kay Sievers
  -- strict thread matches above, loose matches on Subject: below --
2011-05-09  4:58 Stephen Rothwell
2011-05-09  9:34 ` Kay Sievers
2011-05-09 22:19   ` Rafael J. Wysocki
2011-05-09 23:18     ` Kay Sievers
2011-05-10 19:38       ` Rafael J. Wysocki

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 NNTP newsgroup(s).