<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/w1/w1.c, branch linux-5.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-07-27T06:37:19Z</updated>
<entry>
<title>w1: fix loop in w1_fini()</title>
<updated>2023-07-27T06:37:19Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2021-05-19T14:17:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85f4c53849e4e921eaa53078baefddd06306a725'/>
<id>urn:sha1:85f4c53849e4e921eaa53078baefddd06306a725</id>
<content type='text'>
[ Upstream commit 83f3fcf96fcc7e5405b37d9424c7ef26bfa203f8 ]

The __w1_remove_master_device() function calls:

	list_del(&amp;dev-&gt;w1_master_entry);

So presumably this can cause an endless loop.

Fixes: 7785925dd8e0 ("[PATCH] w1: cleanups.")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>w1: fix WARNING after calling w1_process()</title>
<updated>2023-02-06T06:52:40Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2022-12-05T10:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=276052159ba94d4d9f5b453fb4707d6798c6b845'/>
<id>urn:sha1:276052159ba94d4d9f5b453fb4707d6798c6b845</id>
<content type='text'>
[ Upstream commit 36225a7c72e9e3e1ce4001b6ce72849f5c9a2d3b ]

I got the following WARNING message while removing driver(ds2482):

------------[ cut here ]------------
do not call blocking ops when !TASK_RUNNING; state=1 set at [&lt;000000002d50bfb6&gt;] w1_process+0x9e/0x1d0 [wire]
WARNING: CPU: 0 PID: 262 at kernel/sched/core.c:9817 __might_sleep+0x98/0xa0
CPU: 0 PID: 262 Comm: w1_bus_master1 Tainted: G                 N 6.1.0-rc3+ #307
RIP: 0010:__might_sleep+0x98/0xa0
Call Trace:
 exit_signals+0x6c/0x550
 do_exit+0x2b4/0x17e0
 kthread_exit+0x52/0x60
 kthread+0x16d/0x1e0
 ret_from_fork+0x1f/0x30

The state of task is set to TASK_INTERRUPTIBLE in loop in w1_process(),
set it to TASK_RUNNING when it breaks out of the loop to avoid the
warning.

Fixes: 3c52e4e62789 ("W1: w1_process, block or sleep")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20221205101558.3599162-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>w1: fix deadloop in __w1_remove_master_device()</title>
<updated>2023-02-06T06:52:40Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2022-12-05T08:04:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82867190ce30ab85818e09d9819c8a37e9880054'/>
<id>urn:sha1:82867190ce30ab85818e09d9819c8a37e9880054</id>
<content type='text'>
[ Upstream commit 25d5648802f12ae486076ceca5d7ddf1fef792b2 ]

I got a deadloop report while doing device(ds2482) add/remove test:

  [  162.241881] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1.
  [  163.272251] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1.
  [  164.296157] w1_master_driver w1_bus_master1: Waiting for w1_bus_master1 to become free: refcnt=1.
  ...

__w1_remove_master_device() can't return, because the dev-&gt;refcnt is not zero.

w1_add_master_device()			|
  w1_alloc_dev()			|
    atomic_set(&amp;dev-&gt;refcnt, 2)		|
  kthread_run()				|
					|__w1_remove_master_device()
					|  kthread_stop()
  // KTHREAD_SHOULD_STOP is set,	|
  // threadfn(w1_process) won't be	|
  // called.				|
  kthread()				|
					|  // refcnt will never be 0, it's deadloop.
					|  while (atomic_read(&amp;dev-&gt;refcnt)) {...}

After calling w1_add_master_device(), w1_process() is not really
invoked, before w1_process() starting, if kthread_stop() is called
in __w1_remove_master_device(), w1_process() will never be called,
the refcnt can not be decreased, then it causes deadloop in remove
function because of non-zero refcnt.

We need to make sure w1_process() is really started, so move the
set refcnt into w1_process() to fix this problem.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20221205080434.3149205-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157</title>
<updated>2019-05-30T18:26:37Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2019-05-27T06:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c942fddf8793b2013be8c901b47d0a8dc02bf99f'/>
<id>urn:sha1:c942fddf8793b2013be8c901b47d0a8dc02bf99f</id>
<content type='text'>
Based on 3 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [kishon] [vijay] [abraham]
  [i] [kishon]@[ti] [com] this program is distributed in the hope that
  it will be useful but without any warranty without even the implied
  warranty of merchantability or fitness for a particular purpose see
  the gnu general public license for more details

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version [author] [graeme] [gregory]
  [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
  [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
  [hk] [hemahk]@[ti] [com] this program is distributed in the hope
  that it will be useful but without any warranty without even the
  implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1105 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>w1: core: match sub-nodes of bus masters in devicetree</title>
<updated>2018-07-11T16:09:08Z</updated>
<author>
<name>Daniel Mack</name>
</author>
<published>2018-07-06T05:35:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fae68031f7fbc8b6db58d87830ba7ed1d696fbb1'/>
<id>urn:sha1:fae68031f7fbc8b6db58d87830ba7ed1d696fbb1</id>
<content type='text'>
Once a new slave device is detected, match it against all sub-nodes of the
master bus controller. If a match is found, set the slave device's of_node
pointer.

Signed-off-by: Daniel Mack &lt;daniel@zonque.org&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
</content>
</entry>
<entry>
<title>1wire: family module autoload fails because of upper/lower case mismatch.</title>
<updated>2018-05-14T14:33:18Z</updated>
<author>
<name>Ingo Flaschberger</name>
</author>
<published>2018-05-01T14:10:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=065c09563c872e52813a17218c52cd642be1dca6'/>
<id>urn:sha1:065c09563c872e52813a17218c52cd642be1dca6</id>
<content type='text'>
1wire family module autoload fails because of upper/lower
  case mismatch.

Signed-off-by: Ingo Flaschberger &lt;ingo.flaschberger@gmail.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>w1: use put_device() if device_register() fail</title>
<updated>2018-03-14T13:58:50Z</updated>
<author>
<name>Arvind Yadav</name>
</author>
<published>2018-03-06T10:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ec4eb71b4956548a9c652f6c26232995916008c'/>
<id>urn:sha1:0ec4eb71b4956548a9c652f6c26232995916008c</id>
<content type='text'>
If device_register() returned an error! Always use put_device()
to give up the reference initialized in device_register().

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: w1: add hwmon support structures</title>
<updated>2017-08-31T16:50:14Z</updated>
<author>
<name>Jaghathiswari Rankappagounder Natarajan</name>
</author>
<published>2017-08-30T23:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2eb7954809bf26de27bc3a2fea4eef606bbf4482'/>
<id>urn:sha1:2eb7954809bf26de27bc3a2fea4eef606bbf4482</id>
<content type='text'>
This patch has changes to w1.h/w1.c generic files to add (optional) hwmon
support structures.

Signed-off-by: Jaghathiswari Rankappagounder Natarajan &lt;jaghu@google.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: w1: Add 1w slave driver for DS28E05 EEPROM</title>
<updated>2017-08-28T15:23:29Z</updated>
<author>
<name>Andrew Worsley</name>
</author>
<published>2017-08-27T11:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6887531c0c6b106dbe9aa5ed6eaa166d93df52e'/>
<id>urn:sha1:f6887531c0c6b106dbe9aa5ed6eaa166d93df52e</id>
<content type='text'>
Add a one wire driver for the DS28E05 one wire slave chip. This chip
requires OverDrive support to talk to it.

Signed-off-by: Andrew Worsley &lt;amworsley@gmail.com&gt;
Acked-by: Evgeniy Polyakov &lt;zbr@ioremap.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>w1: constify attribute_group structures.</title>
<updated>2017-08-28T15:15:16Z</updated>
<author>
<name>Arvind Yadav</name>
</author>
<published>2017-07-28T10:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a890d56a9d9e4a8345c08f9212504bbc396bb7dd'/>
<id>urn:sha1:a890d56a9d9e4a8345c08f9212504bbc396bb7dd</id>
<content type='text'>
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by &lt;linux/sysfs.h&gt; work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
