From: Greg KH <gregkh@linuxfoundation.org>
To: "Sharma, Sanjeev" <Sanjeev_Sharma@mentor.com>
Cc: "hdegoede@redhat.com" <hdegoede@redhat.com>,
"kraxel@redhat.com" <kraxel@redhat.com>,
"mdharm-usb@one-eyed-alien.net" <mdharm-usb@one-eyed-alien.net>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] uas: replace WARN_ON_ONCE() with assert_spin_locked().
Date: Tue, 12 Aug 2014 06:53:32 +0800 [thread overview]
Message-ID: <20140811225332.GA10721@kroah.com> (raw)
In-Reply-To: <FDC088D3B5555644AE135ED28A7ABDE94DF2B2AE@EU-MBX-02.mgc.mentorg.com>
On Mon, Aug 11, 2014 at 11:56:17AM +0000, Sharma, Sanjeev wrote:
> Hi Greg,
>
> Please find my comment in line.
As it should, but where is it, your quoting is all messed up...
> -----Original Message-----
> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Monday, August 11, 2014 1:58 PM
> To: Sharma, Sanjeev
> Cc: hdegoede@redhat.com; kraxel@redhat.com; mdharm-usb@one-eyed-alien.net; linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; linux-scsi@vger.kernel.org
> Subject: Re: [PATCH] uas: replace WARN_ON_ONCE() with assert_spin_locked().
>
> On Mon, Aug 11, 2014 at 01:29:26PM +0530, Sanjeev Sharma wrote:
> > spin_is_locked() always return false in uniprocessor configuration
>
> Really? On what processor type? I don't see that being the case on a few processors, but I didn't check them all, or I might be totally confused with all of the arch_spin_is_locked() definitions in the tree.
>
> specially in case of mips and powerpc but we can configure our kernel to uniprocessor configuration for specific processor and in that case we should be extra cautious. Please check spinlock_up.h
Shouldn't you just fix your .h file to not do this? x86 is not this
way, nor is ARM, right?
> > and therefore it
> > would be advise to repalce with assert_spin_locked().
>
> This implies that all uses of this function is wrong and should be replaced and removed, right?
>
> Yes and there are only few places in driver for which I am submitting patches which need to be change and at other places it has been already taken care. Please have an look into the
> Old discussion for more details.
>
> http://linux-kernel.2935.n7.nabble.com/Is-spin-is-locked-safe-to-use-with-BUG-ON-WARN-ON-td654800.html#a921802
Ok, just remove all the tests, it doesn't help anyone :)
thanks,
greg k-h
next prev parent reply other threads:[~2014-08-11 22:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 7:59 [PATCH] uas: replace WARN_ON_ONCE() with assert_spin_locked() Sanjeev Sharma
2014-08-11 8:28 ` Greg KH
2014-08-11 11:56 ` Sharma, Sanjeev
2014-08-11 22:53 ` Greg KH [this message]
2014-08-11 18:19 ` Guenter Roeck
2014-08-11 18:55 ` Hans de Goede
2014-08-11 19:08 ` Guenter Roeck
2014-08-11 19:53 ` Hans de Goede
2014-08-11 18:56 ` Hans de Goede
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=20140811225332.GA10721@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Sanjeev_Sharma@mentor.com \
--cc=hdegoede@redhat.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mdharm-usb@one-eyed-alien.net \
/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