* Regression introduced with commit 2a0b4682e09d76 ("dm: convert dm_dev_internal.count from atomic_t to refcount_t)
@ 2018-02-01 14:54 Hannes Reinecke
0 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2018-02-01 14:54 UTC (permalink / raw)
To: Mike Snitzer, device-mapper development
Hi Mike,
yet another refcount_t regression:
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -451,15 +451,15 @@ int dm_get_device(struct dm_target *ti, const char
*path, fmode_t mode,
return r;
}
- atomic_set(&dd->count, 0);
+ refcount_set(&dd->count, 1);
list_add(&dd->list, &t->devices);
} else if (dd->dm_dev->mode != (mode | dd->dm_dev->mode)) {
r = upgrade_mode(dd, mode, t->md);
if (r)
return r;
+ refcount_inc(&dd->count);
}
- atomic_inc(&dd->count);
*result = dd->dm_dev;
return 0;
is _NOT_ an equivalent modification.
If the second 'if' claus is not taken, the reference count is never
increased and the system goes 'boom'.
Will be sending a patch shortly.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regression introduced with commit 2a0b4682e09d76 ("dm: convert dm_dev_internal.count from atomic_t to refcount_t)
[not found] <ac8161a5-22b7-4e3a-ad19-a300f1a0ee74@email.android.com>
@ 2018-02-01 16:16 ` Hannes Reinecke
2018-02-01 16:40 ` Mike Snitzer
0 siblings, 1 reply; 4+ messages in thread
From: Hannes Reinecke @ 2018-02-01 16:16 UTC (permalink / raw)
To: Mike Snitzer; +Cc: device-mapper development
On 02/01/2018 04:03 PM, Mike Snitzer wrote:
> Pretty sure that regression was already fixed.
>
> Which code are you looking at?
>
This is actually coming from mkp 4.16/scsi-fixes tree; might be that
you've fixed it up in the meantime.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regression introduced with commit 2a0b4682e09d76 ("dm: convert dm_dev_internal.count from atomic_t to refcount_t)
2018-02-01 16:16 ` Regression introduced with commit 2a0b4682e09d76 ("dm: convert dm_dev_internal.count from atomic_t to refcount_t) Hannes Reinecke
@ 2018-02-01 16:40 ` Mike Snitzer
2018-02-01 17:54 ` Hannes Reinecke
0 siblings, 1 reply; 4+ messages in thread
From: Mike Snitzer @ 2018-02-01 16:40 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: device-mapper development
On Thu, Feb 01 2018 at 11:16am -0500,
Hannes Reinecke <hare@suse.de> wrote:
> On 02/01/2018 04:03 PM, Mike Snitzer wrote:
> > Pretty sure that regression was already fixed.
> >
> > Which code are you looking at?
> >
> This is actually coming from mkp 4.16/scsi-fixes tree; might be that
> you've fixed it up in the meantime.
Please see:
http://git.kernel.org/linus/afc567a4977b2d798e05153dd131a3c8d4758c0c
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Regression introduced with commit 2a0b4682e09d76 ("dm: convert dm_dev_internal.count from atomic_t to refcount_t)
2018-02-01 16:40 ` Mike Snitzer
@ 2018-02-01 17:54 ` Hannes Reinecke
0 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2018-02-01 17:54 UTC (permalink / raw)
To: Mike Snitzer; +Cc: device-mapper development
On 02/01/2018 05:40 PM, Mike Snitzer wrote:
> On Thu, Feb 01 2018 at 11:16am -0500,
> Hannes Reinecke <hare@suse.de> wrote:
>
>> On 02/01/2018 04:03 PM, Mike Snitzer wrote:
>>> Pretty sure that regression was already fixed.
>>>
>>> Which code are you looking at?
>>>
>> This is actually coming from mkp 4.16/scsi-fixes tree; might be that
>> you've fixed it up in the meantime.
>
> Please see:
> http://git.kernel.org/linus/afc567a4977b2d798e05153dd131a3c8d4758c0c
>
Ah. THX.
Maybe I should talk to mkp to update the tree.
Anyway, thanks for the pointer.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-01 17:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ac8161a5-22b7-4e3a-ad19-a300f1a0ee74@email.android.com>
2018-02-01 16:16 ` Regression introduced with commit 2a0b4682e09d76 ("dm: convert dm_dev_internal.count from atomic_t to refcount_t) Hannes Reinecke
2018-02-01 16:40 ` Mike Snitzer
2018-02-01 17:54 ` Hannes Reinecke
2018-02-01 14:54 Hannes Reinecke
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.