<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/bcma, branch v5.4.178</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.178</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.4.178'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2021-09-15T07:47:37Z</updated>
<entry>
<title>bcma: Fix memory leak for internally-handled cores</title>
<updated>2021-09-15T07:47:37Z</updated>
<author>
<name>Zenghui Yu</name>
<email>yuzenghui@huawei.com</email>
</author>
<published>2021-07-27T02:52:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5debec63a28fbdd654753c86c8ea42f1df34fc2c'/>
<id>urn:sha1:5debec63a28fbdd654753c86c8ea42f1df34fc2c</id>
<content type='text'>
[ Upstream commit b63aed3ff195130fef12e0af590f4838cf0201d8 ]

kmemleak reported that dev_name() of internally-handled cores were leaked
on driver unbinding. Let's use device_initialize() to take refcounts for
them and put_device() to properly free the related stuff.

While looking at it, there's another potential issue for those which should
be *registered* into driver core. If device_register() failed, we put
device once and freed bcma_device structures. In bcma_unregister_cores(),
they're treated as unregistered and we hit both UAF and double-free. That
smells not good and has also been fixed now.

Fixes: ab54bc8460b5 ("bcma: fill core details for every device")
Signed-off-by: Zenghui Yu &lt;yuzenghui@huawei.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20210727025232.663-2-yuzenghui@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>bcma: make arrays pwr_info_offset and sprom_sizes static const, shrinks object size</title>
<updated>2019-09-13T13:44:49Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-09-05T16:20:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c57391f4157256a86c85424a16285d27ba92035c'/>
<id>urn:sha1:c57391f4157256a86c85424a16285d27ba92035c</id>
<content type='text'>
Arrays pwr_info_offset and sprom_sizes can be make static const rather
than populating them on the stack. Shrinks object size by 236 bytes.

Before:
   text	   data	    bss	    dec	    hex	filename
  11300	   1320	     64	  12684	   318c	drivers/bcma/sprom.o

After:
   text	   data	    bss	    dec	    hex	filename
  10904	   1480	     64	  12448	   30a0	drivers/bcma/sprom.o

(gcc version 9.2.1, amd64)

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>bcma: fix incorrect update of BCMA_CORE_PCI_MDIO_DATA</title>
<updated>2019-09-03T13:44:02Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2019-08-27T08:16:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=420c20be08a4597404d272ae9793b642401146eb'/>
<id>urn:sha1:420c20be08a4597404d272ae9793b642401146eb</id>
<content type='text'>
An earlier commit re-worked the setting of the bitmask and is now
assigning v with some bit flags rather than bitwise or-ing them
into v, consequently the earlier bit-settings of v are being lost.
Fix this by replacing an assignment with the bitwise or instead.

Addresses-Coverity: ("Unused value")
Fixes: 2be25cac8402 ("bcma: add constants for PCI and use them")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>bcma: remove two unused variables</title>
<updated>2019-09-03T13:37:53Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-08-09T08:53:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0a60e0aa495ff86aaee14b543f3ddab5d1327607'/>
<id>urn:sha1:0a60e0aa495ff86aaee14b543f3ddab5d1327607</id>
<content type='text'>
drivers/bcma/driver_mips.c:70:18: warning:
 ipsflag_irq_shift defined but not used [-Wunused-const-variable=]
drivers/bcma/driver_mips.c:62:18: warning:
 ipsflag_irq_mask defined but not used [-Wunused-const-variable=]

They are never used, so can be removed.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>bcma: Use dev_get_drvdata</title>
<updated>2019-08-06T12:25:28Z</updated>
<author>
<name>Chuhong Yuan</name>
<email>hslester96@gmail.com</email>
</author>
<published>2019-07-23T08:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9236c1250cb7c6c645a658485efc2f99d57e96c2'/>
<id>urn:sha1:9236c1250cb7c6c645a658485efc2f99d57e96c2</id>
<content type='text'>
Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.

Signed-off-by: Chuhong Yuan &lt;hslester96@gmail.com&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>bcma: use dev_* printing functions</title>
<updated>2019-01-10T11:39:19Z</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2019-01-01T23:00:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=777bc4801a6868fcbff09ffb6e30f023e7c5ed38'/>
<id>urn:sha1:777bc4801a6868fcbff09ffb6e30f023e7c5ed38</id>
<content type='text'>
It provides more meaningful messages.

Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>bcma: keep a direct pointer to the struct device</title>
<updated>2019-01-10T11:39:18Z</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2019-01-01T23:00:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a1c18b761ddb299a06746948b9ec2814b04fa92'/>
<id>urn:sha1:5a1c18b761ddb299a06746948b9ec2814b04fa92</id>
<content type='text'>
Accessing struct device is pretty useful/common so having a direct
pointer:
1) Simplifies some code
2) Makes bcma_bus_get_host_dev() unneeded
3) Allows further improvements like using dev_* printing helpers

Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
<entry>
<title>bcma: Allow selection of this driver when COMPILE_TEST=y</title>
<updated>2018-07-18T07:34:19Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-07-05T09:45:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a58d0b4d512aceb06d8a968c1d19318c77faa6b0'/>
<id>urn:sha1:a58d0b4d512aceb06d8a968c1d19318c77faa6b0</id>
<content type='text'>
This allows us to increase compile-test coverage without having to build
a kernel for MIPS.  That's particularly interesting for subsystem
maintainers that want to test as many drivers as possible in a single
build.

We also add a dependency on HAS_IOMEM in BCMA_HOST_SOC to make sure the
driver is not selected when the arch does not implement IO accessors.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Acked-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'dma-mapping-4.18' of git://git.infradead.org/users/hch/dma-mapping</title>
<updated>2018-06-04T17:58:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2018-06-04T17:58:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e5a594643a3444d39c1467040e638bf08a4e0db8'/>
<id>urn:sha1:e5a594643a3444d39c1467040e638bf08a4e0db8</id>
<content type='text'>
Pull dma-mapping updates from Christoph Hellwig:

 - replace the force_dma flag with a dma_configure bus method. (Nipun
   Gupta, although one patch is іncorrectly attributed to me due to a
   git rebase bug)

 - use GFP_DMA32 more agressively in dma-direct. (Takashi Iwai)

 - remove PCI_DMA_BUS_IS_PHYS and rely on the dma-mapping API to do the
   right thing for bounce buffering.

 - move dma-debug initialization to common code, and apply a few
   cleanups to the dma-debug code.

 - cleanup the Kconfig mess around swiotlb selection

 - swiotlb comment fixup (Yisheng Xie)

 - a trivial swiotlb fix. (Dan Carpenter)

 - support swiotlb on RISC-V. (based on a patch from Palmer Dabbelt)

 - add a new generic dma-noncoherent dma_map_ops implementation and use
   it for arc, c6x and nds32.

 - improve scatterlist validity checking in dma-debug. (Robin Murphy)

 - add a struct device quirk to limit the dma-mask to 32-bit due to
   bridge/system issues, and switch x86 to use it instead of a local
   hack for VIA bridges.

 - handle devices without a dma_mask more gracefully in the dma-direct
   code.

* tag 'dma-mapping-4.18' of git://git.infradead.org/users/hch/dma-mapping: (48 commits)
  dma-direct: don't crash on device without dma_mask
  nds32: use generic dma_noncoherent_ops
  nds32: implement the unmap_sg DMA operation
  nds32: consolidate DMA cache maintainance routines
  x86/pci-dma: switch the VIA 32-bit DMA quirk to use the struct device flag
  x86/pci-dma: remove the explicit nodac and allowdac option
  x86/pci-dma: remove the experimental forcesac boot option
  Documentation/x86: remove a stray reference to pci-nommu.c
  core, dma-direct: add a flag 32-bit dma limits
  dma-mapping: remove unused gfp_t parameter to arch_dma_alloc_attrs
  dma-debug: check scatterlist segments
  c6x: use generic dma_noncoherent_ops
  arc: use generic dma_noncoherent_ops
  arc: fix arc_dma_{map,unmap}_page
  arc: fix arc_dma_sync_sg_for_{cpu,device}
  arc: simplify arc_dma_sync_single_for_{cpu,device}
  dma-mapping: provide a generic dma-noncoherent implementation
  dma-mapping: simplify Kconfig dependencies
  riscv: add swiotlb support
  riscv: only enable ZONE_DMA32 for 64-bit
  ...
</content>
</entry>
<entry>
<title>bcma: fix buffer size caused crash in bcma_core_mips_print_irq()</title>
<updated>2018-05-12T08:36:59Z</updated>
<author>
<name>Rafał Miłecki</name>
<email>rafal@milecki.pl</email>
</author>
<published>2018-05-08T09:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=361de091a4b97aa9081d304d742f80d486ab7125'/>
<id>urn:sha1:361de091a4b97aa9081d304d742f80d486ab7125</id>
<content type='text'>
Used buffer wasn't big enough to hold whole strings. Example output of
this function is:
[    0.180892] bcma: bus0: core 0x0800, irq: 2(S)* 3  4  5  6  D  I
[    0.180948] bcma: bus0: core 0x0812, irq: 2(S)  3* 4  5  6  D  I
[    0.180998] bcma: bus0: core 0x082d, irq: 2(S)  3  4* 5  6  D  I
[    0.181046] bcma: bus0: core 0x082c, irq: 2(S)  3  4  5  6  D  I*
which means we need to store up to 24 chars.

Fixes: 758f7e06063a8 ("bcma: Use bcma_debug and not pr_cont in MIPS driver")
Signed-off-by: Rafał Miłecki &lt;rafal@milecki.pl&gt;
Cc: stable@vger.kernel.org # v4.15+
Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
</content>
</entry>
</feed>
