Bug 116871 - Underconstraint Kconfig model for "MEMSTICK_UNSAFE_RESUME"
Summary: Underconstraint Kconfig model for "MEMSTICK_UNSAFE_RESUME"
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: P1 low
Assignee: drivers_other
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-21 12:36 UTC by Sascha El-Sharkawy
Modified: 2016-04-21 12:36 UTC (History)
0 users

See Also:
Kernel Version: 4.5.2
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Added dependency between MEMSTICK_UNSAFE_RESUME and PM (488 bytes, application/octet-stream)
2016-04-21 12:36 UTC, Sascha El-Sharkawy
Details

Description Sascha El-Sharkawy 2016-04-21 12:36:23 UTC
Created attachment 213521 [details]
Added dependency between MEMSTICK_UNSAFE_RESUME and PM

The config option "MEMSTICK_UNSAFE_RESUME" manages the possibility to configure how memory sticks (MEMSTICK) are handled during suspension (PM). However, MEMSTICK_UNSAFE_RESUME is only dependent on MEMSTICK, but not on PM.

The only occurrence of MEMSTICK_UNSAFE_RESUME in code are drivers/memstick/core/ms_block.c and drivers/memstick/core/mspro_block.c. Whenever MEMSTICK_UNSAFE_RESUME is used, it is also surrounded by PM.

As a consequence, it is possible to configure and compile a kernel with MEMSTICK_UNSAFE_RESUME=y, which does not contain the selected code (if PM=n). Further, it is not possible to detect the divergence between the desired and real behavior of the kernel, since the Kconfig model is missing this relation.

Suggestion:
MEMSTICK_UNSAFE_RESUME should also be made dependent on PM though adding "depends on PM" in line 9 of drivers/memstick/core/Kconfig (cf. attached patch).

Note You need to log in before you can comment on or make changes to this bug.