<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/nfc/core.c, branch linux-3.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-02-13T18:42:15Z</updated>
<entry>
<title>NFC: fix device-allocation error return</title>
<updated>2018-02-13T18:42:15Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2017-07-09T11:08:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4e587fa528a56b85ed3af7c33ccf68663effdaa'/>
<id>urn:sha1:b4e587fa528a56b85ed3af7c33ccf68663effdaa</id>
<content type='text'>
commit c45e3e4c5b134b081e8af362109905427967eb19 upstream.

A recent change fixing NFC device allocation itself introduced an
error-handling bug by returning an error pointer in case device-id
allocation failed. This is clearly broken as the callers still expected
NULL to be returned on errors as detected by Dan's static checker.

Fix this up by returning NULL in the event that we've run out of memory
when allocating a new device id.

Note that the offending commit is marked for stable (3.8) so this fix
needs to be backported along with it.

Fixes: 20777bc57c34 ("NFC: fix broken device allocation")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>NFC: fix broken device allocation</title>
<updated>2017-10-12T14:27:50Z</updated>
<author>
<name>Johan Hovold</name>
</author>
<published>2017-03-30T10:15:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38af0e73a85a9b3ffa11bbc5dc53e9f6a7c6036a'/>
<id>urn:sha1:38af0e73a85a9b3ffa11bbc5dc53e9f6a7c6036a</id>
<content type='text'>
commit 20777bc57c346b6994f465e0d8261a7fbf213a09 upstream.

Commit 7eda8b8e9677 ("NFC: Use IDR library to assing NFC devices IDs")
moved device-id allocation and struct-device initialisation from
nfc_allocate_device() to nfc_register_device().

This broke just about every nfc-device-registration error path, which
continue to call nfc_free_device() that tries to put the device
reference of the now uninitialised (but zeroed) struct device:

kobject: '(null)' (ce316420): is not initialized, yet kobject_put() is being called.

The late struct-device initialisation also meant that various work
queues whose names are derived from the nfc device name were also
misnamed:

  421 root         0 SW&lt;  [(null)_nci_cmd_]
  422 root         0 SW&lt;  [(null)_nci_rx_w]
  423 root         0 SW&lt;  [(null)_nci_tx_w]

Move the id-allocation and struct-device initialisation back to
nfc_allocate_device() and fix up the single call site which did not use
nfc_free_device() in its error path.

Fixes: 7eda8b8e9677 ("NFC: Use IDR library to assing NFC devices IDs")
Cc: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
[bwh: Backported to 3.16: drop change in nci_allocate_device()]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>NFC: Move checking valid gb_len value to nfc_llcp_set_remote_gb</title>
<updated>2014-03-14T19:19:08Z</updated>
<author>
<name>Axel Lin</name>
</author>
<published>2014-02-25T01:18:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3143a4ca610d6a3de0d8814ee6f5f7da6fc7fbfa'/>
<id>urn:sha1:3143a4ca610d6a3de0d8814ee6f5f7da6fc7fbfa</id>
<content type='text'>
This checking is common for all caller, so move the checking to one place.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: Remove redundant test for dev-&gt;n_targets in nfc_find_target</title>
<updated>2014-03-14T19:19:08Z</updated>
<author>
<name>Axel Lin</name>
</author>
<published>2014-02-24T13:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=365a721adbdfe5f6577a66b9b74c12dc98fbb4a3'/>
<id>urn:sha1:365a721adbdfe5f6577a66b9b74c12dc98fbb4a3</id>
<content type='text'>
Without this test, it returns NULL if dev-&gt;n_targets is 0 anyway.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: Use list_for_each_entry in nfc_find_se()</title>
<updated>2014-02-23T22:32:18Z</updated>
<author>
<name>Axel Lin</name>
</author>
<published>2014-02-14T11:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=156cef80f2a1aea4f150dff5d990e8fbbd96d862'/>
<id>urn:sha1:156cef80f2a1aea4f150dff5d990e8fbbd96d862</id>
<content type='text'>
nfc_find_se() does not modify any list entry while iterating the list.
So use list_for_each_entry instead of list_for_each_entry_safe.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem</title>
<updated>2014-01-17T19:43:17Z</updated>
<author>
<name>John W. Linville</name>
</author>
<published>2014-01-17T19:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7916a075571f0ccd0830cf3da293188a8b6045e3'/>
<id>urn:sha1:7916a075571f0ccd0830cf3da293188a8b6045e3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2014-01-14T22:42:42Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2014-01-14T22:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0a379e21c503b2ff66b44d588df9f231e9b0b9ca'/>
<id>urn:sha1:0a379e21c503b2ff66b44d588df9f231e9b0b9ca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>NFC: Only warn on SE discovery error</title>
<updated>2014-01-04T02:32:27Z</updated>
<author>
<name>Samuel Ortiz</name>
</author>
<published>2013-12-22T00:00:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a434c2407467a76c0e1416c45f7b31cfbe1b6b3b'/>
<id>urn:sha1:a434c2407467a76c0e1416c45f7b31cfbe1b6b3b</id>
<content type='text'>
SE discovery errors are currently overwriting the dev_up() return error.
This is wrong for many reasons:

- We don't want to report an error if we actually brought the device up
  but it failed to discover SEs. By doing so we pretend we don't have an
  NFC functional device even we do. The only thing we could not do was
  checking for SEs availability. This is the false negative case.

- In some cases the actual device power up failed but the SE discovery
  succeeded. Userspace then believes the device is up while it's not.
  This is the false positive case.

Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>NFC: Fix target mode p2p link establishment</title>
<updated>2014-01-04T02:31:32Z</updated>
<author>
<name>Arron Wang</name>
</author>
<published>2013-11-14T09:03:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d31652a26bc9e752a99b6ac3b61353129934e451'/>
<id>urn:sha1:d31652a26bc9e752a99b6ac3b61353129934e451</id>
<content type='text'>
With commit e29a9e2ae165620d, we set the active_target pointer from
nfc_dep_link_is_up() in order to support the case where the target
detection and the DEP link setting are done atomically by the driver.
That can only happen in initiator mode, so we need to check for that
otherwise we fail to bring a p2p link in target mode.

Signed-off-by: Arron Wang &lt;arron.wang@intel.com&gt;
Signed-off-by: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>nfc: Fix FSF address in file headers</title>
<updated>2013-12-11T15:56:21Z</updated>
<author>
<name>Jeff Kirsher</name>
</author>
<published>2013-12-06T16:56:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=98b32decc83ed3137e3ddbc918b102f8fc406b6d'/>
<id>urn:sha1:98b32decc83ed3137e3ddbc918b102f8fc406b6d</id>
<content type='text'>
Several files refer to an old address for the Free Software Foundation
in the file header comment.  Resolve by replacing the address with
the URL &lt;http://www.gnu.org/licenses/&gt; so that we do not have to keep
updating the header comments anytime the address changes.

CC: linux-wireless@vger.kernel.org
CC: Lauro Ramos Venancio &lt;lauro.venancio@openbossa.org&gt;
CC: Aloisio Almeida Jr &lt;aloisio.almeida@openbossa.org&gt;
CC: Samuel Ortiz &lt;sameo@linux.intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
</feed>
