public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@oracle•com>
To: Thomas Gleixner <tglx@linutronix•de>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail•com>,
	Andrew Morton <akpm@linux-foundation•org>,
	ssantosh@kernel•org, David Miller <davem@davemloft•net>,
	giovanni.cabiddu@intel•com, gregkh@linuxfoundation•org,
	herbert@gondor•apana.org.au, isdn@linux-pingi•de, mingo@elte•hu,
	pebolle@tiscali•nl, Peter Zijlstra <peterz@infradead•org>,
	salvatore.benedetto@intel•com, tadeusz.struk@intel•com,
	mm-commits@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>,
	Stephen Rothwell <sfr@canb•auug.org.au>,
	linux-next@vger•kernel.org, sergey.senozhatsky@gmail•com,
	Ingo Molnar <mingo@kernel•org>
Subject: Re: + softirq-fix-tasklet_kill-and-its-users.patch added to -mm tree
Date: Thu, 22 Sep 2016 09:08:40 -0700	[thread overview]
Message-ID: <804abfd2-a8f7-c705-05e5-48230a579345@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1609220854090.5599@nanos>

On 9/22/2016 12:05 AM, Thomas Gleixner wrote:
> B1;2802;0cOn Wed, 21 Sep 2016, Santosh Shilimkar wrote:
>> I requested you to include this patch but now am not sure anymore.
>> Looks like there are almost 30 more users which are directly
>> tweaking 'tasklet_struct' fields and calling other APIs. Hunting them
>> and fixing them probably would be an exercise and also those changes
>> needs those changed drivers to be tested.
>>
>> What do you suggest ? At least this patch needs to be dropped as of now
>> till we can have complete coverage for those bad users.
>
> Yes, it needs to be dropped. Stephen, can you please revert it from next?
>
> How to fix this: The only way is to review all tasklet usage sites for
> creative abuse and then fix them one by one. This needs to be done anyway
> because those are ticking timebombs even without changes in the core
> code. I looked at one of the offenders and it's broken today, it's just
> protected by the extremly low probablity to hit the wreckage case.
>
> What you can do to coerce the developers/maintainers of offending code into
> looking at the mess they created/merged is to implement accessors for the
> tasklet struct fields and replace the open coded fiddling with them.
>
> Once that is done, rename the struct fields to something which is absurd
> enough to type.  But don't worry, you will find people doing that. I
> catched a few brainwrecks who actually used:
>
>  irqdesc->core_internal_state__do_not_mess_with_it
>
> in their code.
>
> Now after having everything converted to accessors, you can add sanity
> checks into the accessors and emit WARN_ONCE() when they are used in the
> wrong context. That'll make them look and explain why they think that
> fiddling in the internals is a good idea.
>
Thanks Thomas for suggestion and looking into it. Sounds a good plan
to me to tackle this mess. I will give a try and hopefully with help
of those maintainers come up with a series first to fix the
existing bad users. As you said, fixing core will be simple after that.

Regards,
Santosh

  reply	other threads:[~2016-09-22 16:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <57e1b041.zRoBcsxStpPQoyeo%akpm@linux-foundation.org>
2016-09-21  5:18 ` + softirq-fix-tasklet_kill-and-its-users.patch added to -mm tree Sergey Senozhatsky
2016-09-21  8:09   ` Sergey Senozhatsky
2016-09-21 17:23     ` Santosh Shilimkar
2016-09-22  0:42       ` Sergey Senozhatsky
2016-09-22  2:31         ` Santosh Shilimkar
2016-09-22  7:05           ` Thomas Gleixner
2016-09-22 16:08             ` Santosh Shilimkar [this message]
2016-09-22 23:37             ` Stephen Rothwell

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=804abfd2-a8f7-c705-05e5-48230a579345@oracle.com \
    --to=santosh.shilimkar@oracle$(echo .)com \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=giovanni.cabiddu@intel$(echo .)com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=herbert@gondor$(echo .)apana.org.au \
    --cc=isdn@linux-pingi$(echo .)de \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=mingo@elte$(echo .)hu \
    --cc=mingo@kernel$(echo .)org \
    --cc=mm-commits@vger$(echo .)kernel.org \
    --cc=pebolle@tiscali$(echo .)nl \
    --cc=peterz@infradead$(echo .)org \
    --cc=salvatore.benedetto@intel$(echo .)com \
    --cc=sergey.senozhatsky.work@gmail$(echo .)com \
    --cc=sergey.senozhatsky@gmail$(echo .)com \
    --cc=sfr@canb$(echo .)auug.org.au \
    --cc=ssantosh@kernel$(echo .)org \
    --cc=tadeusz.struk@intel$(echo .)com \
    --cc=tglx@linutronix$(echo .)de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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