From: Dan Carpenter <error27@gmail.com>
To: Jan Ceuleers <jan.ceuleers@computer.org>
Cc: Marcel Holtmann <marcel@holtmann.org>,
"David S. Miller" <davem@davemloft.net>,
Dave Young <hidave.darkstar@gmail.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Roger Quadros <ext-roger.quadros@nokia.com>,
Bing Zhao <bzhao@marvell.com>,
linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] bluetooth: debugfs changes use too much stack
Date: Sat, 06 Mar 2010 15:30:30 +0000 [thread overview]
Message-ID: <20100306153030.GU4958@bicker> (raw)
In-Reply-To: <4B92695F.60601@computer.org>
On Sat, Mar 06, 2010 at 03:40:31PM +0100, Jan Ceuleers wrote:
> Dan Carpenter wrote:
>
> Error handling?
>
> > The original code would break with a 4K stack.
> >
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> > ---
> > This was compile tested only. Sorry about that.
> >
> > diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
> > index 1a79a6c..835758f 100644
> > --- a/net/bluetooth/hci_sysfs.c
> > +++ b/net/bluetooth/hci_sysfs.c
> > @@ -417,9 +417,11 @@ static ssize_t inquiry_cache_read(struct file *file, char __user *userbuf,
> > struct hci_dev *hdev = file->private_data;
> > struct inquiry_cache *cache = &hdev->inq_cache;
> > struct inquiry_entry *e;
> > - char buf[4096];
> > + char *buf;
> > int n = 0;
> > + ssize_t ret;
> >
> > + buf = kmalloc(4096, GFP_KERNEL);
>
> Could this kmalloc not fail?
Grr... I'm really sorry about that.
I will send an updated patch tomorrow.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Jan Ceuleers <jan.ceuleers@computer.org>
Cc: Marcel Holtmann <marcel@holtmann.org>,
"David S. Miller" <davem@davemloft.net>,
Dave Young <hidave.darkstar@gmail.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Roger Quadros <ext-roger.quadros@nokia.com>,
Bing Zhao <bzhao@marvell.com>,
linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] bluetooth: debugfs changes use too much stack
Date: Sat, 6 Mar 2010 18:30:30 +0300 [thread overview]
Message-ID: <20100306153030.GU4958@bicker> (raw)
In-Reply-To: <4B92695F.60601@computer.org>
On Sat, Mar 06, 2010 at 03:40:31PM +0100, Jan Ceuleers wrote:
> Dan Carpenter wrote:
>
> Error handling?
>
> > The original code would break with a 4K stack.
> >
> > Signed-off-by: Dan Carpenter <error27@gmail.com>
> > ---
> > This was compile tested only. Sorry about that.
> >
> > diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
> > index 1a79a6c..835758f 100644
> > --- a/net/bluetooth/hci_sysfs.c
> > +++ b/net/bluetooth/hci_sysfs.c
> > @@ -417,9 +417,11 @@ static ssize_t inquiry_cache_read(struct file *file, char __user *userbuf,
> > struct hci_dev *hdev = file->private_data;
> > struct inquiry_cache *cache = &hdev->inq_cache;
> > struct inquiry_entry *e;
> > - char buf[4096];
> > + char *buf;
> > int n = 0;
> > + ssize_t ret;
> >
> > + buf = kmalloc(4096, GFP_KERNEL);
>
> Could this kmalloc not fail?
Grr... I'm really sorry about that.
I will send an updated patch tomorrow.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jan Ceuleers <jan.ceuleers-bdq14YP6qtRg9hUCZPvPmw@public.gmane.org>
Cc: Marcel Holtmann <marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Dave Young
<hidave.darkstar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>,
Roger Quadros
<ext-roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
Bing Zhao <bzhao-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [patch] bluetooth: debugfs changes use too much stack
Date: Sat, 6 Mar 2010 18:30:30 +0300 [thread overview]
Message-ID: <20100306153030.GU4958@bicker> (raw)
In-Reply-To: <4B92695F.60601-bdq14YP6qtRg9hUCZPvPmw@public.gmane.org>
On Sat, Mar 06, 2010 at 03:40:31PM +0100, Jan Ceuleers wrote:
> Dan Carpenter wrote:
>
> Error handling?
>
> > The original code would break with a 4K stack.
> >
> > Signed-off-by: Dan Carpenter <error27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> > This was compile tested only. Sorry about that.
> >
> > diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
> > index 1a79a6c..835758f 100644
> > --- a/net/bluetooth/hci_sysfs.c
> > +++ b/net/bluetooth/hci_sysfs.c
> > @@ -417,9 +417,11 @@ static ssize_t inquiry_cache_read(struct file *file, char __user *userbuf,
> > struct hci_dev *hdev = file->private_data;
> > struct inquiry_cache *cache = &hdev->inq_cache;
> > struct inquiry_entry *e;
> > - char buf[4096];
> > + char *buf;
> > int n = 0;
> > + ssize_t ret;
> >
> > + buf = kmalloc(4096, GFP_KERNEL);
>
> Could this kmalloc not fail?
Grr... I'm really sorry about that.
I will send an updated patch tomorrow.
regards,
dan carpenter
next prev parent reply other threads:[~2010-03-06 15:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 11:15 [patch] bluetooth: debugfs changes use too much stack Dan Carpenter
2010-03-06 11:15 ` Dan Carpenter
2010-03-06 14:40 ` Jan Ceuleers
2010-03-06 14:40 ` Jan Ceuleers
2010-03-06 15:30 ` Dan Carpenter [this message]
2010-03-06 15:30 ` Dan Carpenter
2010-03-06 15:30 ` Dan Carpenter
2010-03-06 17:49 ` Marcel Holtmann
2010-03-06 17:49 ` Marcel Holtmann
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=20100306153030.GU4958@bicker \
--to=error27@gmail.com \
--cc=bzhao@marvell.com \
--cc=davem@davemloft.net \
--cc=ext-roger.quadros@nokia.com \
--cc=gregkh@suse.de \
--cc=hidave.darkstar@gmail.com \
--cc=jan.ceuleers@computer.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.