Re: [PATCH v2 13/76] ARC: Low level IRQ/Trap/Exception Handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 19 January 2013 09:01 AM, Al Viro wrote:
> On Fri, Jan 18, 2013 at 05:54:27PM +0530, Vineet Gupta wrote:
>
>> +	; --- (Slow Path #3) notify_resume ---
>> +.Lchk_notify_resume:
>> +	btst   r9, TIF_NOTIFY_RESUME
>> +	blnz   @do_notify_resume
>> +	b      resume_user_mode_begin	; unconditionally back to U mode ret chks
>> +					; for single exit point from this block
> Umm...  Can we even get there without NOTIFY_RESUME?  Again, there's
> future-proofing and there's laying minefields - think what will happen
> if we *do* get there with some bit in _TIF_WORK_MASK that isn't recognized
> by any of these cases.  Looping forever?

IMHO, for future safe-ing, the test for TIF_NOTIFY_RESUME is correct (as we will
need to add that check the moment a new bit is introduced in _TIF_WORK_MASK).

Regarding the infinite loop, I would assume that _TIF_WORK_MASK is golden (fixed
by your prior comment) so anyone touching it needs to add corresponding code here
- IMHO we don't need to handle that scenario (maybe add a comment in
thread_info.h). With that assumption, the unconditional branch would go back to
start and the re-test for TIF_WORK_MASK will break the loop even if any stray bit
was set.

So essentially we don't need any code change ! Am I overlooking something here ?

-Vineet
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux