[GIT PATCH] driver core patches for your 2.6-git tree - Kernel

This is a discussion on [GIT PATCH] driver core patches for your 2.6-git tree - Kernel ; On Fri, Oct 17, 2008 at 11:31:51AM -0400, Jason Baron wrote: > > One concern, raised in the other thread was that subsystems might want > to use their own defined tags, as opposed to KBUILD_MODNAME, which is > used ...

+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 41 to 42 of 42

Thread: [GIT PATCH] driver core patches for your 2.6-git tree

  1. Re: [GIT PATCH] driver core patches for your 2.6-git tree

    On Fri, Oct 17, 2008 at 11:31:51AM -0400, Jason Baron wrote:
    >
    > One concern, raised in the other thread was that subsystems might want
    > to use their own defined tags, as opposed to KBUILD_MODNAME, which is
    > used by default to group together debugging control. Layering this tag
    > ability on top of this patchset is not hard, and I already have patches
    > which begin to do that.


    That sounds like a useful thing to have.

    > Also, this patch allows passing one command line argument to enable
    > all debugging which can later be turn on/off as desired. This patch
    > already stands on its own in enabling all pr_debug and dev_dbg calls
    > to be dynamically enabled.


    I tried turning everything on once. The output was almost unusable, you
    pretty much always want to be able to pick and choose what you want
    enabled otherwise you drown in irrelevant data

    thanks,

    greg k-h
    --
    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/

  2. Re: [PATCH 02/46] sysfs: crash debugging

    On Thu, Oct 16, 2008 at 01:40:56PM -0400, Mathieu Desnoyers wrote:
    > * Greg Kroah-Hartman (gregkh@suse.de) wrote:
    > > From: Andrew Morton
    > >
    > > Print the name of the last-accessed sysfs file when we oops, to help track
    > > down oopses which occur in sysfs store/read handlers. Because these oopses
    > > tend to not leave any trace of the offending code in the stack traces.
    > >
    > > Cc: Kay Sievers
    > > Cc: Mathieu Desnoyers
    > > Signed-off-by: Andrew Morton
    > > Signed-off-by: Greg Kroah-Hartman
    > > ---
    > > arch/x86/kernel/dumpstack_32.c | 2 ++
    > > arch/x86/kernel/dumpstack_64.c | 2 ++
    > > fs/sysfs/file.c | 13 +++++++++++++
    > > include/linux/sysfs.h | 6 ++++++
    > > 4 files changed, 23 insertions(+), 0 deletions(-)
    > >
    > > diff --git a/arch/x86/kernel/dumpstack_32.c b/arch/x86/kernel/dumpstack_32.c
    > > index 201ee35..1a78180 100644
    > > --- a/arch/x86/kernel/dumpstack_32.c
    > > +++ b/arch/x86/kernel/dumpstack_32.c
    > > @@ -13,6 +13,7 @@
    > > #include
    > > #include
    > > #include
    > > +#include
    > >
    > > #include
    > >
    > > @@ -343,6 +344,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
    > > printk("DEBUG_PAGEALLOC");
    > > #endif
    > > printk("\n");
    > > + sysfs_printk_last_file();
    > > if (notify_die(DIE_OOPS, str, regs, err,
    > > current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
    > > return 1;
    > > diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
    > > index 086cc81..96a5db7 100644
    > > --- a/arch/x86/kernel/dumpstack_64.c
    > > +++ b/arch/x86/kernel/dumpstack_64.c
    > > @@ -13,6 +13,7 @@
    > > #include
    > > #include
    > > #include
    > > +#include
    > >
    > > #include
    > >
    > > @@ -489,6 +490,7 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err)
    > > printk("DEBUG_PAGEALLOC");
    > > #endif
    > > printk("\n");
    > > + sysfs_printk_last_file();
    > > if (notify_die(DIE_OOPS, str, regs, err,
    > > current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
    > > return 1;
    > > diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
    > > index c9e4e50..ce8339c 100644
    > > --- a/fs/sysfs/file.c
    > > +++ b/fs/sysfs/file.c
    > > @@ -19,10 +19,18 @@
    > > #include
    > > #include
    > > #include
    > > +#include
    > > #include
    > >
    > > #include "sysfs.h"
    > >
    > > +/* used in crash dumps to help with debugging */
    > > +static char last_sysfs_file[PATH_MAX];
    > > +void sysfs_printk_last_file(void)
    > > +{
    > > + printk(KERN_EMERG "last sysfs file: %s\n", last_sysfs_file);
    > > +}
    > > +
    > > /*
    > > * There's one sysfs_buffer for each open file and one
    > > * sysfs_open_dirent for each sysfs_dirent with one or more open
    > > @@ -328,6 +336,11 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
    > > struct sysfs_buffer *buffer;
    > > struct sysfs_ops *ops;
    > > int error = -EACCES;
    > > + char *p;
    > > +
    > > + p = d_path(&file->f_path, last_sysfs_file, sizeof(last_sysfs_file));
    > > + if (p)

    >
    > if (!IS_ERR(p)) ?
    >
    > > + memmove(last_sysfs_file, p, strlen(p) + 1);
    > >

    >
    > Given we do a strlen() here anyway, shouldn't we just use strcpy ?


    Probably would be good.

    Care to send a patch for both of these?

    thanks,

    greg k-h
    --
    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/

+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3