Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1654516

RE: [PATCH] qed: Fix a sleep-in-interrupt bug in qed_int_sp_dpc

From "Mintz, Yuval" <Yuval.Mintz@cavium.com>
Newsgroups linux.kernel
Subject RE: [PATCH] qed: Fix a sleep-in-interrupt bug in qed_int_sp_dpc
Date 2017-05-31 20:10 +0200
Message-ID <tNgee-8ge-17@gated-at.bofh.it> (permalink)
References <tNcNk-5ZF-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> The driver may sleep in interrupt handling, and the function call path is:
> qed_int_sp_dpc (tasklet_init indicates it handles interrupt)
>   qed_int_attentions
>     qed_mcp_handle_events
>       qed_mcp_handle_link_change
>         qed_link_update
>           qed_fill_link
>             qed_mcp_get_media_type
>               qed_ptt_acquire
>                 usleep_range --> may sleep
> 
> To fix it, the "usleep_range" is replaced with "udelay".

Thanks for pointing this out, but I believe the fix isn't the right one.

The better option would be to propagate the PTT from the outside
instead of acquiring a new one - in the call stack you've shared
qed_mcp_link_change() held a PTT entry and we could have propagated
it all the way through.

I'll try sending a fix for this in the next couple of days.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] qed: Fix a sleep-in-interrupt bug in qed_int_sp_dpc Jia-Ju Bai <baijiaju1990@163.com> - 2017-05-31 16:30 +0200
  RE: [PATCH] qed: Fix a sleep-in-interrupt bug in qed_int_sp_dpc "Mintz, Yuval" <Yuval.Mintz@cavium.com> - 2017-05-31 20:10 +0200

csiph-web