-
Notifications
You must be signed in to change notification settings - Fork 5.2k
w1_therm: Back-port locking improvements from 4.2-rc1 #1059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A temperature conversion can take 750 ms and when possible the w1_therm slave driver drops the bus_mutex to allow other bus operations, but that includes operations such as a periodic slave search, which can remove this slave when it is no longer detected. If that happens the sl->family_data will be freed and set to NULL causing w1_slave_show to crash when it wakes up. Signed-off-by: David Fries <[email protected]> Reported-By: Thorsten Bschorr <[email protected]> Tested-by: Thorsten Bschorr <[email protected]> Acked-by: Evgeniy Polyakov <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch provides support for the DS28EA00 digital thermometer. The DS28EA00 provides an additional two pins for implementing a sequence detection algorithm. This feature allows you to determine the physical location of the chip in the 1-wire bus without needing pre-existing knowledge of the bus ordering. Support is provided through the sysfs w1_seq file. The file will contain a single line with an integer value representing the device index in the bus starting at 0. Signed-off-by: Matt Campbell <[email protected]> Acked-by: Evgeniy Polyakov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
The W1_42_FINISHED_BYTE is 0xFF so the cast means the condition is never true. Fixes: d9411e5 ('w1: Add support for DS28EA00 sequence to w1-therm') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
I noticed there was a problem here because Smatch complained: drivers/w1/slaves/w1_therm.c:416 w1_seq_show() warn: inconsistent returns 'mutex:&sl->master->mutex'. Locked on: line 416 Unlocked on: line 413 The problem is that we lock ->mutex but we unlock ->bus_mutex on error. David Fries says that ->bus_mutex is correct and ->mutex is incorrect. Fixes: d9411e5 ('w1: Add support for DS28EA00 sequence to w1-therm') Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Evgeniy Polyakov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
No objections from me. |
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
kernel: w1_therm: Back-port locking improvements from 4.2-rc1 See: raspberrypi/linux#1059 kernel: Added support for 2 mcp2515 CAN Bus IC See: raspberrypi/linux#1018 kernel: BCM270X_DT: Overlay for the Fen Logic VGA666 board (really added this time) firmware: di_adv: Add qpu shader code to implement deinterlace firmware: image_fx: Support YUV_UV as destination format if requested firmware: dmalib: Reduce default priority and burst size of 2d memcpy arm_loader: Ensure reserved qpus are freed and ISR blocks until interrupt cleared gpioman: If dt-blob.bin file is incompatible, use built-in See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753&start=75#p788079
kernel: w1_therm: Back-port locking improvements from 4.2-rc1 See: raspberrypi/linux#1059 kernel: Added support for 2 mcp2515 CAN Bus IC See: raspberrypi/linux#1018 kernel: BCM270X_DT: Overlay for the Fen Logic VGA666 board (really added this time) firmware: di_adv: Add qpu shader code to implement deinterlace firmware: image_fx: Support YUV_UV as destination format if requested firmware: dmalib: Reduce default priority and burst size of 2d memcpy arm_loader: Ensure reserved qpus are freed and ISR blocks until interrupt cleared gpioman: If dt-blob.bin file is incompatible, use built-in See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753&start=75#p788079
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
w1_therm: Back-port locking improvements from 4.2-rc1
kernel: w1_therm: Back-port locking improvements from 4.2-rc1 See: raspberrypi/linux#1059 kernel: Added support for 2 mcp2515 CAN Bus IC See: raspberrypi/linux#1018 kernel: BCM270X_DT: Overlay for the Fen Logic VGA666 board (really added this time) firmware: di_adv: Add qpu shader code to implement deinterlace firmware: image_fx: Support YUV_UV as destination format if requested firmware: dmalib: Reduce default priority and burst size of 2d memcpy arm_loader: Ensure reserved qpus are freed and ISR blocks until interrupt cleared gpioman: If dt-blob.bin file is incompatible, use built-in See: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753&start=75#p788079
Hi, |
It is possible to crash the w1_therm module by removing a node
(echo $slave >/sys/devices/w1_bus_master/w1_master_remove) while a read
is in progress. The 4.2-rc1 release contains a patch adding reference
counting to avoid this problem. Back-port that patch along with other
upstream improvements.
See: #872