# Re: \[PATCH V11 2/5\] vsprintf: refactor %pK code out of pointer()

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2017-11-29 11:54:33 
- List: netdev
- Page: https://ratatoskr.run/netdev/2017/11/5144139
- Thread: https://ratatoskr.run/netdev/2017/11/5143751/t.md

```text
On Wed, 29 Nov 2017 15:27:46 +1100
"Tobin C. Harding" [ref] wrote:

> On Tue, Nov 28, 2017 at 09:39:57PM -0500, Steven Rostedt wrote:
> > On Wed, 29 Nov 2017 13:05:02 +1100
> > "Tobin C. Harding" [ref] wrote:
> >   
> > > +		/*
> > > +		 * kptr_restrict==1 cannot be used in IRQ context
> > > +		 * because its test for CAP_SYSLOG would be meaningless.
> > > +		 */
> > > +		if (in_irq() || in_serving_softirq() || in_nmi())  
> > 
> > This could be replaced with:
> > 
> > 		if (!in_task())
> > 
> > Which is actually more efficient.  
> 
> thanks for the comment Steve. At this late stage in the game do you mind
> if I don't include this change in this set. The code line in question is
> only in the series because of refactoring. I'm comfortable arguing that
> improving efficiency is out of scope ;)

No problem. In fact, I can send this as a separate patch myself, on top
of your series.

-- Steve
```
