netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bo Yu <tsu.yubo@gmail.com>
To: Jia-Ju Bai <baijiaju1990@163.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
	David Miller <davem@davemloft.net>,
	manish.chopra@cavium.com, rahul.verma@cavium.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct
Date: Thu, 22 Jun 2017 01:44:10 +0800	[thread overview]
Message-ID: <20170621174409.zc52oanvrjfcayne@debian> (raw)
In-Reply-To: <594A131F.9040300@163.com>

Hi,
On Wed, Jun 21, 2017 at 02:33:03PM +0800, Jia-Ju Bai wrote:
>On 06/21/2017 02:11 PM, Kalle Valo wrote:
>>David Miller<davem@davemloft.net>  writes:
>>
>>>From: Jia-Ju Bai<baijiaju1990@163.com>
>>>Date: Mon, 19 Jun 2017 10:48:53 +0800
>>>
>>>>The driver may sleep under a spin lock, and the function call path is:
>>>>netxen_nic_pci_mem_access_direct (acquire the lock by spin_lock)
>>>>   ioremap -->  may sleep
>>>>
>>>>To fix it, the lock is released before "ioremap", and the lock is
>>>>acquired again after this function.
>>>>
>>>>Signed-off-by: Jia-Ju Bai<baijiaju1990@163.com>
>>>This style of change you are making is really starting to be a
>>>problem.
>>>
>>>You can't just drop locks like this, especially without explaining
>>>why it's ok, and why the mutual exclusion this code was trying to
>>>achieve is still going to be OK afterwards.
>>>
>>>In fact, I see zero analysis of the locking situation here, why
>>>it was needed in the first place, and why your change is OK in
>>>that context.
>>>
>>>Any locking change is delicate, and you must put the greatest of
>>>care and consideration into it.
>>>
>>>Just putting "unlock/lock" around the sleeping operation shows a
>>>very low level of consideration for the implications of the change
>>>you are making.
>>>
>>>This isn't like making whitespace fixes, sorry...
>>We already tried to explain this to Jia-Ju during review of a wireless
>>patch:
>>
>>https://patchwork.kernel.org/patch/9756585/
>>
>>Jia-Ju, you should listen to feedback. If you continue submitting random
>>patches like this makes it hard for maintainers to trust your patches
>>anymore.
>>
>Hi,
>
>I am quite sorry for my incorrect patches, and I will listen carefully
>to your advice.
>In fact, for some bugs and patches which I have reported before, I
>have not received the feedback of them, so I resent them a few days
>ago, including this patch.
>Sorry for my mistake again.

Once your patch be accepted, maintainer will reply you by mail sent by
automatic or themselves.But for your patch(es),i think most of them will
be dropped silently, because (un)lock related operations is very
criticality, especially in kernel code. Maintainers will not accept
unsafe (un)lock code.

Best Regards
>
>Thanks,
>Jia-Ju Bai
>

  parent reply	other threads:[~2017-06-21 17:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19  2:48 [PATCH] netxen: Fix a sleep-in-atomic bug in netxen_nic_pci_mem_access_direct Jia-Ju Bai
2017-06-20 17:35 ` David Miller
2017-06-21  6:11   ` Kalle Valo
2017-06-21  6:33     ` Jia-Ju Bai
2017-06-21 13:40       ` Kalle Valo
2017-06-21 14:32         ` Jia-Ju Bai
2017-06-22  6:08         ` Dan Carpenter
2017-06-22 10:52           ` Jia-Ju Bai
2017-06-21 17:44       ` Bo Yu [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-05-31  9:21 Jia-Ju Bai

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=20170621174409.zc52oanvrjfcayne@debian \
    --to=tsu.yubo@gmail.com \
    --cc=baijiaju1990@163.com \
    --cc=davem@davemloft.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manish.chopra@cavium.com \
    --cc=netdev@vger.kernel.org \
    --cc=rahul.verma@cavium.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).