Re: [PATCH] blk-throttle: fix NULL pointer dereference in throtl_schedule_pending_timer

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

 



On 06/06/2017 09:36 PM, Joseph Qi wrote:
> From: Joseph Qi <qijiang.qj@xxxxxxxxxxxxxxx>
> 
> I have encountered a NULL pointer dereference in
> throtl_schedule_pending_timer:
>   [  413.735396] BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
>   [  413.735535] IP: [<ffffffff812ebbbf>] throtl_schedule_pending_timer+0x3f/0x210
>   [  413.735643] PGD 22c8cf067 PUD 22cb34067 PMD 0
>   [  413.735713] Oops: 0000 [#1] SMP
>   ......
> 
> This is caused by the following case:
>   blk_throtl_bio
>     throtl_schedule_next_dispatch  <= sq is top level one without parent
>       throtl_schedule_pending_timer
>         sq_to_tg(sq)->td->throtl_slice  <= sq_to_tg(sq) returns NULL
> 
> Fix it by using sq_to_td instead of sq_to_tg(sq)->td, which will always
> return a valid td.

Applied, thanks.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux