Re: [PATCH] depmod: warn on invalid devname specification

2013-09-09 Thread Lucas De Marchi
quot;lacks major and minor information. " > + "Ignoring.\n", mod->modname, devname); > } > } > > -- Patch has been applied. Thanks. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] depmod: warn on invalid devname specification

2013-09-09 Thread Lucas De Marchi
Cc: Lucas De Marchi lucas.demar...@profusion.mobi --- tools/depmod.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/depmod.c b/tools/depmod.c index 985cf3a..5855b2a 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -2120,11 +2120,18 @@ static int

Re: Potential use-after-free in ____call_usermodehelper

2013-09-03 Thread Lucas De Marchi
what you were missing. > > >>> >> 2. When wait=UMH_NO_WAIT, __call_usermodehelper() starts child thread >>> >> and instantly frees subprocess_info. The child thread reads >>> >> subprocess_info. Looks like another use-after-free. >> >> Same, ker

Re: Potential use-after-free in ____call_usermodehelper

2013-09-03 Thread Lucas De Marchi
the child thread that will do exec. I don't know whether it's a problem with the code or with the name. Same. Agreed Lucas De Marchi -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

[ANNOUNCE] kmod 15

2013-08-22 Thread Lucas De Marchi
to the library is kind of an workaround for people doing initrd needing their tools to be statically linked. As usual, shortlog is below. Cheers Lucas De Marchi --- Jan Engelhardt (1): depmod: add missing "else" clause Lucas De Marchi (15): tools: Do not link dynamically wi

[ANNOUNCE] kmod 15

2013-08-22 Thread Lucas De Marchi
to the library is kind of an workaround for people doing initrd needing their tools to be statically linked. As usual, shortlog is below. Cheers Lucas De Marchi --- Jan Engelhardt (1): depmod: add missing else clause Lucas De Marchi (15): tools: Do not link dynamically with libkmod Use

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
On Tue, Aug 13, 2013 at 9:17 PM, Steven Rostedt wrote: > On Tue, 13 Aug 2013 20:34:58 -0300 > Lucas De Marchi wrote: > > >> so in kcmdline we would have modulename.param instead of modulename.param=1? >> >> I guess we need to update kmod then, because currently we

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
On Tue, Aug 13, 2013 at 10:00 PM, Lucas De Marchi wrote: > On Tue, Aug 13, 2013 at 9:17 PM, Steven Rostedt wrote: >> On Tue, 13 Aug 2013 20:34:58 -0300 >> Lucas De Marchi wrote: >> >> >>> so in kcmdline we would have modulename.param instead of modulen

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
guess we need to update kmod then, because currently we ignore and treat this case as a wrong token. From a quick look, allowing it in kmod would be as simple as removing a condition check. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
as a wrong token. From a quick look, allowing it in kmod would be as simple as removing a condition check. Lucas De Marchi -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
On Tue, Aug 13, 2013 at 10:00 PM, Lucas De Marchi lucas.de.mar...@gmail.com wrote: On Tue, Aug 13, 2013 at 9:17 PM, Steven Rostedt rost...@goodmis.org wrote: On Tue, 13 Aug 2013 20:34:58 -0300 Lucas De Marchi lucas.de.mar...@gmail.com wrote: so in kcmdline we would have modulename.param

Re: [PATCH 0/3] module: Allow parameters without arguments

2013-08-13 Thread Lucas De Marchi
On Tue, Aug 13, 2013 at 9:17 PM, Steven Rostedt rost...@goodmis.org wrote: On Tue, 13 Aug 2013 20:34:58 -0300 Lucas De Marchi lucas.de.mar...@gmail.com wrote: so in kcmdline we would have modulename.param instead of modulename.param=1? I guess we need to update kmod then, because currently

Re: [PATCH] depmod: add missing "else" clause

2013-08-09 Thread Lucas De Marchi
ERR("unsupported file mode %s: %#x\n", path, st.st_mode); > return -EINVAL; > } > -- Applied, thanks. Please make sure to CC linux-modu...@vger.kernel.org Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] depmod: add missing else clause

2013-08-09 Thread Lucas De Marchi
Lucas De Marchi -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [alsa-devel] [BUG] 3.10.[01] modprobe snd-... hangs

2013-07-16 Thread Lucas De Marchi
e number of processes to get a full > trace; see attached file. > > Please note that in this case the proprietary "nvidia" module was loaded, > since I currently onyl have remove access to the machine. > The original trace from yesterday happend without the nvidia module

Re: [BUG] 3.10.[01] modprobe snd-... hangs

2013-07-16 Thread Lucas De Marchi
for the past releases. Any chance a bad entry in your .conf was added too? You may want to paste the output of modprobe -c, at least until "# End of configuration files. Dumping indexes now:" > > On my systems, that's snd-seq-dummy, which depends on snd_seq. Which, > in fact, is al

Re: [BUG] 3.10.[01] modprobe snd-... hangs

2013-07-16 Thread Lucas De Marchi
files. Dumping indexes now: On my systems, that's snd-seq-dummy, which depends on snd_seq. Which, in fact, is already loaded. Lucas, any clues? I don't think I could help, but we need more data, like the ones above. Lucas De Marchi -- To unsubscribe from this list: send the line unsubscribe

Re: [alsa-devel] [BUG] 3.10.[01] modprobe snd-... hangs

2013-07-16 Thread Lucas De Marchi
file. Please note that in this case the proprietary nvidia module was loaded, since I currently onyl have remove access to the machine. The original trace from yesterday happend without the nvidia module ever being loaded. Am Dienstag 16 Juli 2013, 08:42:35 schrieb Lucas De Marchi: On Tue

Re: [RFC PATCH] Allow optional module parameters

2013-07-03 Thread Lucas De Marchi
at boot. It may be worth adding a more >> intentional way to do that. > > Hm, right, there seems to be no clean way to achieve this via a > commandline argument. Maybe define a magic module option to tell the > module loader not to load a module? modprobe.blacklist=modname1,mod

[ANNOUNCE] kmod 14

2013-07-03 Thread Lucas De Marchi
to everyone involved in this release. Shortlog is below. Cheers Lucas De Marchi --- Chengwei Yang (2): Several minor fixes for documentation Add document for exported enums Jan Luebbe (1): libkmod: Avoid calling syscall() with -1 Johannes Berg (1): modprobe: don't check

[ANNOUNCE] kmod 14

2013-07-03 Thread Lucas De Marchi
in this release. Shortlog is below. Cheers Lucas De Marchi --- Chengwei Yang (2): Several minor fixes for documentation Add document for exported enums Jan Luebbe (1): libkmod: Avoid calling syscall() with -1 Johannes Berg (1): modprobe: don't check refcount with remove command

Re: [RFC PATCH] Allow optional module parameters

2013-07-03 Thread Lucas De Marchi
to tell the module loader not to load a module? modprobe.blacklist=modname1,modname2,... is already there, though all the silliness of blacklist applies unless -b is passed (that's the equivalent behavior of udev) Lucas De Marchi -- To unsubscribe from this list: send the line unsubscribe linux-kernel

module refcnt underflow

2013-06-26 Thread Lucas De Marchi
ch a value so I guess it might be difficult to reproduce it again. Any hints on what could cause decs to be greater than incs in module_refcount()? -- Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@

module refcnt underflow

2013-06-26 Thread Lucas De Marchi
I guess it might be difficult to reproduce it again. Any hints on what could cause decs to be greater than incs in module_refcount()? -- Lucas De Marchi -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH] usermodehelper: kill the sub_info->path[0] check

2013-05-21 Thread Lucas De Marchi
nt to detect the "disabled by admin" case. > > Kill it. Not only it looks strange, it can confuse other callers. > And this allows us to revert 264b83c0 "usermodehelper: check > subprocess_info->path != NULL", do_execve(NULL) is safe. > > Signed-off-by: O

Re: [PATCH] usermodehelper: kill the sub_info-path[0] check

2013-05-21 Thread Lucas De Marchi
to detect the disabled by admin case. Kill it. Not only it looks strange, it can confuse other callers. And this allows us to revert 264b83c0 usermodehelper: check subprocess_info-path != NULL, do_execve(NULL) is safe. Signed-off-by: Oleg Nesterov o...@redhat.com Acked-By: Lucas De Marchi

Re: [PATCH 1/1] usermodehelper: check subprocess_info->path != NULL

2013-05-16 Thread Lucas De Marchi
@@ int call_usermodehelper_exec(struct subprocess_info > *sub_info, int wait) > int retval = 0; > > helper_lock(); > + if (!sub_info->path) { > + retval = -EINVAL; > + goto out; > + } > + >

Re: [PATCH 1/1] usermodehelper: check subprocess_info-path != NULL

2013-05-16 Thread Lucas De Marchi
wait) int retval = 0; helper_lock(); + if (!sub_info-path) { + retval = -EINVAL; + goto out; + } + if (sub_info-path[0] == '\0') goto out; -- Acked-By: Lucas De Marchi lucas.demar...@intel.com Lucas De

Re: [systemd-devel] 2013 Plumber's CFP: Fastboot

2013-05-15 Thread Lucas De Marchi
is MC we proposed: > > http://wiki.linuxplumbersconf.org/2013:boot_and_core_os > > which sounds pretty close to fastboot? > What if we merge the proposals? John, are you ok with proposing (some of) these topics in the "Boot and Core OS" track? I could help with the module-related part, too. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [systemd-devel] 2013 Plumber's CFP: Fastboot

2013-05-15 Thread Lucas De Marchi
proposed: http://wiki.linuxplumbersconf.org/2013:boot_and_core_os which sounds pretty close to fastboot? What if we merge the proposals? John, are you ok with proposing (some of) these topics in the Boot and Core OS track? I could help with the module-related part, too. Lucas De Marchi

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-11 Thread Lucas De Marchi
On Fri, May 10, 2013 at 2:10 PM, Oleg Nesterov wrote: > On 05/10, Lucas De Marchi wrote: >> >> On Fri, May 10, 2013 at 12:36 PM, Oleg Nesterov wrote: >> > Well, personally I think it would be better to use kasprintf(), see the >> > patch I sent (it is actuall

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-11 Thread Lucas De Marchi
On Fri, May 10, 2013 at 2:10 PM, Oleg Nesterov o...@redhat.com wrote: On 05/10, Lucas De Marchi wrote: On Fri, May 10, 2013 at 12:36 PM, Oleg Nesterov o...@redhat.com wrote: Well, personally I think it would be better to use kasprintf(), see the patch I sent (it is actually wrong, needs

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 2:35 PM, Oleg Nesterov wrote: > On 05/10, Oleg Nesterov wrote: >> >> On 05/10, Lucas De Marchi wrote: >> > >> > but I think it's a good tradeoff and covers other use cases as you >> > pointed out as well. >> >&

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 12:36 PM, Oleg Nesterov wrote: > On 05/10, Lucas De Marchi wrote: >> >> Oh, right. Forgot about that. And this patch set should have been sent >> as RFC, since I'm interested in feedback about the idea. What do you >> think? > > Well, pers

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 9:58 AM, Oleg Nesterov wrote: > > On 05/10, Lucas De Marchi wrote: > > > > -char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe -q --"; > > +char modprobe_path[KMOD_PATH_LEN] = CONFIG_DEFAULT_MODULE_LOAD_BIN; > > But even after 1/3 a

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 9:58 AM, Oleg Nesterov o...@redhat.com wrote: On 05/10, Lucas De Marchi wrote: -char modprobe_path[KMOD_PATH_LEN] = /sbin/modprobe -q --; +char modprobe_path[KMOD_PATH_LEN] = CONFIG_DEFAULT_MODULE_LOAD_BIN; But even after 1/3 and 2/3 this can break

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 12:36 PM, Oleg Nesterov o...@redhat.com wrote: On 05/10, Lucas De Marchi wrote: Oh, right. Forgot about that. And this patch set should have been sent as RFC, since I'm interested in feedback about the idea. What do you think? Well, personally I think it would

Re: [PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-10 Thread Lucas De Marchi
On Fri, May 10, 2013 at 2:35 PM, Oleg Nesterov o...@redhat.com wrote: On 05/10, Oleg Nesterov wrote: On 05/10, Lucas De Marchi wrote: but I think it's a good tradeoff and covers other use cases as you pointed out as well. OK, good. Yes, perhaps this makes sense anyway but... Ok

[PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-09 Thread Lucas De Marchi
would have to be done very early in the boot sequence and on every boot since modprobe may be called even before / is mounted. In this scenario booting without and initrd would be more difficult as well. Signed-off-by: Lucas De Marchi --- init/Kconfig | 7 +++ kernel/kmod.c | 2 +- 2 files

[PATCH 2/3] kmod: Use argv_split(), passing module as extra param

2013-05-09 Thread Lucas De Marchi
Now that argv_split() leaves room for extra parameter, make call_modprobe() use it. Signed-off-by: Lucas De Marchi --- kernel/kmod.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/kernel/kmod.c b/kernel/kmod.c index 166aff5..70df90b 100644 --- a/kernel

[PATCH 1/3] argv_split(): Allow extra params

2013-05-09 Thread Lucas De Marchi
Add an argument allowing argv_split to leave room for parameters to be filled by the caller. This is useful in situations we want to split the command and add a options as the last arguments. Signed-off-by: Lucas De Marchi --- fs/coredump.c | 2 +- include/linux/string.h

[PATCH 1/3] argv_split(): Allow extra params

2013-05-09 Thread Lucas De Marchi
Add an argument allowing argv_split to leave room for parameters to be filled by the caller. This is useful in situations we want to split the command and add a options as the last arguments. Signed-off-by: Lucas De Marchi lucas.de.mar...@gmail.com --- fs/coredump.c | 2

[PATCH 2/3] kmod: Use argv_split(), passing module as extra param

2013-05-09 Thread Lucas De Marchi
Now that argv_split() leaves room for extra parameter, make call_modprobe() use it. Signed-off-by: Lucas De Marchi lucas.de.mar...@gmail.com --- kernel/kmod.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/kernel/kmod.c b/kernel/kmod.c index 166aff5

[PATCH 3/3] init/Kconfig: Add option to set modprobe command

2013-05-09 Thread Lucas De Marchi
to be done very early in the boot sequence and on every boot since modprobe may be called even before / is mounted. In this scenario booting without and initrd would be more difficult as well. Signed-off-by: Lucas De Marchi lucas.de.mar...@gmail.com --- init/Kconfig | 7 +++ kernel/kmod.c | 2

[ANNOUNCE] kmod 13

2013-04-09 Thread Lucas De Marchi
. The older syscall is also used in case the module is compressed. There are also bug fixes and other minor new features. Check the NEWS file. Thanks to everyone involved in this release. Shortlog is below. Cheers, Lucas De Marchi --- Andrey Mazo (2): depmod: --symbol-prefix actually

[ANNOUNCE] kmod 13

2013-04-09 Thread Lucas De Marchi
. The older syscall is also used in case the module is compressed. There are also bug fixes and other minor new features. Check the NEWS file. Thanks to everyone involved in this release. Shortlog is below. Cheers, Lucas De Marchi --- Andrey Mazo (2): depmod: --symbol-prefix actually

Re: control on cpu/core

2013-04-05 Thread Lucas De Marchi
to broaden your audience. linux-modu...@vger.kernel.org is really low traffic and mostly intended for the module loading/removal process, not really about writing modules. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord.

Re: control on cpu/core

2013-04-05 Thread Lucas De Marchi
...@vger.kernel.org is really low traffic and mostly intended for the module loading/removal process, not really about writing modules. Lucas De Marchi -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-25 Thread Lucas De Marchi
EM;-) Yep, it's in -mm with -ENOMEM: http://git.cmpxchg.org/?p=linux-mmotm.git;a=commitdiff;h=a8c67c6e380a8ff15997e8673e97d9fcdf7b8f9c Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-25 Thread Lucas De Marchi
in -mm with -ENOMEM: http://git.cmpxchg.org/?p=linux-mmotm.git;a=commitdiff;h=a8c67c6e380a8ff15997e8673e97d9fcdf7b8f9c Lucas De Marchi -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

Re: [RFC PATCH] Allow optional module parameters

2013-03-19 Thread Lucas De Marchi
ce, it's probably better to warn, and load the module anyway. However loading the module anyway would bring at least one drawback: if the user made a typo when passing the option the module would load anyway and he will probably not even look in the log, since there's was no errors from modprobe. For f

Re: [RFC PATCH] Allow optional module parameters

2013-03-19 Thread Lucas De Marchi
in the log, since there's was no errors from modprobe. For finit_module we could put a flag to trigger this behavior and propagate it to modprobe, but this is not possible with init_module(). I can't think in any other option right now... do you have any? Lucas De Marchi -- To unsubscribe from this list

Re: [PATCH 0/1] poweroff: change orderly_poweroff() to use schedule_work()

2013-03-13 Thread Lucas De Marchi
> > Lucas, Andrew, sorry. If this patch will be applied, then > > kernel-sysc-use-the-simpler-call_usermodehelper.patch No problem for me... your patch already does what this one is doing. Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH 0/1] poweroff: change orderly_poweroff() to use schedule_work()

2013-03-13 Thread Lucas De Marchi
that orderly_poweroff() doesn't need the keventd_up() check, I hope this is correct... Lucas, Andrew, sorry. If this patch will be applied, then kernel-sysc-use-the-simpler-call_usermodehelper.patch No problem for me... your patch already does what this one is doing. Lucas De

Re: [PATCH v3 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-12 Thread Lucas De Marchi
On Tue, Mar 12, 2013 at 5:31 PM, Andrew Morton wrote: > On Mon, 11 Mar 2013 21:48:06 -0300 Lucas De Marchi > wrote: > >> call_usermodehelper_setup() + call_usermodehelper_exec() need to be >> called instead of call_usermodehelper_fns() when the cleanup function >> n

Re: Regression with orderly_poweroff()

2013-03-12 Thread Lucas De Marchi
xport call_usermodehelper_{setup,exec}. Doing this we can separate the allocation part using GFP_ATOMIC in order to make it work on interrupt context. May I suggest going with something like below after that patches are applied (sorry, whitespace damaged)? I can also rework the patch series so this can b

Re: Regression with orderly_poweroff()

2013-03-12 Thread Lucas De Marchi
the allocation part using GFP_ATOMIC in order to make it work on interrupt context. May I suggest going with something like below after that patches are applied (sorry, whitespace damaged)? I can also rework the patch series so this can be applied regardless of the rest. Lucas De Marchi diff --git

Re: [PATCH v3 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-12 Thread Lucas De Marchi
On Tue, Mar 12, 2013 at 5:31 PM, Andrew Morton a...@linux-foundation.org wrote: On Mon, 11 Mar 2013 21:48:06 -0300 Lucas De Marchi lucas.demar...@profusion.mobi wrote: call_usermodehelper_setup() + call_usermodehelper_exec() need to be called instead of call_usermodehelper_fns() when

[PATCH v3 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-11 Thread Lucas De Marchi
or not. Signed-off-by: Lucas De Marchi --- include/linux/kmod.h | 8 kernel/kmod.c| 56 +--- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 5398d58..7eebcf5 100644

[PATCH v3 7/7] kmod: remove call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
This function suffers from not being able to determine if the cleanup is called in case it returns -ENOMEM. Nobody is using it anymore, so let's remove it. Signed-off-by: Lucas De Marchi --- include/linux/kmod.h | 11 +-- kernel/kmod.c| 31 +-- 2

[PATCH v3 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case there's an OOM in this last function the cleanup function may not be called - in this case we would miss a call to key_put(). Signed-off-by: Lucas De Marchi --- Changes from v2

[PATCH v3 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
remove the _fns variant. Signed-off-by: Lucas De Marchi --- Changes from v2: simplify error handling as suggested by Oleg. fs/coredump.c | 12 +--- init/do_mounts_initrd.c | 8 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/fs/coredump.c b/fs

[PATCH v3 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case the latter returns -ENOMEM the cleanup function may had not been called - in this case we would not free argv and module_name. Signed-off-by: Lucas De Marchi --- Changes from v2

[PATCH v3 5/7] coredump: remove trailling whitespaces

2013-03-11 Thread Lucas De Marchi
Signed-off-by: Lucas De Marchi --- fs/coredump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index c647965..7dfb3b0 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -522,7 +522,7 @@ void do_coredump(siginfo_t *siginfo) ispipe

[PATCH v3 1/7] kernel/sys.c: Use the simpler call_usermodehelper()

2013-03-11 Thread Lucas De Marchi
Commit "7ff6764 usermodehelper: cleanup/fix __orderly_poweroff() && argv_free()" simplified __orderly_poweroff() removing the need to use call_usermodehelper_fns(). Since we are not passing any callback, it's simpler to use call_usermodehelper(). Signed-off-by: Lucas De Marchi

[PATCH v3 1/7] kernel/sys.c: Use the simpler call_usermodehelper()

2013-03-11 Thread Lucas De Marchi
Commit 7ff6764 usermodehelper: cleanup/fix __orderly_poweroff() argv_free() simplified __orderly_poweroff() removing the need to use call_usermodehelper_fns(). Since we are not passing any callback, it's simpler to use call_usermodehelper(). Signed-off-by: Lucas De Marchi lucas.demar

[PATCH v3 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case the latter returns -ENOMEM the cleanup function may had not been called - in this case we would not free argv and module_name. Signed-off-by: Lucas De Marchi lucas.demar

[PATCH v3 5/7] coredump: remove trailling whitespaces

2013-03-11 Thread Lucas De Marchi
Signed-off-by: Lucas De Marchi lucas.demar...@profusion.mobi --- fs/coredump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index c647965..7dfb3b0 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -522,7 +522,7 @@ void do_coredump

[PATCH v3 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case there's an OOM in this last function the cleanup function may not be called - in this case we would miss a call to key_put(). Signed-off-by: Lucas De Marchi lucas.demar

[PATCH v3 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
remove the _fns variant. Signed-off-by: Lucas De Marchi lucas.demar...@profusion.mobi --- Changes from v2: simplify error handling as suggested by Oleg. fs/coredump.c | 12 +--- init/do_mounts_initrd.c | 8 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git

[PATCH v3 7/7] kmod: remove call_usermodehelper_fns()

2013-03-11 Thread Lucas De Marchi
This function suffers from not being able to determine if the cleanup is called in case it returns -ENOMEM. Nobody is using it anymore, so let's remove it. Signed-off-by: Lucas De Marchi lucas.demar...@profusion.mobi --- include/linux/kmod.h | 11 +-- kernel/kmod.c| 31

[PATCH v3 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-11 Thread Lucas De Marchi
or not. Signed-off-by: Lucas De Marchi lucas.demar...@profusion.mobi --- include/linux/kmod.h | 8 kernel/kmod.c| 56 +--- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/include/linux/kmod.h b/include/linux/kmod.h

Re: [PATCH v2 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:42 PM, Oleg Nesterov wrote: > On 03/08, Lucas De Marchi wrote: >> >> @@ -571,9 +572,17 @@ void do_coredump(siginfo_t *siginfo) >> goto fail_dropcount; >> } >> >> - retval = call_usermod

Re: [PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:25 PM, Oleg Nesterov wrote: > On 03/08, Lucas De Marchi wrote: >> >> static int call_usermodehelper_keys(char *path, char **argv, char **envp, >> struct key *session_keyring, int wait) >> { >> -

Re: [PATCH v2 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:23 PM, Oleg Nesterov wrote: > On 03/08, Lucas De Marchi wrote: >> >> Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of >> calling call_usermodehelper_fns(). In case the latter returns -ENOMEM >> the cleanup funct

Re: [PATCH v2 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:23 PM, Oleg Nesterov o...@redhat.com wrote: On 03/08, Lucas De Marchi wrote: Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case the latter returns -ENOMEM the cleanup function may had not been called

Re: [PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:25 PM, Oleg Nesterov o...@redhat.com wrote: On 03/08, Lucas De Marchi wrote: static int call_usermodehelper_keys(char *path, char **argv, char **envp, struct key *session_keyring, int wait) { - return

Re: [PATCH v2 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-09 Thread Lucas De Marchi
On Sat, Mar 9, 2013 at 5:42 PM, Oleg Nesterov o...@redhat.com wrote: On 03/08, Lucas De Marchi wrote: @@ -571,9 +572,17 @@ void do_coredump(siginfo_t *siginfo) goto fail_dropcount; } - retval = call_usermodehelper_fns(helper_argv[0

[PATCH v2 7/7] kmod: remove call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
This function suffers from not being able to determine if the cleanup is called in case it returns -ENOMEM. Nobody is using it anymore, so let's remove it. Signed-off-by: Lucas De Marchi --- include/linux/kmod.h | 11 +-- kernel/kmod.c| 31 +-- 2

[PATCH v2 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case the latter returns -ENOMEM the cleanup function may had not been called - in this case we would not free argv and module_name. Signed-off-by: Lucas De Marchi --- kernel/kmod.c | 15

[PATCH v2 1/7] kernel/sys.c: Use the simpler call_usermodehelper()

2013-03-07 Thread Lucas De Marchi
Commit "7ff6764 usermodehelper: cleanup/fix __orderly_poweroff() && argv_free()" simplified __orderly_poweroff() removing the need to use call_usermodehelper_fns(). Since we are not passing any callback, it's simpler to use call_usermodehelper(). Signed-off-by: Lucas De Marchi

[PATCH v2 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-07 Thread Lucas De Marchi
or not. Signed-off-by: Lucas De Marchi --- include/linux/kmod.h | 8 kernel/kmod.c| 56 +--- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 5398d58..7eebcf5 100644

[PATCH v2 0/7] kmod/usermodehelper changes

2013-03-07 Thread Lucas De Marchi
is separating from executing it, it's safe to allways call the cleanup. Lucas De Marchi (7): kernel/sys.c: Use the simpler call_usermodehelper() usermodehelper: Export _exec() and _setup() functions kmod: split call to call_usermodehelper_fns() KEYS: split call to call_usermodehelper_fns

[PATCH v2 5/7] coredump: remove trailling whitespaces

2013-03-07 Thread Lucas De Marchi
Signed-off-by: Lucas De Marchi --- fs/coredump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index c647965..7dfb3b0 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -522,7 +522,7 @@ void do_coredump(siginfo_t *siginfo) ispipe

[PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case there's an OOM in this last function the cleanup function may not be called - in this case we would miss a call to key_put(). Signed-off-by: Lucas De Marchi --- security/keys

[PATCH v2 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
remove the _fns variant. Signed-off-by: Lucas De Marchi --- fs/coredump.c | 15 --- init/do_mounts_initrd.c | 11 +-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index 7dfb3b0..468b4f6 100644 --- a/fs/coredump.c +++ b

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-07 Thread Lucas De Marchi
On Thu, Mar 7, 2013 at 5:07 PM, Oleg Nesterov wrote: > On 03/07, Lucas De Marchi wrote: >> >> On Thu, Mar 7, 2013 at 4:37 PM, Oleg Nesterov wrote: >> > >> >> @@ -98,12 +93,13 @@ static int call_modprobe(char *module_name, int wait) >> >> arg

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-07 Thread Lucas De Marchi
On Thu, Mar 7, 2013 at 4:37 PM, Oleg Nesterov wrote: > Hi Lucas, > > On 03/06, Lucas De Marchi wrote: >> >> On Mon, Feb 25, 2013 at 3:08 PM, Oleg Nesterov wrote: >> > >> > So, I hope you will send v2. I'd suggest to split the fixes. 1/3 >> > s

[PATCH v2 4/7] KEYS: split call to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case there's an OOM in this last function the cleanup function may not be called - in this case we would miss a call to key_put(). Signed-off-by: Lucas De Marchi lucas.demar

[PATCH v2 6/7] Split remaining calls to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
remove the _fns variant. Signed-off-by: Lucas De Marchi lucas.demar...@profusion.mobi --- fs/coredump.c | 15 --- init/do_mounts_initrd.c | 11 +-- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index 7dfb3b0..468b4f6

[PATCH v2 5/7] coredump: remove trailling whitespaces

2013-03-07 Thread Lucas De Marchi
Signed-off-by: Lucas De Marchi lucas.demar...@profusion.mobi --- fs/coredump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/coredump.c b/fs/coredump.c index c647965..7dfb3b0 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -522,7 +522,7 @@ void do_coredump

[PATCH v2 0/7] kmod/usermodehelper changes

2013-03-07 Thread Lucas De Marchi
is separating from executing it, it's safe to allways call the cleanup. Lucas De Marchi (7): kernel/sys.c: Use the simpler call_usermodehelper() usermodehelper: Export _exec() and _setup() functions kmod: split call to call_usermodehelper_fns() KEYS: split call to call_usermodehelper_fns

[PATCH v2 1/7] kernel/sys.c: Use the simpler call_usermodehelper()

2013-03-07 Thread Lucas De Marchi
Commit 7ff6764 usermodehelper: cleanup/fix __orderly_poweroff() argv_free() simplified __orderly_poweroff() removing the need to use call_usermodehelper_fns(). Since we are not passing any callback, it's simpler to use call_usermodehelper(). Signed-off-by: Lucas De Marchi lucas.demar

[PATCH v2 2/7] usermodehelper: Export _exec() and _setup() functions

2013-03-07 Thread Lucas De Marchi
or not. Signed-off-by: Lucas De Marchi lucas.demar...@profusion.mobi --- include/linux/kmod.h | 8 kernel/kmod.c| 56 +--- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/include/linux/kmod.h b/include/linux/kmod.h

[PATCH v2 3/7] kmod: split call to call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
Use call_usermodehelper_setup() + call_usermodehelper_exec() instead of calling call_usermodehelper_fns(). In case the latter returns -ENOMEM the cleanup function may had not been called - in this case we would not free argv and module_name. Signed-off-by: Lucas De Marchi lucas.demar

[PATCH v2 7/7] kmod: remove call_usermodehelper_fns()

2013-03-07 Thread Lucas De Marchi
This function suffers from not being able to determine if the cleanup is called in case it returns -ENOMEM. Nobody is using it anymore, so let's remove it. Signed-off-by: Lucas De Marchi lucas.demar...@profusion.mobi --- include/linux/kmod.h | 11 +-- kernel/kmod.c| 31

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-07 Thread Lucas De Marchi
On Thu, Mar 7, 2013 at 4:37 PM, Oleg Nesterov o...@redhat.com wrote: Hi Lucas, On 03/06, Lucas De Marchi wrote: On Mon, Feb 25, 2013 at 3:08 PM, Oleg Nesterov o...@redhat.com wrote: So, I hope you will send v2. I'd suggest to split the fixes. 1/3 should create/export the new helpers

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-07 Thread Lucas De Marchi
On Thu, Mar 7, 2013 at 5:07 PM, Oleg Nesterov o...@redhat.com wrote: On 03/07, Lucas De Marchi wrote: On Thu, Mar 7, 2013 at 4:37 PM, Oleg Nesterov o...@redhat.com wrote: @@ -98,12 +93,13 @@ static int call_modprobe(char *module_name, int wait) argv[3] = module_name; /* check

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-06 Thread Lucas De Marchi
Hi Oleg, On Mon, Feb 25, 2013 at 3:08 PM, Oleg Nesterov wrote: > On 02/25, Lucas De Marchi wrote: >> >> Yep. The current interface is confusing. I agree that a separate >> setup() + exec() would make more sense. > > Great, > >> > @@ -98,8 +98,14 @@ s

Re: [PATCH] usermodehelper: Fix -ENOMEM return logic

2013-03-06 Thread Lucas De Marchi
Hi Oleg, On Mon, Feb 25, 2013 at 3:08 PM, Oleg Nesterov o...@redhat.com wrote: On 02/25, Lucas De Marchi wrote: Yep. The current interface is confusing. I agree that a separate setup() + exec() would make more sense. Great, @@ -98,8 +98,14 @@ static int call_modprobe(char *module_na

<    1   2   3   4   >