Re: [PATCH 5/7] riscv: mm: accelerate pagefault when badaccess

2024-04-02 Thread Suren Baghdasaryan
On Tue, Apr 2, 2024 at 12:53 AM Kefeng Wang wrote: > > The vm_flags of vma already checked under per-VMA lock, if it is a > bad access, directly handle error and return, there is no need to > lock_mm_and_find_vma() and check vm_flags again. > > Signed-off-by: Kefeng Wang Reviewed-by: Suren

Re: [PATCH 4/7] powerpc: mm: accelerate pagefault when badaccess

2024-04-02 Thread Suren Baghdasaryan
On Tue, Apr 2, 2024 at 12:53 AM Kefeng Wang wrote: > > The vm_flags of vma already checked under per-VMA lock, if it is a > bad access, directly handle error and return, there is no need to > lock_mm_and_find_vma() and check vm_flags again. > > Signed-off-by: Kefeng Wang Code-wise looks correct

Re: [PATCH 3/7] arm: mm: accelerate pagefault when VM_FAULT_BADACCESS

2024-04-02 Thread Suren Baghdasaryan
On Tue, Apr 2, 2024 at 12:53 AM Kefeng Wang wrote: > > The vm_flags of vma already checked under per-VMA lock, if it is a > bad access, directly set fault to VM_FAULT_BADACCESS and handle error, > so no need to lock_mm_and_find_vma() and check vm_flags again. > > Signed-off-by: Kefeng Wang

Re: [PATCH 2/7] arm64: mm: accelerate pagefault when VM_FAULT_BADACCESS

2024-04-02 Thread Suren Baghdasaryan
On Tue, Apr 2, 2024 at 10:19 PM Suren Baghdasaryan wrote: > > On Tue, Apr 2, 2024 at 12:53 AM Kefeng Wang > wrote: > > > > The vm_flags of vma already checked under per-VMA lock, if it is a > > bad access, directly set fault to VM_FAULT_BADACCESS and handle error, > > no need to

Re: [PATCH 2/7] arm64: mm: accelerate pagefault when VM_FAULT_BADACCESS

2024-04-02 Thread Suren Baghdasaryan
On Tue, Apr 2, 2024 at 12:53 AM Kefeng Wang wrote: > > The vm_flags of vma already checked under per-VMA lock, if it is a > bad access, directly set fault to VM_FAULT_BADACCESS and handle error, > no need to lock_mm_and_find_vma() and check vm_flags again, the latency > time reduce 34% in lmbench

Re: [PATCH] serial: pmac_zilog: Drop usage of platform_driver_probe()

2024-04-02 Thread Michael Ellerman
Uwe Kleine-König writes: > There are considerations to drop platform_driver_probe() as a concept > that isn't relevant any more today. It comes with an added complexity > that makes many users hold it wrong. (E.g. this driver should have > marked the driver struct with __refdata to prevent the

Re: [PATCH 1/7] arm64: mm: cleanup __do_page_fault()

2024-04-02 Thread Suren Baghdasaryan
On Tue, Apr 2, 2024 at 12:53 AM Kefeng Wang wrote: > > The __do_page_fault() only check vma->flags and call handle_mm_fault(), > and only called by do_page_fault(), let's squash it into do_page_fault() > to cleanup code. > > Signed-off-by: Kefeng Wang Reviewed-by: Suren Baghdasaryan > --- >

Re: [PATCH v4 05/13] mm/arch: Provide pud_pfn() fallback

2024-04-02 Thread Peter Xu
On Tue, Apr 02, 2024 at 07:53:20PM -0300, Jason Gunthorpe wrote: > On Tue, Apr 02, 2024 at 06:43:56PM -0400, Peter Xu wrote: > > > I actually tested this without hitting the issue (even though I didn't > > mention it in the cover letter..). I re-kicked the build test, it turns > > out my "make

Re: [PATCH v4 05/13] mm/arch: Provide pud_pfn() fallback

2024-04-02 Thread Jason Gunthorpe
On Tue, Apr 02, 2024 at 06:43:56PM -0400, Peter Xu wrote: > I actually tested this without hitting the issue (even though I didn't > mention it in the cover letter..). I re-kicked the build test, it turns > out my "make alldefconfig" on loongarch will generate a config with both > HUGETLB=n &&

Re: [PATCH v4 05/13] mm/arch: Provide pud_pfn() fallback

2024-04-02 Thread Peter Xu
On Tue, Apr 02, 2024 at 12:05:49PM -0700, Nathan Chancellor wrote: > Hi Peter (and LoongArch folks), > > On Wed, Mar 27, 2024 at 11:23:24AM -0400, pet...@redhat.com wrote: > > From: Peter Xu > > > > The comment in the code explains the reasons. We took a different approach > > comparing to

Re: [PATCH v1 3/3] mm: use "GUP-fast" instead "fast GUP" in remaining comments

2024-04-02 Thread Jason Gunthorpe
On Tue, Apr 02, 2024 at 02:55:16PM +0200, David Hildenbrand wrote: > Let's fixup the remaining comments to consistently call that thing > "GUP-fast". With this change, we consistently call it "GUP-fast". > > Reviewed-by: Mike Rapoport (IBM) > Signed-off-by: David Hildenbrand > --- >

Re: [PATCH v1 2/3] mm/treewide: rename CONFIG_HAVE_FAST_GUP to CONFIG_HAVE_GUP_FAST

2024-04-02 Thread Jason Gunthorpe
On Tue, Apr 02, 2024 at 02:55:15PM +0200, David Hildenbrand wrote: > Nowadays, we call it "GUP-fast", the external interface includes > functions like "get_user_pages_fast()", and we renamed all internal > functions to reflect that as well. > > Let's make the config option reflect that. > >

Re: [PATCH 2/9] dma: Convert from tasklet to BH workqueue

2024-04-02 Thread Vinod Koul
On 02-04-24, 14:25, Linus Walleij wrote: > Hi Allen, > > thanks for your patch! > > On Wed, Mar 27, 2024 at 5:03 PM Allen Pais wrote: > > > The only generic interface to execute asynchronously in the BH context is > > tasklet; however, it's marked deprecated and has some design flaws. To > >

Re: [PATCH 7/9] s390: Convert from tasklet to BH workqueue

2024-04-02 Thread Alexandra Winter
On 27.03.24 17:03, Allen Pais wrote: > The only generic interface to execute asynchronously in the BH context is > tasklet; however, it's marked deprecated and has some design flaws. To > replace tasklets, BH workqueue support was recently added. A BH workqueue > behaves similarly to regular

Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-04-02 Thread Linus Walleij
On Fri, Mar 22, 2024 at 2:27 PM Wolfram Sang wrote: > Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C > v7, SMBus 3.2, I3C specifications and replace "master/slave" with more > appropriate terms. For some drivers, this means no more conversions are > needed. For the others

Re: [PATCH 2/9] dma: Convert from tasklet to BH workqueue

2024-04-02 Thread Linus Walleij
Hi Allen, thanks for your patch! On Wed, Mar 27, 2024 at 5:03 PM Allen Pais wrote: > The only generic interface to execute asynchronously in the BH context is > tasklet; however, it's marked deprecated and has some design flaws. To > replace tasklets, BH workqueue support was recently added. A

Re: [PATCH 9/9] mmc: Convert from tasklet to BH workqueue

2024-04-02 Thread Ulf Hansson
On Thu, 28 Mar 2024 at 17:21, Tejun Heo wrote: > > Hello, > > On Thu, Mar 28, 2024 at 01:53:25PM +0100, Ulf Hansson wrote: > > At this point we have suggested to drivers to switch to use threaded > > irq handlers (and regular work queues if needed too). That said, > > what's the benefit of using

Re: [PATCH v4 05/13] mm/arch: Provide pud_pfn() fallback

2024-04-02 Thread Nathan Chancellor
Hi Peter (and LoongArch folks), On Wed, Mar 27, 2024 at 11:23:24AM -0400, pet...@redhat.com wrote: > From: Peter Xu > > The comment in the code explains the reasons. We took a different approach > comparing to pmd_pfn() by providing a fallback function. > > Another option is to provide some

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread David Hildenbrand
On 02.04.24 19:57, Peter Xu wrote: On Tue, Apr 02, 2024 at 06:39:31PM +0200, David Hildenbrand wrote: On 02.04.24 18:20, Peter Xu wrote: On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: On 02.04.24 16:48, Ryan Roberts wrote: Hi Peter, Hey, Ryan, Thanks for the report!

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread Peter Xu
On Tue, Apr 02, 2024 at 05:46:57PM +0100, Ryan Roberts wrote: > I'll leave you to do the testing on this, if that's ok. Definitely. I'll test and send formal patches. > > Just to make my config explicit, I have this kernel command line, which > reserves > hugetlbs of all sizes for the tests:

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread Peter Xu
On Tue, Apr 02, 2024 at 06:39:31PM +0200, David Hildenbrand wrote: > On 02.04.24 18:20, Peter Xu wrote: > > On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: > > > On 02.04.24 16:48, Ryan Roberts wrote: > > > > Hi Peter, > > > > Hey, Ryan, > > > > Thanks for the report! > > > >

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread Ryan Roberts
On 02/04/2024 17:20, Peter Xu wrote: > On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: >> On 02.04.24 16:48, Ryan Roberts wrote: >>> Hi Peter, > > Hey, Ryan, > > Thanks for the report! > >>> >>> On 27/03/2024 15:23, pet...@redhat.com wrote: From: Peter Xu Now

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread David Hildenbrand
On 02.04.24 18:00, Matthew Wilcox wrote: On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: The oops trigger is at mm/gup.c:778: VM_BUG_ON_PAGE(!PageHead(page) && !is_zone_device_page(page), page); So 2M passed ok, and its failing for 32M, which is cont-pmd. I'm guessing

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread David Hildenbrand
On 02.04.24 18:20, Peter Xu wrote: On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: On 02.04.24 16:48, Ryan Roberts wrote: Hi Peter, Hey, Ryan, Thanks for the report! On 27/03/2024 15:23, pet...@redhat.com wrote: From: Peter Xu Now follow_page() is ready to handle

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread Peter Xu
On Tue, Apr 02, 2024 at 05:18:36PM +0100, Ryan Roberts wrote: > On 02/04/2024 17:00, Matthew Wilcox wrote: > > On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: > >>> The oops trigger is at mm/gup.c:778: > >>> VM_BUG_ON_PAGE(!PageHead(page) && !is_zone_device_page(page), page); >

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread Peter Xu
On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: > On 02.04.24 16:48, Ryan Roberts wrote: > > Hi Peter, Hey, Ryan, Thanks for the report! > > > > On 27/03/2024 15:23, pet...@redhat.com wrote: > > > From: Peter Xu > > > > > > Now follow_page() is ready to handle hugetlb

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread Ryan Roberts
On 02/04/2024 17:00, Matthew Wilcox wrote: > On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: >>> The oops trigger is at mm/gup.c:778: >>> VM_BUG_ON_PAGE(!PageHead(page) && !is_zone_device_page(page), page); >>> >>> So 2M passed ok, and its failing for 32M, which is cont-pmd. I'm

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread Matthew Wilcox
On Tue, Apr 02, 2024 at 05:26:28PM +0200, David Hildenbrand wrote: > > The oops trigger is at mm/gup.c:778: > > VM_BUG_ON_PAGE(!PageHead(page) && !is_zone_device_page(page), page); > > > > So 2M passed ok, and its failing for 32M, which is cont-pmd. I'm guessing > > you're trying to iterate 2M

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread David Hildenbrand
On 02.04.24 16:48, Ryan Roberts wrote: Hi Peter, On 27/03/2024 15:23, pet...@redhat.com wrote: From: Peter Xu Now follow_page() is ready to handle hugetlb pages in whatever form, and over all architectures. Switch to the generic code path. Time to retire hugetlb_follow_page_mask(),

Re: [PATCH v4 13/13] mm/gup: Handle hugetlb in the generic follow_page_mask code

2024-04-02 Thread Ryan Roberts
Hi Peter, On 27/03/2024 15:23, pet...@redhat.com wrote: > From: Peter Xu > > Now follow_page() is ready to handle hugetlb pages in whatever form, and > over all architectures. Switch to the generic code path. > > Time to retire hugetlb_follow_page_mask(), following the previous > retirement

Re: [Revert commit 27f58c04a8f438078583041468ec60597841284d] [linux-next] [6.9.0-rc1-next-20240328] WARNING: CPU: 9 PID: 209 at drivers/scsi/sg.c:2236 sg_remove_sfp_usercontext+0x270/0x280 [sg]

2024-04-02 Thread Alexander Wetzel
On 02.04.24 15:51, Venkat Rao Bagalkote wrote: Greetings!! Below warnings is observed with the commit 27f58c04a8f438078583041468ec60597841284d. Once reverting the above commit id, issue is resloved. Please help in fixing this issue. The fix for that is currently in review:

[Revert commit 27f58c04a8f438078583041468ec60597841284d] [linux-next] [6.9.0-rc1-next-20240328] WARNING: CPU: 9 PID: 209 at drivers/scsi/sg.c:2236 sg_remove_sfp_usercontext+0x270/0x280 [sg]

2024-04-02 Thread Venkat Rao Bagalkote
Greetings!! Below warnings is observed with the commit 27f58c04a8f438078583041468ec60597841284d. Once reverting the above commit id, issue is resloved. Please help in fixing this issue. 470.425710] [ cut here ] [ 470.425728] WARNING: CPU: 5 PID: 226 at

[PATCH v1 3/3] mm: use "GUP-fast" instead "fast GUP" in remaining comments

2024-04-02 Thread David Hildenbrand
Let's fixup the remaining comments to consistently call that thing "GUP-fast". With this change, we consistently call it "GUP-fast". Reviewed-by: Mike Rapoport (IBM) Signed-off-by: David Hildenbrand --- mm/filemap.c| 2 +- mm/khugepaged.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v1 2/3] mm/treewide: rename CONFIG_HAVE_FAST_GUP to CONFIG_HAVE_GUP_FAST

2024-04-02 Thread David Hildenbrand
Nowadays, we call it "GUP-fast", the external interface includes functions like "get_user_pages_fast()", and we renamed all internal functions to reflect that as well. Let's make the config option reflect that. Reviewed-by: Mike Rapoport (IBM) Signed-off-by: David Hildenbrand ---

[PATCH v1 0/3] mm/gup: consistently call it GUP-fast

2024-04-02 Thread David Hildenbrand
Some cleanups around function names, comments and the config option of "GUP-fast" -- GUP without "lock" safety belts on. With this cleanup it's easy to judge which functions are GUP-fast specific. We now consistently call it "GUP-fast", avoiding mixing it with "fast GUP", "lockless", or simply

[PATCH v1 1/3] mm/gup: consistently name GUP-fast functions

2024-04-02 Thread David Hildenbrand
Let's consistently call the "fast-only" part of GUP "GUP-fast" and rename all relevant internal functions to start with "gup_fast", to make it clearer that this is not ordinary GUP. The current mixture of "lockless", "gup" and "gup_fast" is confusing. Further, avoid the term "huge" when talking

Re: [PATCH v3 2/2] powerpc/bpf: enable kfunc call

2024-04-02 Thread Christophe Leroy
Le 02/04/2024 à 12:58, Hari Bathini a écrit : > Currently, bpf jit code on powerpc assumes all the bpf functions and > helpers to be kernel text. This is false for kfunc case, as function > addresses can be module addresses as well. So, ensure module addresses > are supported to enable kfunc

Re: [PATCH v3 1/2] powerpc64/bpf: fix tail calls for PCREL addressing

2024-04-02 Thread Christophe Leroy
Le 02/04/2024 à 12:58, Hari Bathini a écrit : > With PCREL addressing, there is no kernel TOC. So, it is not setup in > prologue when PCREL addressing is used. But the number of instructions > to skip on a tail call was not adjusted accordingly. That resulted in > not so obvious failures while

[PATCH v3 1/2] powerpc64/bpf: fix tail calls for PCREL addressing

2024-04-02 Thread Hari Bathini
With PCREL addressing, there is no kernel TOC. So, it is not setup in prologue when PCREL addressing is used. But the number of instructions to skip on a tail call was not adjusted accordingly. That resulted in not so obvious failures while using tailcalls. 'tailcalls' selftest crashed the system

[PATCH v3 2/2] powerpc/bpf: enable kfunc call

2024-04-02 Thread Hari Bathini
Currently, bpf jit code on powerpc assumes all the bpf functions and helpers to be kernel text. This is false for kfunc case, as function addresses can be module addresses as well. So, ensure module addresses are supported to enable kfunc support. Emit instructions based on whether the function

Re: [PATCH 2/2] usb: typec: nvidia: drop driver owner assignment

2024-04-02 Thread Heikki Krogerus
On Wed, Mar 27, 2024 at 06:46:09PM +0100, Krzysztof Kozlowski wrote: > Core in typec_altmode_register_driver() already sets the .owner, so > driver does not need to. > > Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heikki Krogerus > --- > drivers/usb/typec/altmodes/nvidia.c | 1 - > 1

Re: [PATCH 1/2] usb: phy: fsl-usb: drop driver owner assignment

2024-04-02 Thread Heikki Krogerus
On Wed, Mar 27, 2024 at 06:46:08PM +0100, Krzysztof Kozlowski wrote: > Core in platform_driver_register() already sets the .owner, so driver > does not need to. > > Signed-off-by: Krzysztof Kozlowski Reviewed-by: Heikki Krogerus > --- > drivers/usb/phy/phy-fsl-usb.c | 1 - > 1 file changed,

[PATCH 7/7] x86: mm: accelerate pagefault when badaccess

2024-04-02 Thread Kefeng Wang
The vm_flags of vma already checked under per-VMA lock, if it is a bad access, directly handle error and return, there is no need to lock_mm_and_find_vma() and check vm_flags again. Signed-off-by: Kefeng Wang --- arch/x86/mm/fault.c | 23 ++- 1 file changed, 14

[PATCH 1/7] arm64: mm: cleanup __do_page_fault()

2024-04-02 Thread Kefeng Wang
The __do_page_fault() only check vma->flags and call handle_mm_fault(), and only called by do_page_fault(), let's squash it into do_page_fault() to cleanup code. Signed-off-by: Kefeng Wang --- arch/arm64/mm/fault.c | 27 +++ 1 file changed, 7 insertions(+), 20

[PATCH 6/7] s390: mm: accelerate pagefault when badaccess

2024-04-02 Thread Kefeng Wang
The vm_flags of vma already checked under per-VMA lock, if it is a bad access, directly handle error and return, there is no need to lock_mm_and_find_vma() and check vm_flags again. Signed-off-by: Kefeng Wang --- arch/s390/mm/fault.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 0/7] arch/mm/fault: accelerate pagefault when badaccess

2024-04-02 Thread Kefeng Wang
After VMA lock-based page fault handling enabled, if bad access met under per-vma lock, it will fallback to mmap_lock-based handling, so it leads to unnessary mmap lock and vma find again. A test from lmbench shows 34% improve after this changes on arm64, lat_sig -P 1 prot lat_sig 0.29194 ->

[PATCH 5/7] riscv: mm: accelerate pagefault when badaccess

2024-04-02 Thread Kefeng Wang
The vm_flags of vma already checked under per-VMA lock, if it is a bad access, directly handle error and return, there is no need to lock_mm_and_find_vma() and check vm_flags again. Signed-off-by: Kefeng Wang --- arch/riscv/mm/fault.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH 4/7] powerpc: mm: accelerate pagefault when badaccess

2024-04-02 Thread Kefeng Wang
The vm_flags of vma already checked under per-VMA lock, if it is a bad access, directly handle error and return, there is no need to lock_mm_and_find_vma() and check vm_flags again. Signed-off-by: Kefeng Wang --- arch/powerpc/mm/fault.c | 33 - 1 file changed, 20

[PATCH 3/7] arm: mm: accelerate pagefault when VM_FAULT_BADACCESS

2024-04-02 Thread Kefeng Wang
The vm_flags of vma already checked under per-VMA lock, if it is a bad access, directly set fault to VM_FAULT_BADACCESS and handle error, so no need to lock_mm_and_find_vma() and check vm_flags again. Signed-off-by: Kefeng Wang --- arch/arm/mm/fault.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH 2/7] arm64: mm: accelerate pagefault when VM_FAULT_BADACCESS

2024-04-02 Thread Kefeng Wang
The vm_flags of vma already checked under per-VMA lock, if it is a bad access, directly set fault to VM_FAULT_BADACCESS and handle error, no need to lock_mm_and_find_vma() and check vm_flags again, the latency time reduce 34% in lmbench 'lat_sig -P 1 prot lat_sig'. Signed-off-by: Kefeng Wang ---

Re: Appropriate liburcu cache line size for Power

2024-04-02 Thread Michael Ellerman
Mathieu Desnoyers writes: > On 2024-03-26 03:19, Michael Ellerman wrote: >> Mathieu Desnoyers writes: >>> In the powerpc architecture support within the liburcu project [1] >>> we have a cache line size defined as 256 bytes with the following >>> comment: >>> >>> /* Include size of POWER5+ L3

[PATCH v5 RESEND] arch/powerpc/kvm: Add support for reading VPA counters for pseries guests

2024-04-02 Thread Gautam Menghani
PAPR hypervisor has introduced three new counters in the VPA area of LPAR CPUs for KVM L2 guest (see [1] for terminology) observability - 2 for context switches from host to guest and vice versa, and 1 counter for getting the total time spent inside the KVM guest. Add a tracepoint that enables

Re: [PATCH] powerpc/crypto/chacha-p10: Fix failure on non Power10

2024-04-02 Thread Herbert Xu
On Fri, Mar 29, 2024 at 12:02:00AM +1100, Michael Ellerman wrote: > The chacha-p10-crypto module provides optimised chacha routines for > Power10. It also selects CRYPTO_ARCH_HAVE_LIB_CHACHA which says it > provides chacha_crypt_arch() to generic code. > > Notably the module needs to provide

Re: [PATCH v3] scsi: sg: Avoid race in error handling & drop bogus warn

2024-04-02 Thread Sachin Sant
> On 2 Apr 2024, at 12:40 AM, Alexander Wetzel wrote: > > commit 27f58c04a8f4 ("scsi: sg: Avoid sg device teardown race") > introduced an incorrect WARN_ON_ONCE() and missed a sequence where > sg_device_destroy() was used after scsi_device_put(). > > sg_device_destroy() is accessing the