netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: vladislav.yasevich@hp.com
Cc: akpm@linux-foundation.org, netdev@vger.kernel.org,
	bugme-daemon@bugzilla.kernel.org, matthias.kaehlcke@gmail.com,
	lksctp-developers@lists.sourceforge.net
Subject: Re: [Bugme-new] [Bug 8342] New: sctp_getsockopt_local_addrs_old() calls copy_to_user() while a spinlock is held
Date: Wed, 25 Apr 2007 21:54:05 -0700 (PDT)	[thread overview]
Message-ID: <20070425.215405.110014911.davem@davemloft.net> (raw)
In-Reply-To: <462CF047.3050809@hp.com>

From: Vlad Yasevich <vladislav.yasevich@hp.com>
Date: Mon, 23 Apr 2007 13:43:35 -0400

> [PATCH] [SCTP] Fix sctp_getsockopt_local_addrs_old() to use local storage
> 
> sctp_getsockopt_local_addrs_old() in net/sctp/socket.c calls copy_to_user()
> while the spinlock addr_lock is held. this should not be done as copy_to_user()
> might sleep. the call to sctp_copy_laddrs_to_user() while holding the lock is
> also problematic as it calls copy_to_user()
> 
> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>

As Andrew Morton just noticed and fixed in -mm, you're passing
in int pointers to arguments that should be size_t pointers,
specifically for some of the calls to sctp_copy_laddrs().

Please fix this, and please start testing builds on 64-bit
platforms (even if via cross compile) so that you can catch
these as the warnings generated by the compiler on this one
were obvious.

  reply	other threads:[~2007-04-26  4:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200704162134.l3GLYMuF004745@fire-2.osdl.org>
2007-04-20 21:35 ` [Bugme-new] [Bug 8342] New: sctp_getsockopt_local_addrs_old() calls copy_to_user() while a spinlock is held Andrew Morton
2007-04-23 17:43   ` Vlad Yasevich
2007-04-26  4:54     ` David Miller [this message]
2007-04-26 13:22       ` Vlad Yasevich
2007-04-29  4:14         ` David Miller

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=20070425.215405.110014911.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=lksctp-developers@lists.sourceforge.net \
    --cc=matthias.kaehlcke@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vladislav.yasevich@hp.com \
    /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;
as well as URLs for NNTP newsgroup(s).