The memory returned from dma_alloc_coherent is opaqueue to the user,
thus the exact way of page refcounting shall not matter either.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/drm_bufs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_bufs.c b
Hi all,
various architectures have used exact memory allocations for dma
allocations for a long time, but x86 and thus the common code based
on it kept using our normal power of two allocator, which tends to
waste a lot of memory for certain allocations.
Switching to a slightly cleaned up alloc_p
We are not allowed to call virt_to_page on pages returned from
dma_alloc_coherent, as in many cases the virtual address returned
is aactually a kernel direct mapping. Also there generally is no
need to mark dma memory as reserved.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/drm_bufs.c
dma_alloc_coherent is not just the page allocator. The only valid
arguments to pass are either GFP_ATOMIC or GFP_ATOMIC with possible
modifiers of __GFP_NORETRY or __GFP_NOWARN.
Signed-off-by: Christoph Hellwig
---
drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 3 +--
drivers/net/wireless
dma_alloc_coherent is not just the page allocator. The only valid
arguments to pass are either GFP_ATOMIC or GFP_ATOMIC with possible
modifiers of __GFP_NORETRY or __GFP_NOWARN.
Signed-off-by: Christoph Hellwig
---
drivers/infiniband/hw/hfi1/init.c | 22 +++---
1 file changed
Remove usage of the legacy drm PCI DMA wrappers, and with that the
incorrect usage cocktail of __GFP_COMP, virt_to_page on DMA allocation
and SetPageReserved.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/i915/i915_gem.c| 30 +-
drivers/gpu/drm/i915
These functions are rather broken in that they try to pass __GFP_COMP
to dma_alloc_coherent, call virt_to_page on the return value and
mess with PageReserved. And not actually used by any modern driver.
Signed-off-by: Christoph Hellwig
---
drivers/gpu/drm/drm_bufs.c | 85
dma_alloc_coherent is not just the page allocator. The only valid
arguments to pass are either GFP_ATOMIC or GFP_ATOMIC with possible
modifiers of __GFP_NORETRY or __GFP_NOWARN.
Signed-off-by: Christoph Hellwig
---
drivers/s390/net/ism_drv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion
comedi_buf.c abuse the DMA API in gravely broken ways, as it assumes it
can call virt_to_page on the result, and the just remap it as uncached
using vmap. Disable the driver until this API abuse has been fixed.
Signed-off-by: Christoph Hellwig
---
drivers/staging/comedi/Kconfig | 1 +
1 file
dma_alloc_coherent is not just the page allocator. The only valid
arguments to pass are either GFP_ATOMIC or GFP_ATOMIC with possible
modifiers of __GFP_NORETRY or __GFP_NOWARN.
Signed-off-by: Christoph Hellwig
---
drivers/net/ethernet/broadcom/cnic.c | 4 ++--
1 file changed, 2 insertions
This fits in with the naming scheme used by alloc_pages_node.
Signed-off-by: Christoph Hellwig
---
include/linux/gfp.h | 2 +-
mm/page_alloc.c | 4 ++--
mm/page_ext.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index
dma_alloc_coherent is not just the page allocator. The only valid
arguments to pass are either GFP_ATOMIC or GFP_ATOMIC with possible
modifiers of __GFP_NORETRY or __GFP_NOWARN.
Signed-off-by: Christoph Hellwig
---
drivers/infiniband/hw/qib/qib_iba6120.c | 2 +-
drivers/infiniband/hw/qib
No need to duplicate the logic over two functions that are almost the
same.
Signed-off-by: Christoph Hellwig
---
include/linux/gfp.h | 5 +++--
mm/page_alloc.c | 39 +++
2 files changed, 10 insertions(+), 34 deletions(-)
diff --git a/include/linux/gfp.h
.
Signed-off-by: Christoph Hellwig
---
arch/arm/mm/dma-mapping.c | 17 -
kernel/dma/mapping.c | 9 +
2 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 0a75058c11f3..86135feb2c05 100644
--- a/arch
as well.
Signed-off-by: Christoph Hellwig
---
include/linux/dma-contiguous.h | 8 +---
kernel/dma/contiguous.c| 17 +++--
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/linux/dma-contiguous.h b/include/linux/dma-contiguous.h
index c05d4e661489
On Fri, Jun 14, 2019 at 02:15:44PM +, David Laight wrote:
> Does this still guarantee that requests for 16k will not cross a 16k boundary?
> It looks like you are losing the alignment parameter.
The DMA API never gave you alignment guarantees to start with,
and you can get not naturally aligne
On Fri, Jun 14, 2019 at 04:02:39PM +0200, Greg KH wrote:
> Perhaps a hint as to how we can fix this up? This is the first time
> I've heard of the comedi code not handling dma properly.
It can be fixed by:
a) never calling virt_to_page (or vmalloc_to_page for that matter)
on dma allocation
On Fri, Jun 14, 2019 at 03:01:22PM +, David Laight wrote:
> I'm pretty sure there is a lot of code out there that makes that assumption.
> Without it many drivers will have to allocate almost double the
> amount of memory they actually need in order to get the required alignment.
> So instead o
On Fri, Jun 14, 2019 at 04:05:33PM +0100, Robin Murphy wrote:
> That said, I don't believe this particular patch should make any
> appreciable difference - alloc_pages_exact() is still going to give back
> the same base address as the rounded up over-allocation would, and
> PAGE_ALIGN()ing the s
On Fri, Jun 14, 2019 at 05:30:32PM +0200, Greg KH wrote:
> On Fri, Jun 14, 2019 at 04:48:57PM +0200, Christoph Hellwig wrote:
> > On Fri, Jun 14, 2019 at 04:02:39PM +0200, Greg KH wrote:
> > > Perhaps a hint as to how we can fix this up? This is the first time
> > > I&
e-allocated one isn't
> enough for the whole request.
>
> Reviewed by: Ewan D. Milne
> Signed-off-by: Ming Lei
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdr
e-allocated one isn't enough
> for the whole request.
>
> Reviewed-by: Ewan D. Milne
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
e-allocated one
> isn't enough for the whole request.
>
> Reviewed-by: Ewan D. Milne
> Signed-off-by: Ming Lei
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdr
e-allocated one
> isn't enough for the whole request.
>
> Reviewed-by: Ewan D. Milne
> Signed-off-by: Ming Lei
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdr
> - for (i = 0; i < (len / bsize_elem); i++, buffer += bsize_elem) {
> - struct page *page = sg_page(&scatterlist[i]);
> + for (i = 0; i < (len / bsize_elem); i++, sg = sg_next(sg), buffer +=
> bsize_elem) {
Please split the overly long line.
> + struct page *page
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Same kmap issue here that will need addressing. Otherwise looks
good:
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
The patch itsel looks good, but another case of buggy kmap it seems:
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
On Mon, Jun 17, 2019 at 11:03:42AM +0800, Ming Lei wrote:
> Use the scatterlist iterators and remove direct indexing of the
> scatterlist array.
>
> This way allows us to pre-allocate one small scatterlist, which can be
> chained with one runtime allocated scatterlist if the pre-allocated one
> is
e-allocated one
> isn't enough for the whole request.
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
e-allocated one
> isn't enough for the whole request.
>
> Signed-off-by: Ming Lei
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
e-allocated one
> isn't enough for the whole request.
>
> Signed-off-by: Ming Lei
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
e-allocated one
> isn't enough for the whole request.
>
> Signed-off-by: Ming Lei
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
e-allocated one
> isn't enough for the whole request.
>
> Signed-off-by: Ming Lei
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
; This way allows us to pre-allocate one small scatterlist, which can be
> chained with one runtime allocated scatterlist if the pre-allocated one
> isn't enough for the whole request.
Looks good,
Reviewed-by: Christoph Hellwig
___
devel mai
> drivers/infiniband/hw/cxgb4/qp.c
>129 static int alloc_host_sq(struct c4iw_rdev *rdev, struct t4_sq *sq)
>130 {
>131 sq->queue = dma_alloc_coherent(&(rdev->lldi.pdev->dev),
> sq->memsize,
>132 &(sq->dma_addr), GFP_KERNEL);
>1
> + struct scatterlist *sg = *cur_sg ?:
> + (struct scatterlist *)scsi_sglist(srb);
> +
No need for the cast here. And I have to say I hate that GNU C
non-standard shortshut in ? :.
Why not simply:
struct scatterlist *sg = *cur_sg;
On Wed, Jun 19, 2019 at 01:29:03PM -0300, Jason Gunthorpe wrote:
> > Yes. This will blow up badly on many platforms, as sq->queue
> > might be vmapped, ioremapped, come from a pool without page backing.
>
> Gah, this addr gets fed into io_remap_pfn_range/remap_pfn_range too..
>
> Potnuri, you sh
>From the DMA point of view this looks good:
Reviewed-by: Christoph Hellwig
I still think that doing that SetPageReserved + remap_pfn_range
dance for the normal memory allocations is a bad idea. Just use
vm_insert_page on the page, in which case it doesn't need to be
marked as Reserv
On Fri, Jun 14, 2019 at 03:47:10PM +0200, Christoph Hellwig wrote:
> Switching to a slightly cleaned up alloc_pages_exact is pretty easy,
> but it turns out that because we didn't filter valid gfp_t flags
> on the DMA allocator, a bunch of drivers were passing __GFP_COMP
> to it
On Tue, Jul 02, 2019 at 11:48:44AM +0200, Arend Van Spriel wrote:
> You made me look ;-) Actually not touching my drivers so I'm off the hook.
> However, I was wondering if drivers could know so I decided to look into
> the DMA-API.txt documentation which currently states:
>
> """
> The flag para
On Mon, Sep 18, 2017 at 05:35:03PM +0200, Arnd Bergmann wrote:
> Probably not on a native Android device or even a Chromebook that
> ships a binder user space together with a kernel, but what about
> people using "anbox" or similar projects that allow you to run
> Android apps in a container?
>
>
On Mon, Sep 18, 2017 at 05:53:47PM +0200, Greg Kroah-Hartman wrote:
> > It seems like a legitimate use case of the binder modules, but
> > now there is a kernel Kconfig option that has to match a user
> > space binary.
>
> So, should we revert that?
>
> I don't really know what to suggest here, s
ot sure if Tejun is fine with using __WQ_LEGACY directly..
Except for this nit this looks fine to me:
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Please don' tcreate new subdirectories under include/linux
if you don't have to.
Also who outside of unisys has reviewed this whole code?
Instead of a move please send an actual patchset to add the new files
so people can review it just like any other code.
___
Hi David,
as said before, please submit the actual files as new code to the
kernel. The code will need a full review, and a simple move is not
going to cut it. Posting the actual code as patches will allow for the
proper review that is needed.
___
deve
Btw, can someone explain what 'gasket' even is? A quick look through
the directory didn't provide any answers. And please don't just send
that anser to me, put it in the source tree (Kconfig, and if needed
another documentation file).
___
devel mailing
> config ANDROID_BINDER_IPC
> bool "Android Binder IPC Driver"
> - depends on MMU
> + depends on MMU && !CPU_CACHE_VIVT
Thats is a purely arm specific symbol which should not be
used in common code. Nevermind that there generally should
be no good reason for it.
> + fixup->off
Thanks Stephen,
this looks good to me:
Reviewed-by: Christoph Hellwig
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Avoid most of the afinfo indirections and just call the proc helpers
directly.
Signed-off-by: Christoph Hellwig
---
include/net/tcp.h | 11 ++
net/ipv4/tcp_ipv4.c | 85 +
net/ipv6/tcp_ipv6.c | 27 +-
3 files changed, 53 insertions
Remove a couple indirections to make the code look like most other
protocols.
Signed-off-by: Christoph Hellwig
---
net/kcm/kcmproc.c | 71 ---
1 file changed, 17 insertions(+), 54 deletions(-)
diff --git a/net/kcm/kcmproc.c b/net/kcm/kcmproc.c
index
The shole seq_file sequence already operates under a single RCU lock pair,
so move the pid namespace lookup into it, and stop grabbing a reference
and remove all kinds of boilerplate code.
Signed-off-by: Christoph Hellwig
---
net/ipv6/ip6_flowlabel.c | 28 +---
1 file
Pass the hashtable to the proc private data instead of copying
it into the per-file private data.
Signed-off-by: Christoph Hellwig
---
include/net/raw.h | 4
net/ipv4/raw.c| 36
net/ipv6/raw.c| 6 --
3 files changed, 16 insertions(+), 30
Variant of proc_create_data that directly take a struct seq_operations
argument + a private state size and drastically reduces the boilerplate
code in the callers.
All trivial callers converted over.
Signed-off-by: Christoph Hellwig
---
drivers/s390/cio/blacklist.c | 21
We currently have hundreds of proc files that implement plain, read-only
seq_file based interfaces. This series consolidates them using new
procfs helpers that take the seq_operations or simple show callback
directly.
A git tree is available at:
git://git.infradead.org/users/hch/misc.git pro
And switch to proc_create_single_data.
Signed-off-by: Christoph Hellwig
---
drivers/isdn/capi/kcapi.c | 3 ++-
drivers/isdn/gigaset/capi.c| 16 +---
drivers/isdn/hardware/avm/avmcard.h| 4 ++--
drivers/isdn/hardware/avm/b1.c | 17
Variant of proc_create_data that directly take a seq_file show
callback and deals with network namespaces in ->open and ->release.
All callers of proc_create + single_open_net converted over, and
single_{open,release}_net are removed entirely.
Signed-off-by: Christoph Hellwig
---
f
And use proc private data directly instead of doing a detour
through seq->private.
Signed-off-by: Christoph Hellwig
---
drivers/net/bonding/bond_procfs.c | 36 ++-
1 file changed, 6 insertions(+), 30 deletions(-)
diff --git a/drivers/net/bonding/bond_procfs.c
And use proc private data directly instead of doing a detour
through seq->private and private state.
Signed-off-by: Christoph Hellwig
---
net/bluetooth/af_bluetooth.c | 40 +---
1 file changed, 5 insertions(+), 35 deletions(-)
diff --git a/net/blueto
Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls. Switch to use
proc_create_seq where applicable.
Signed-off-by: Christoph Hellwig
---
fs/jfs/jfs_debug.c| 43 ++-
fs/jfs
Just use the address family from the proc private data instead of copying
it into per-file data.
Signed-off-by: Christoph Hellwig
---
net/netfilter/x_tables.c | 39 +++
1 file changed, 11 insertions(+), 28 deletions(-)
diff --git a/net/netfilter/x_tables.c b
And use proc private data directly instead of doing a detour
through seq->private.
Signed-off-by: Christoph Hellwig
---
net/core/neighbour.c | 31 ++-
1 file changed, 6 insertions(+), 25 deletions(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
in
Use remove_proc_subtree to remove the whole subtree on cleanup instead
of a hand rolled list of proc entries, unwind the registration loop into
individual calls. Switch to use proc_create_single to further simplify
the code.
Signed-off-by: Christoph Hellwig
---
drivers/char/ipmi
Unwind the registration loop into individual calls. Switch to use
proc_create_single where applicable.
Signed-off-by: Christoph Hellwig
---
drivers/staging/rtl8192u/r8192U_core.c | 67 ++
1 file changed, 14 insertions(+), 53 deletions(-)
diff --git a/drivers/staging
Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls. Switch to use
proc_create_seq where applicable.
Signed-off-by: Christoph Hellwig
---
drivers/acpi/battery.c | 121 +
1 file changed
Remove a couple indirections to make the code look like most other
protocols.
Signed-off-by: Christoph Hellwig
---
include/net/udp.h | 20 --
net/ipv4/udp.c | 99 +-
net/ipv4/udplite.c | 21 +++---
net/ipv6/udp.c | 30
Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls. Switch to use
proc_create_seq where applicable.
Signed-off-by: Christoph Hellwig
---
fs/afs/proc.c | 134 ++
1 file changed
And use the root resource directly from the proc private data.
Signed-off-by: Christoph Hellwig
---
kernel/resource.c | 43 +--
1 file changed, 5 insertions(+), 38 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index 2af6c03858b9
Otherwise we will leak a reference to the network namespace.
Signed-off-by: Christoph Hellwig
---
net/can/bcm.c | 2 +-
net/can/proc.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/can/bcm.c b/net/can/bcm.c
index ac5e5e34fee3..8073fa14e143 100644
--- a/net/can
Remove the pointless ping_seq_afinfo indirection and make the code look
like most other protocols.
Signed-off-by: Christoph Hellwig
---
include/net/ping.h | 11 --
net/ipv4/ping.c| 50 +-
net/ipv6/ping.c| 35
Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls. Switch to use
proc_create_seq where applicable.
Signed-off-by: Christoph Hellwig
---
net/atm/proc.c | 65 ++
1 file changed, 7
Variants of proc_create{,_data} that directly take a seq_file show
callback and drastically reduces the boilerplate code in the callers.
All trivial callers converted over.
Signed-off-by: Christoph Hellwig
---
arch/arm/kernel/dma.c | 14 +---
arch/arm/kernel
Variants of proc_create{,_data} that directly take a struct seq_operations
argument and drastically reduces the boilerplate code in the callers.
All trivial callers converted over.
Signed-off-by: Christoph Hellwig
---
arch/ia64/hp/common/sba_iommu.c | 15 +-
arch/ia64/kernel/perfmon.c
And remove proc boilerplate code.
Signed-off-by: Christoph Hellwig
---
net/netfilter/x_tables.c | 42 ++--
1 file changed, 6 insertions(+), 36 deletions(-)
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 344dd01a5027..0e314f95a4a3
And remove proc boilerplate code.
Signed-off-by: Christoph Hellwig
---
net/atm/proc.c | 72 +-
1 file changed, 13 insertions(+), 59 deletions(-)
diff --git a/net/atm/proc.c b/net/atm/proc.c
index f272b0f59d82..0b0495a41bbe 100644
--- a/net/atm
Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls. Switch to use
proc_create_single.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/megaraid.c | 140 +++-
drivers/scsi/megaraid.h | 12
Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls. Switch to use
proc_create_seq where applicable.
Signed-off-by: Christoph Hellwig
---
drivers/misc/sgi-gru/gruprocfs.c | 81 ++--
1 file changed
The driver proc file hasn't been writeable for a long time, so this is
just dead code.
Signed-off-by: Christoph Hellwig
---
drivers/ide/ide-proc.c | 46 --
1 file changed, 46 deletions(-)
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
And stop messing with try_module_get on THIS_MODULE, which doesn't make
any sense here.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_int.h | 2 +-
drivers/block/drbd/drbd_main.c | 3 ++-
drivers/block/drbd/drbd_proc.c | 34 +-
3 files ch
And use proc private data directly instead of doing a detour
through seq->private.
Signed-off-by: Christoph Hellwig
---
.../net/wireless/intersil/hostap/hostap_ap.c | 70 ++---
.../net/wireless/intersil/hostap/hostap_hw.c | 17 +--
.../wireless/intersil/hostap/hostap_proc.c|
Signed-off-by: Christoph Hellwig
---
fs/proc/array.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/fs/proc/array.c b/fs/proc/array.c
index ae2c807fd719..b34796b562ef 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -677,7 +677,7 @@ get_children_pid
Variants of proc_create{,_data} that directly take a struct seq_operations
and deal with network namespaces in ->open and ->release. All callers of
proc_create + seq_open_net converted over, and seq_{open,release}_net are
removed entirely.
Signed-off-by: Christoph Hellwig
---
drivers/n
Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls. Switch to use
proc_create_seq where applicable.
Signed-off-by: Christoph Hellwig
---
drivers/scsi/sg.c | 124 +-
1 file changed
Use remove_proc_subtree to remove the whole subtree on cleanup, and
unwind the registration loop into individual calls. Switch to use
proc_create_seq where applicable.
Signed-off-by: Christoph Hellwig
---
fs/ext4/ext4.h| 2 +-
fs/ext4/mballoc.c | 29
fs/ext4
Just set up the show callback in the tty_operations, and use
proc_create_single_data to create the file without additional
boilerplace code.
Signed-off-by: Christoph Hellwig
---
arch/ia64/hp/sim/simserial.c| 15 +--
arch/xtensa/platforms/iss/console.c | 15
Just set up the show callback in the tty_operations, and use
proc_create_single_data to create the file without additional
boilerplace code.
Signed-off-by: Christoph Hellwig
---
drivers/ide/ide-cd.c | 15 +---
drivers/ide/ide-disk_proc.c | 62 ++--
drivers/ide/ide
This helper deals with single_{open,release}_net internals and thus
belongs here.
Signed-off-by: Christoph Hellwig
---
include/linux/seq_file_net.h | 13 +
include/net/ip_vs.h | 12
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/include/linux
And use proc private data directly instead of doing a detour
through seq->private.
Signed-off-by: Christoph Hellwig
---
net/netfilter/xt_hashlimit.c | 92 +++-
1 file changed, 18 insertions(+), 74 deletions(-)
diff --git a/net/netfilter/xt_hashlimit.c b/
And stop trying to get a reference on the submodule, procfs code deals
with release after and unloaded module and thus removed proc entry.
Signed-off-by: Christoph Hellwig
---
drivers/rtc/rtc-proc.c | 33 ++---
1 file changed, 2 insertions(+), 31 deletions(-)
diff
On Thu, Apr 19, 2018 at 09:57:50PM +0300, Alexey Dobriyan wrote:
> > git://git.infradead.org/users/hch/misc.git proc_create
>
>
> I want to ask if it is time to start using poorman function overloading
> with _b_c_e(). There are millions of allocation functions for example,
> all slightly dif
On Thu, Apr 19, 2018 at 03:10:27PM +0200, Alexandre Belloni wrote:
> On 19/04/2018 14:41:27+0200, Christoph Hellwig wrote:
> > And stop trying to get a reference on the submodule, procfs code deals
> > with release after and unloaded module and thus removed proc entry.
> >
&g
On Thu, Apr 19, 2018 at 10:29:29AM -0500, Corey Minyard wrote:
> On 04/19/2018 07:41 AM, Christoph Hellwig wrote:
>> Use remove_proc_subtree to remove the whole subtree on cleanup instead
>> of a hand rolled list of proc entries, unwind the registration loop into
>> individ
On Thu, Apr 19, 2018 at 05:18:18PM +0300, Dan Carpenter wrote:
> > -static const struct file_operations cio_ignore_proc_fops = {
> > - .open= cio_ignore_proc_open,
> > - .read= seq_read,
> > - .llseek = seq_lseek,
> > - .release = seq_release_private,
> > - .write = cio_ignore_
On Thu, Apr 19, 2018 at 09:50:27PM +0300, Alexey Dobriyan wrote:
> On Thu, Apr 19, 2018 at 02:41:04PM +0200, Christoph Hellwig wrote:
> > Variant of proc_create_data that directly take a struct seq_operations
>
> > --- a/fs/proc/internal.h
> > +++ b/fs/proc/internal.h
>
On Thu, Apr 19, 2018 at 09:41:06PM +0300, Alexey Dobriyan wrote:
> Should be oopsable.
> Once proc_create_data() returns, entry is live, ->open can be called.
Ok, switching to opencoding proc_create_data instead.
___
devel mailing list
de...@linuxdriverp
On Tue, Apr 24, 2018 at 08:19:16AM -0700, Andrew Morton wrote:
> > > I want to ask if it is time to start using poorman function overloading
> > > with _b_c_e(). There are millions of allocation functions for example,
> > > all slightly difference, and people will add more. Seeing /proc interfaces
Otherwise we will leak a reference to the network namespace.
Signed-off-by: Christoph Hellwig
---
net/can/bcm.c | 2 +-
net/can/proc.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/can/bcm.c b/net/can/bcm.c
index ac5e5e34fee3..8073fa14e143 100644
--- a/net/can
Common code for creating a regular file. Factor out of proc_create_data, to
be reused by other functions soon.
Signed-off-by: Christoph Hellwig
---
fs/proc/generic.c | 44 +---
fs/proc/internal.h | 2 ++
2 files changed, 27 insertions(+), 19 deletions
Return registered entry on success, return NULL on failure and free the
passed in entry. Also expose it in internal.h as we'll start using it
in proc_net.c soon.
Signed-off-by: Christoph Hellwig
---
fs/proc/generic.c | 44 ++--
fs/proc/internal.h
101 - 200 of 402 matches
Mail list logo