All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org, Wolfgang Grandegger <wg@denx.de>
Subject: Re: [Xenomai] [PATCH 1/2] rtcan_module: Fix tx_timeout buffer size inconsistency
Date: Mon, 15 Apr 2013 08:20:47 +0200	[thread overview]
Message-ID: <516B9C3F.2080107@grandegger.com> (raw)
In-Reply-To: <516AC595.5060103@xenomai.org>

On 04/14/2013 05:04 PM, Gilles Chanteperdrix wrote:
> On 04/10/2013 12:05 PM, Wolfgang Grandegger wrote:
> 
>> On 04/09/2013 09:32 PM, Gilles Chanteperdrix wrote:
>>> On 03/17/2013 07:56 PM, Paul Janzen wrote:
>>>
>>>> When formatting /proc/rtcan/sockets, tx_timeout is defined as
>>>> char[16], but a length of 20 is passed to rtcan_get_timeout_name. If
>>>> tx_timeout for any socket is infinite, this causes snprintf to zero
>>>> outside the buffer, leading to stack overflow and a kernel panic.
>>>> Make the tx_timeout buffer 20 bytes long instead.
>>>>
>>>> Signed-off-by: Paul Janzen <pcj@xenomai.sez.to>
>>
>> It's a bug, therefore:
>>
>> Acked-by: Wolfgang Grandegger <wg@grandegger.com>
>>
>>> Wolfgang, ping?
>>
>> Pong, sorry for delay.
> 
> 
> Hi,
> 
> No problem for the delay, merged, thanks.
> 
> We have two other unconfirmed CAN patches:
> http://www.xenomai.org/pipermail/xenomai/2013-March/028111.html

We can add even more PCI IDs here. I'm going to prepare a patch. Just
support for 4 channel cards needs more effort.

> And not really a patch, but modifying the code is trivial if you confirm
> that we can do it:

> http://www.xenomai.org/pipermail/xenomai/2013-February/027824.html

Well, I'm not happy with that extension to rtcansend. I will answer to
the original thread.

Wolfgang.



  reply	other threads:[~2013-04-15  6:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 18:56 [Xenomai] [PATCH 1/2] rtcan_module: Fix tx_timeout buffer size inconsistency Paul Janzen
2013-03-17 19:16 ` [Xenomai] [PATCH 2/2] rtcan_module: Improve buffer size handling for /proc/rtcan entries Paul Janzen
2013-04-09 19:32 ` [Xenomai] [PATCH 1/2] rtcan_module: Fix tx_timeout buffer size inconsistency Gilles Chanteperdrix
2013-04-10 10:05   ` Wolfgang Grandegger
2013-04-14 15:04     ` Gilles Chanteperdrix
2013-04-15  6:20       ` Wolfgang Grandegger [this message]
2013-04-15  7:18         ` Paul Janzen
2013-04-16  8:00           ` Wolfgang Grandegger

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=516B9C3F.2080107@grandegger.com \
    --to=wg@grandegger.com \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=wg@denx.de \
    --cc=xenomai@xenomai.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.