Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-22 Thread Dan Carpenter
On Wed, May 20, 2015 at 10:51:34PM +, Dilger, Andreas wrote: > On 2015/05/20, 1:42 PM, "Dan Carpenter" wrote: > > >In Smatch, it the equivalent warning is turned off by default because > >there are too many false positives, but you can enable it with the > >--spammy flag. > > > >kchecker --sp

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-21 Thread Nikitas Angelinas
(Apologies for the double-posting to individual recipients; resending in plain text to get through vger list filters.) The current code does not have a bug in this path (until we find one, of course). nrs_resource_put_safe() releases references to the related NRS resource hierarchies and policies

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-21 Thread Drokin, Oleg
On May 21, 2015, at 11:12 AM, Dan Carpenter wrote: > Oh, sorry, I didn't read your patch very carefully. It won't cause a > deadlock. But I'm going to assume it's still not right until lustre > expert Acks it. I just took a closer look and it appears original code is buggy and the patch just p

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-21 Thread Dan Carpenter
Oh, sorry, I didn't read your patch very carefully. It won't cause a deadlock. But I'm going to assume it's still not right until lustre expert Acks it. How well do you understand lustre locking? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-21 Thread AdrianRemonda
On Tue, May 19, 2015 at 12:21:15AM +0300, Dan Carpenter wrote: > On Mon, May 18, 2015 at 08:34:51PM +0200, Adrian Remonda wrote: > > Fixed sparse warning: context imbalance in 'nrs_resource_put_safe' - > > 'different lock contexts for basic block' by releasing the lock on each > > iteration of the

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-20 Thread Dilger, Andreas
On 2015/05/20, 1:42 PM, "Dan Carpenter" wrote: >In Smatch, it the equivalent warning is turned off by default because >there are too many false positives, but you can enable it with the >--spammy flag. > >kchecker --spammy drivers/staging/lustre/lustre/ptlrpc/nrs.c > >drivers/staging/lustre/lustr

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-20 Thread Dan Carpenter
In Smatch, it the equivalent warning is turned off by default because there are too many false positives, but you can enable it with the --spammy flag. kchecker --spammy drivers/staging/lustre/lustre/ptlrpc/nrs.c drivers/staging/lustre/lustre/ptlrpc/nrs.c:512 nrs_resource_put_safe() warn: 'spin_l

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-20 Thread Dan Carpenter
On Wed, May 20, 2015 at 04:51:59PM +, Dilger, Andreas wrote: > On 2015/05/18, 3:21 PM, "Dan Carpenter" wrote: > > >On Mon, May 18, 2015 at 08:34:51PM +0200, Adrian Remonda wrote: > >> Fixed sparse warning: context imbalance in 'nrs_resource_put_safe' - > >> 'different lock contexts for basic

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-20 Thread Dilger, Andreas
On 2015/05/18, 3:21 PM, "Dan Carpenter" wrote: >On Mon, May 18, 2015 at 08:34:51PM +0200, Adrian Remonda wrote: >> Fixed sparse warning: context imbalance in 'nrs_resource_put_safe' - >> 'different lock contexts for basic block' by releasing the lock on each >> iteration of the for loop. >> > >T

Re: [PATCH 4/4] Staging: lustre: sparse lock warning fix

2015-05-18 Thread Dan Carpenter
On Mon, May 18, 2015 at 08:34:51PM +0200, Adrian Remonda wrote: > Fixed sparse warning: context imbalance in 'nrs_resource_put_safe' - > 'different lock contexts for basic block' by releasing the lock on each > iteration of the for loop. > That changelog doesn't sound correct at all. That's not