<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/vme/vme.c, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-12-18T14:59:18+00:00</updated>
<entry>
<title>vme: Fix a possible sleep-in-atomic bug in vme_tsi148</title>
<updated>2017-12-18T14:59:18+00:00</updated>
<author>
<name>Jia-Ju Bai</name>
<email>baijiaju1990@gmail.com</email>
</author>
<published>2017-12-12T12:51:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97784615ed32c1ef33047e95d4240141258e2cf0'/>
<id>urn:sha1:97784615ed32c1ef33047e95d4240141258e2cf0</id>
<content type='text'>
The driver may sleep under a spinlock.
The function call path is:
tsi148_master_write \ tsi148_master_read (acquire the spinlock)
  vme_register_error_handler
    kmalloc(GFP_KERNEL) --&gt; may sleep

To fix it, GFP_KERNEL is replaced with GFP_ATOMIC.

This bug is found by my static analysis tool(DSAC) and checked by my code review.

Signed-off-by: Jia-Ju Bai &lt;baijiaju1990@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>VME: Return -EBUSY when DMA list in use</title>
<updated>2017-11-08T13:26:50+00:00</updated>
<author>
<name>Martyn Welch</name>
<email>martyn@welchs.me.uk</email>
</author>
<published>2017-10-24T06:27:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f13d1a8a801dae552ef495c84a223280586a9f67'/>
<id>urn:sha1:f13d1a8a801dae552ef495c84a223280586a9f67</id>
<content type='text'>
The VME subsystem currently returns -EBUSY when trying to free a DMA
resource that is busy, but returns -EINVAL when trying to free a DMA list
that is in use. Switch to returning -EBUSY when trying to free a DMA list
that is in use for consistency and correctness.

Signed-off-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'vme-next-4.14-rc4' of https://gitlab.collabora.com/martyn/linux into char-misc-next</title>
<updated>2017-10-20T13:24:34+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-10-20T13:24:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ad146e37d2a2f1cbf16bf4c7bbb9362f009a1480'/>
<id>urn:sha1:ad146e37d2a2f1cbf16bf4c7bbb9362f009a1480</id>
<content type='text'>
Martyn writes:

VME Subsystem changes for master v4.14-rc4:

 - Corrections across the VME subsystem to better align with the preferred
   kernel coding style.
</content>
</entry>
<entry>
<title>vme: Return directly in two functions</title>
<updated>2017-10-13T20:32:01+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2017-08-24T20:32:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8af70cd9d6dec3fb968613a8d5318039ac5497b1'/>
<id>urn:sha1:8af70cd9d6dec3fb968613a8d5318039ac5497b1</id>
<content type='text'>
Return directly without using an intermediate local variable
in these functions.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
</content>
</entry>
<entry>
<title>vme: Adjust 48 checks for null pointers</title>
<updated>2017-10-13T20:32:01+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2017-08-24T20:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=61282c04984e405d3c79300e6008c3f5d60c280a'/>
<id>urn:sha1:61282c04984e405d3c79300e6008c3f5d60c280a</id>
<content type='text'>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written …

Thus fix the affected source code places.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
</content>
</entry>
<entry>
<title>vme: Move an assignment in vme_new_dma_list()</title>
<updated>2017-10-13T20:32:01+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2017-08-24T20:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a384b2cc13f6596a05069077bc3bc2c0cdd90156'/>
<id>urn:sha1:a384b2cc13f6596a05069077bc3bc2c0cdd90156</id>
<content type='text'>
Assign a pointer to a data structure member without using an intermediate
local variable.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
</content>
</entry>
<entry>
<title>vme: Improve 11 size determinations</title>
<updated>2017-10-13T20:32:00+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2017-08-24T19:52:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1ff0a19ce12c8292b732b564d25a9d3c5f819b1b'/>
<id>urn:sha1:1ff0a19ce12c8292b732b564d25a9d3c5f819b1b</id>
<content type='text'>
Replace the specification of data structures by pointer dereferences
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
</content>
</entry>
<entry>
<title>vme: Delete 11 error messages for a failed memory allocation</title>
<updated>2017-10-13T20:32:00+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2017-08-24T19:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=94eefcc1cb648a6a14fe0d7a79da48d0a33ca781'/>
<id>urn:sha1:94eefcc1cb648a6a14fe0d7a79da48d0a33ca781</id>
<content type='text'>
Omit extra messages for a memory allocation failure in these functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Martyn Welch &lt;martyn@welchs.me.uk&gt;
</content>
</entry>
<entry>
<title>vme: Fix integer overflow checking in vme_check_window()</title>
<updated>2017-10-04T08:30:53+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-09-30T11:27:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd14798650cd2a2befd7d96bbc466c2317a582db'/>
<id>urn:sha1:bd14798650cd2a2befd7d96bbc466c2317a582db</id>
<content type='text'>
The controversial part of this patch is that I've changed it so we now
prevent integer overflows for VME_USER types and before we didn't.  I
view it as kernel-hardening.  I looked at a couple places that used
VME_USER types and they seemed pretty suspicious so I'm pretty sure
preventing overflows here is a good idea.

The most common problem which this function is for cases like VME_A16
where we don't put an upper bound on "size" so you could have "size" set
to U64_MAX and a valid vme_base would overflow the "vme_base + size"
into the valid range as well.

In the VME_A64 case, the integer overflow checking doesn't work because
"U64_MAX + 1" has an integer overflow and it's just a complicated way of
saying zero.  That VME_A64 case is sort of interesting as well because
there is a VME_A64_MAX define which is set to "U64_MAX + 1".  The
compiler will never let anyone use it since it can't be stored in a u64
variable...  With my patch it's now limited to just U64_MAX.

Anyway, I put one integer overflow check at the start of the function
and deleted all existing checks.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Dmitry Kalinkin &lt;dmitry.kalinkin@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>docs: Add kernel-doc comments to VME driver API</title>
<updated>2017-03-17T06:10:49+00:00</updated>
<author>
<name>Martyn Welch</name>
<email>martyn.welch@collabora.co.uk</email>
</author>
<published>2017-03-04T00:34:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b5bc980a4929bb2a449fef3e0b7131466815d0b1'/>
<id>urn:sha1:b5bc980a4929bb2a449fef3e0b7131466815d0b1</id>
<content type='text'>
Add kernel-doc comments to the VME driver API and structures. This
documentation will be integrated into the RST documentation in a later
patch.

Signed-off-by: Martyn Welch &lt;martyn.welch@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
