mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@openvz.org>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>, Greg KH <gregkh@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	devel@openvz.org
Subject: Re: [PATCH] Fix OOPS in show_uevent()
Date: Fri, 10 Aug 2007 17:21:51 +0400	[thread overview]
Message-ID: <46BC666F.6010409@openvz.org> (raw)
In-Reply-To: <20070810143927.619d0640@gondolin.boeblingen.de.ibm.com>

Cornelia Huck wrote:
> On Fri, 10 Aug 2007 14:23:56 +0200,
> "Kay Sievers" <kay.sievers@vrfy.org> wrote:
> 
>> But we still don't update the remaining buffer size and the remaining
>> array fields which are left after the call. Shouldn't we instead just
>> change the:
>>    int (*dev_uevent)(struct device *dev,
>>                                 char **envp, int num_envp,
>>                                 char *buffer, int buffer_size);
>> to:
>>   int (*dev_uevent)(struct device *dev,
>>                                char **envp, int num_envp, int *cur_index,
>>                                char *buffer, int buffer_size, int *cur_len);
>>
>> like we do for:
>>   int add_uevent_var(char **envp, int num_envp, int *cur_index,
>>                                   char *buffer, int buffer_size, int *cur_len,
>>                                   const char *format, ...)
>>
>> and along with the change of the callers, we would update the values
>> properly, so the next call has the correct numbers? There are 6
>> classes and something like 12 buses using this method, so it shouldn't
>> be too much trouble.

isn't it better to change
    int (*dev_uevent)(struct device *dev,
                                 char **envp, int num_envp,
                                 char *buffer, int buffer_size);
to
    int (*dev_uevent)(struct device *dev,
                                 char **envp, int num_envp,
                                 char **buffer);
and alter the buffer pointer inside?


> Sounds like a sensible approach. We may want the remaining non-users to
> add_uevent_var() at the same time, I guess.
> 

Thanks,
Pavel

  reply	other threads:[~2007-08-10 13:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-10 10:13 Pavel Emelyanov
2007-08-10 12:09 ` Cornelia Huck
2007-08-10 12:23 ` Kay Sievers
2007-08-10 12:39   ` Cornelia Huck
2007-08-10 13:21     ` Pavel Emelyanov [this message]
2007-08-10 13:37       ` Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46BC666F.6010409@openvz.org \
    --to=xemul@openvz.org \
    --cc=akpm@osdl.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=devel@openvz.org \
    --cc=gregkh@suse.de \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®