History

Merge tag 'keys-fixes-20200329' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs

Pull keyrings fixes from David Howells: "Here's a couple of patches that fix a circular dependency between holding key->sem and mm->mmap_sem when reading data from a key. One potential issue is that a filesystem looking to use a key inside, say, ->readpages() could deadlock if the key being read is the key that's required and the buffer the key is being read into is on a page that needs to be fetched. The case actually detected is a bit more involved - with a filesystem calling request_key() and locking the target keyring for write - which could be being read" * tag 'keys-fixes-20200329' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: KEYS: Avoid false positive ENOMEM error on key read KEYS: Don't write out to userspace while holding key semaphore

Linus Torvalds committed 6 years ago

Commit 4c205c82 parents ea9448b 4f0882413 files · +126 −75Browse files

Showing the changes to include/linux (1 of 13 files). Show all

Unified · Split

include/linux/key-type.h+1−1
@@ -127,7 +127,7 @@ struct key_type { · 126 unmodified lines
127 * much is copied into the buffer127 * much is copied into the buffer
128 * - shouldn't do the copy if the buffer is NULL128 * - shouldn't do the copy if the buffer is NULL
129 */129 */
130 long (*read)(const struct key *key, char __user *buffer, size_t buflen);130 long (*read)(const struct key *key, char *buffer, size_t buflen);
131 131
132 /* handle request_key() for this type instead of invoking132 /* handle request_key() for this type instead of invoking
133 * /sbin/request-key (optional)133 * /sbin/request-key (optional)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t