Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
9f1af1d
msm: msm_bus: limit max chars read by sscanf
Aug 5, 2016
194b06e
msm: crypto: Fix integer over flow check in qcrypto driver
Aug 16, 2016
d89948a
qcedev: Validate Source and Destination addresses
Aug 31, 2016
41277e2
msm: sensor: Avoid potential stack overflow
Sep 1, 2016
24b7768
net: ipc_router: fix NULL pointer de-reference issue
Sep 21, 2016
547221d
trace: prevent NULL pointer dereference
Jan 29, 2016
a0d92a3
cgroup: prefer %pK to %p
nickdesaulniers Sep 12, 2016
138490d
ext4: fix potential use after free in __ext4_journal_stop
Oct 18, 2015
caecede
ext4: fix potential integer overflow
insuyun Feb 12, 2016
ca036c3
ext4: fix NULL pointer dereference in ext4_mark_inode_dirty()
guaneryu Mar 13, 2016
e39bb4d
ext4: check for extents that wrap around
vegard Jun 30, 2016
150dfb8
USB: visor: fix null-deref at probe
jhovold Jan 12, 2016
92c9426
msm: ultrasound: Various static analysis fixes
vkathota Mar 3, 2016
3f0cff2
net: rmnet_data: Change the print format for addresses
Mar 16, 2016
fc5fa04
net: core: neighbour: Change the print format for addresses
Mar 17, 2016
1495571
UPSTREAM: USB: usbfs: fix potential infoleak in devio
kengiter May 3, 2016
d59b8f4
net: fix infoleak in llc
kengiter May 3, 2016
2e5d756
net: fix infoleak in rtnetlink (Edited)
kengiter May 3, 2016
3442a1a
net: fix a kernel infoleak in x25 module
kengiter May 8, 2016
e4ae549
ASoC: msm: qdsp6v2: Change audio drivers to use %pK
May 19, 2016
81cffba
netfilter: nfnetlink: work around wrong endianess in res_id field
ummakynes Aug 28, 2015
7c14c3b
netfilter: nfnetlink: correctly validate length of batch messages
Feb 2, 2016
5b0fe24
mm: thp: fix SMP race condition between THP page fault and MADV_DONTNEED
aagit Feb 26, 2016
ae91836
BACKPORT: usb: gadget: f_fs: Fix use-after-free
larsclausen Apr 14, 2016
f93c52d
ASoC: msm: qdsp6v2: check param length for EAC3 format
Jun 29, 2016
5b2fce9
tcp: fix use after free in tcp_xmit_retransmit_queue()
edumazet Aug 17, 2016
82e1313
ASoC: msm: initialize the params array before using it
Sep 7, 2016
12eb0bc
UPSTREAM: arm64: vdso: Mark vDSO code as read-only
d3zd3z Feb 10, 2016
7594877
ext4: fix oops on corrupted filesystem
jankara May 5, 2016
f00f88c
input: synaptics: Add checks of user input data
jiayy Aug 10, 2016
1bfc541
input: synaptics_dsx: add checks of user input data
m-chong Sep 2, 2016
659d0db
jbd2: fix incorrect unlock on j_list_lock
tsgates Oct 13, 2016
34ff5db
ASN.1: Fix non-match detection failure on data overrun
dhowells Aug 5, 2015
199f7a0
diag: Fix possible kernel addresses leak
Apr 12, 2016
de5a722
Don't show empty tag stats for unprivileged uids
mkayyash May 11, 2016
76740b5
ASoC: msm: Add Buffer overflow check
Sep 7, 2016
a58eb16
coresight: fix the dangling pointer issues on coresight
Sep 8, 2016
9355485
sched: Fix integer overflow in sched_update_nr_prod()
DefinitelyNOTobscenelyvague Sep 28, 2016
3a83e9a
msm: kgsl: Fix overflow in sharedmem read/write functions
Mar 17, 2016
585c5c6
ASoC: qdsp6v2: fix potential bug of infinite loop
Oct 10, 2016
7216f2a
net: ping: Fix stack buffer overflow in ping_common_sendmsg()
Oct 13, 2016
9706179
netfilter: Change %p to %pK in debug messages
m-chong Oct 14, 2016
b3d864c
qcom: scm: remove printing input arguments
Nov 2, 2016
d1a6388
ASoC: soc: prevent risk of buffer overflow
Nov 4, 2016
9e8b3d6
msm: kgsl: Fix overflow in sharedmem cache range operation function
Nov 4, 2016
aecd98a
ASoC: msm: q6dspv2: fix potentional information leak
Nov 9, 2016
398de1f
drivers: video: Add bounds checking in fb_copy_cmap
spfetsch Oct 14, 2016
3d858f3
soc: qcom: scm: add check to avoid buffer overflow (Edited)
Oct 25, 2016
851270d
Revert "UPSTREAM: ppp: defer netns reference release for ppp channel"
NewEraCracker Dec 26, 2016
66c5898
ppp: take reference on channels netns
Mar 23, 2016
6e9b135
ASoC: msm: qdsp6v2: DAP: Fix buffer overflow
ashishrjain Apr 15, 2016
c02e7f3
UPSTREAM: ppp: defer netns reference release for ppp channel
congwang Jul 6, 2016
088f268
fs: ext4: disable support for fallocate FALLOC_FL_PUNCH_HOLE
nickdesaulniers Jul 18, 2016
51ad2f1
msm: crypto: Fix integer over flow check in qce driver
Oct 24, 2016
a5ed18a
BACKPORT: Bluetooth: Fix potential NULL dereference in RFCOMM bind ca…
May 14, 2015
de51bde
ANDROID: trace: net: use %pK for kernel pointers
gquiche Jul 12, 2016
20e78c6
perf: Fix event->ctx locking
Jan 23, 2015
60422d3
msm: mdss: Fix NULL pointer dereference
May 12, 2016
b1c154c
ring-buffer: Prevent overflow of size in ring_buffer_resize()
rostedt May 13, 2016
a684df0
ASoC: msm: set pointers to NULL after kfree
Jul 27, 2016
64d03ed
msm: sensor: Adding mutex for actuator power down operations
Oct 3, 2016
8eb5eaf
radio-iris: check argument values before copying the data
Oct 19, 2016
8e14655
staging/android/ion : fix a race condition in the ion driver
euntaik Feb 24, 2016
aa78233
staging: android: ion: fix up file mode
gregkh Mar 11, 2016
0df2a9a
ion: use %pK instead of %p which respects kptr_restrict sysctl
Sep 2, 2016
a72e1de
ion: blacklist %p kptr_restrict
nickdesaulniers Oct 7, 2016
4fac66e
msm: camera: Avoid exposing kernel addresses
Mar 10, 2016
0f329a6
msm: ipa: fix the potential heap overflow on wan-driver
Nov 30, 2016
cee2804
usb: Avoid exposing kernel addresses
Dec 14, 2016
8c9b9b9
msm: camera: cpp: Add validation for v4l2 ioctl arguments
Dec 21, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions arch/arm64/kernel/vdso/vdso.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
#include <linux/const.h>
#include <asm/page.h>

__PAGE_ALIGNED_DATA

.globl vdso_start, vdso_end
.section .rodata
.balign PAGE_SIZE
vdso_start:
.incbin "arch/arm64/kernel/vdso/vdso.so"
Expand Down
14 changes: 7 additions & 7 deletions drivers/char/diag/diag_dci.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ static int diag_process_single_dci_pkt(unsigned char *buf, int len,
uint8_t cmd_code = 0;

if (!buf || len < 0) {
pr_err("diag: Invalid input in %s, buf: %p, len: %d\n",
pr_err("diag: Invalid input in %s, buf: %pK, len: %d\n",
__func__, buf, len);
return -EIO;
}
Expand Down Expand Up @@ -759,7 +759,7 @@ static int diag_dci_remove_req_entry(unsigned char *buf, int len,
{
uint16_t rsp_count = 0, delayed_rsp_id = 0;
if (!buf || len <= 0 || !entry) {
pr_err("diag: In %s, invalid input buf: %p, len: %d, entry: %p\n",
pr_err("diag: In %s, invalid input buf: %pK, len: %d, entry: %pK\n",
__func__, buf, len, entry);
return -EIO;
}
Expand Down Expand Up @@ -813,7 +813,7 @@ static void dci_process_ctrl_status(unsigned char *buf, int len, int token)
int peripheral_mask, status;

if (!buf || (len < sizeof(struct diag_ctrl_dci_status))) {
pr_err("diag: In %s, invalid buf %p or length: %d\n",
pr_err("diag: In %s, invalid buf %pK or length: %d\n",
__func__, buf, len);
return;
}
Expand Down Expand Up @@ -1939,7 +1939,7 @@ int diag_process_dci_transaction(unsigned char *buf, int len)
mutex_unlock(&driver->dci_mutex);
return -ENOMEM;
}
pr_debug("diag: head of dci log mask %p\n", head_log_mask_ptr);
pr_debug("diag: head of dci log mask %pK\n", head_log_mask_ptr);
count = 0; /* iterator for extracting log codes */

while (count < num_codes) {
Expand Down Expand Up @@ -1969,7 +1969,7 @@ int diag_process_dci_transaction(unsigned char *buf, int len)
while (log_mask_ptr && (offset < DCI_LOG_MASK_SIZE)) {
if (*log_mask_ptr == equip_id) {
found = 1;
pr_debug("diag: find equip id = %x at %p\n",
pr_debug("diag: find equip id = %x at %pK\n",
equip_id, log_mask_ptr);
break;
} else {
Expand Down Expand Up @@ -2053,7 +2053,7 @@ int diag_process_dci_transaction(unsigned char *buf, int len)
mutex_unlock(&driver->dci_mutex);
return -ENOMEM;
}
pr_debug("diag: head of dci event mask %p\n", event_mask_ptr);
pr_debug("diag: head of dci event mask %pK\n", event_mask_ptr);
count = 0; /* iterator for extracting log codes */
while (count < num_codes) {
if (read_len >= USER_SPACE_DATA) {
Expand Down Expand Up @@ -2941,7 +2941,7 @@ int diag_dci_write_proc(uint8_t peripheral, int pkt_type, char *buf, int len)
if (!buf || peripheral >= NUM_PERIPHERALS || len < 0 ||
!(driver->feature[PERIPHERAL_MODEM].rcvd_feature_mask)) {
DIAG_LOG(DIAG_DEBUG_DCI,
"buf: 0x%p, p: %d, len: %d, f_mask: %d\n",
"buf: 0x%pK, p: %d, len: %d, f_mask: %d\n",
buf, peripheral, len,
driver->feature[PERIPHERAL_MODEM].rcvd_feature_mask);
return -EINVAL;
Expand Down
18 changes: 9 additions & 9 deletions drivers/char/diag/diag_debugfs.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
Expand Down Expand Up @@ -428,7 +428,7 @@ static ssize_t diag_dbgfs_read_usbinfo(struct file *file, char __user *ubuf,
bytes_written = scnprintf(buf+bytes_in_buffer, bytes_remaining,
"id: %d\n"
"name: %s\n"
"hdl: %p\n"
"hdl: %pK\n"
"connected: %d\n"
"diag state: %d\n"
"enabled: %d\n"
Expand Down Expand Up @@ -527,7 +527,7 @@ static ssize_t diag_dbgfs_read_smdinfo(struct file *file, char __user *ubuf,
bytes_written = scnprintf(buf+bytes_in_buffer,
bytes_remaining,
"name\t\t:\t%s\n"
"hdl\t\t:\t%p\n"
"hdl\t\t:\t%pK\n"
"inited\t\t:\t%d\n"
"opened\t\t:\t%d\n"
"diag_state\t:\t%d\n"
Expand Down Expand Up @@ -633,7 +633,7 @@ static ssize_t diag_dbgfs_read_socketinfo(struct file *file, char __user *ubuf,
bytes_written = scnprintf(buf+bytes_in_buffer,
bytes_remaining,
"name\t\t:\t%s\n"
"hdl\t\t:\t%p\n"
"hdl\t\t:\t%pK\n"
"inited\t\t:\t%d\n"
"opened\t\t:\t%d\n"
"diag_state\t:\t%d\n"
Expand Down Expand Up @@ -823,9 +823,9 @@ static ssize_t diag_dbgfs_read_mhiinfo(struct file *file, char __user *ubuf,
"bridge index: %s\n"
"mempool: %s\n"
"read ch opened: %d\n"
"read ch hdl: %p\n"
"read ch hdl: %pK\n"
"write ch opened: %d\n"
"write ch hdl: %p\n"
"write ch hdl: %pK\n"
"read work pending: %d\n"
"read done work pending: %d\n"
"open work pending: %d\n"
Expand Down Expand Up @@ -900,9 +900,9 @@ static ssize_t diag_dbgfs_read_bridge(struct file *file, char __user *ubuf,
"type: %d\n"
"inited: %d\n"
"ctxt: %d\n"
"dev_ops: %p\n"
"dci_read_buf: %p\n"
"dci_read_ptr: %p\n"
"dev_ops: %pK\n"
"dci_read_buf: %pK\n"
"dci_read_ptr: %pK\n"
"dci_read_len: %d\n\n",
info->id,
info->name,
Expand Down
28 changes: 14 additions & 14 deletions drivers/char/diag/diag_masks.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ static void diag_send_time_sync_update(uint8_t peripheral)

if (!driver->diagfwd_cntl[peripheral] ||
!driver->diagfwd_cntl[peripheral]->ch_open) {
pr_err("diag: In %s, control channel is not open, p: %d, %p\n",
pr_err("diag: In %s, control channel is not open, p: %d, %pK\n",
__func__, peripheral, driver->diagfwd_cntl[peripheral]);
return;
}
Expand Down Expand Up @@ -433,7 +433,7 @@ static void diag_send_feature_mask_update(uint8_t peripheral)

if (!driver->diagfwd_cntl[peripheral] ||
!driver->diagfwd_cntl[peripheral]->ch_open) {
pr_err("diag: In %s, control channel is not open, p: %d, %p\n",
pr_err("diag: In %s, control channel is not open, p: %d, %pK\n",
__func__, peripheral, driver->diagfwd_cntl[peripheral]);
return;
}
Expand Down Expand Up @@ -484,7 +484,7 @@ static int diag_cmd_get_ssid_range(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &msg_mask : info->msg_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -530,7 +530,7 @@ static int diag_cmd_get_build_mask(unsigned char *src_buf, int src_len,
struct diag_msg_build_mask_t rsp;

if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d\n",
__func__, src_buf, src_len, dest_buf, dest_len);
return -EINVAL;
}
Expand Down Expand Up @@ -587,7 +587,7 @@ static int diag_cmd_get_msg_mask(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &msg_mask : info->msg_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -645,7 +645,7 @@ static int diag_cmd_set_msg_mask(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &msg_mask : info->msg_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -758,7 +758,7 @@ static int diag_cmd_set_all_msg_mask(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &msg_mask : info->msg_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -811,7 +811,7 @@ static int diag_cmd_get_event_mask(unsigned char *src_buf, int src_len,
struct diag_event_mask_config_t rsp;

if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d\n",
__func__, src_buf, src_len, dest_buf, dest_len);
return -EINVAL;
}
Expand Down Expand Up @@ -853,7 +853,7 @@ static int diag_cmd_update_event_mask(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &event_mask : info->event_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -909,7 +909,7 @@ static int diag_cmd_toggle_events(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &event_mask : info->event_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -964,7 +964,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &log_mask : info->log_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -1046,7 +1046,7 @@ static int diag_cmd_get_log_range(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &log_mask : info->log_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -1090,7 +1090,7 @@ static int diag_cmd_set_log_mask(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &log_mask : info->log_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down Expand Up @@ -1210,7 +1210,7 @@ static int diag_cmd_disable_log_mask(unsigned char *src_buf, int src_len,
mask_info = (!info) ? &log_mask : info->log_mask;
if (!src_buf || !dest_buf || src_len <= 0 || dest_len <= 0 ||
!mask_info) {
pr_err("diag: Invalid input in %s, src_buf: %p, src_len: %d, dest_buf: %p, dest_len: %d, mask_info: %p\n",
pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
__func__, src_buf, src_len, dest_buf, dest_len,
mask_info);
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/char/diag/diag_memorydevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ int diag_md_write(int id, unsigned char *buf, int len, int ctx)
if (ch->tbl[i].buf != buf)
continue;
found = 1;
pr_err_ratelimited("diag: trying to write the same buffer buf: %p, ctxt: %d len: %d at i: %d back to the table, proc: %d, mode: %d\n",
pr_err_ratelimited("diag: trying to write the same buffer buf: %pK, ctxt: %d len: %d at i: %d back to the table, proc: %d, mode: %d\n",
buf, ctx, ch->tbl[i].len,
i, id, driver->logging_mode);
}
Expand Down
11 changes: 6 additions & 5 deletions drivers/char/diag/diag_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void diag_usb_buf_tbl_remove(struct diag_usb_info *usb_info,
list_for_each_safe(start, temp, &usb_info->buf_tbl) {
entry = list_entry(start, struct diag_usb_buf_tbl_t, track);
if (entry->buf == buf) {
DIAG_LOG(DIAG_DEBUG_MUX, "ref_count-- for %p\n", buf);
DIAG_LOG(DIAG_DEBUG_MUX, "ref_count-- for %pK\n", buf);
atomic_dec(&entry->ref_count);
/*
* Remove reference from the table if it is the
Expand All @@ -155,7 +155,7 @@ static struct diag_usb_buf_tbl_t *diag_usb_buf_tbl_get(
list_for_each_safe(start, temp, &usb_info->buf_tbl) {
entry = list_entry(start, struct diag_usb_buf_tbl_t, track);
if (entry->buf == buf) {
DIAG_LOG(DIAG_DEBUG_MUX, "ref_count-- for %p\n", buf);
DIAG_LOG(DIAG_DEBUG_MUX, "ref_count-- for %pK\n", buf);
atomic_dec(&entry->ref_count);
return entry;
}
Expand Down Expand Up @@ -303,7 +303,7 @@ static void diag_usb_write_done(struct diag_usb_info *ch,
ch->write_cnt++;
entry = diag_usb_buf_tbl_get(ch, req->context);
if (!entry) {
pr_err_ratelimited("diag: In %s, unable to find entry %p in the table\n",
pr_err_ratelimited("diag: In %s, unable to find entry %pK in the table\n",
__func__, req->context);
return;
}
Expand Down Expand Up @@ -395,7 +395,7 @@ static int diag_usb_write_ext(struct diag_usb_info *usb_info,
struct diag_request *req = NULL;

if (!usb_info || !buf || len <= 0) {
pr_err_ratelimited("diag: In %s, usb_info: %p buf: %p, len: %d\n",
pr_err_ratelimited("diag: In %s, usb_info: %pK buf: %pK, len: %d\n",
__func__, usb_info, buf, len);
return -EINVAL;
}
Expand Down Expand Up @@ -515,7 +515,8 @@ int diag_usb_write(int id, unsigned char *buf, int len, int ctxt)

spin_lock_irqsave(&usb_info->write_lock, flags);
if (diag_usb_buf_tbl_add(usb_info, buf, len, ctxt)) {
DIAG_LOG(DIAG_DEBUG_MUX, "ERR! unable to add buf %p to table\n",
DIAG_LOG(DIAG_DEBUG_MUX,
"ERR! unable to add buf %pK to table\n",
buf);
diagmem_free(driver, req, usb_info->mempool);
spin_unlock_irqrestore(&usb_info->write_lock, flags);
Expand Down
16 changes: 8 additions & 8 deletions drivers/char/diag/diagchar_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ static int diag_process_userspace_remote(int proc, void *buf, int len)
int bridge_index = proc - 1;

if (!buf || len < 0) {
pr_err("diag: Invalid input in %s, buf: %p, len: %d\n",
pr_err("diag: Invalid input in %s, buf: %pK, len: %d\n",
__func__, buf, len);
return -EINVAL;
}
Expand Down Expand Up @@ -2163,7 +2163,7 @@ static int diag_process_apps_data_hdlc(unsigned char *buf, int len,
const uint32_t max_encoded_size = ((2 * len) + 3);

if (!buf || len <= 0) {
pr_err("diag: In %s, invalid buf: %p len: %d\n",
pr_err("diag: In %s, invalid buf: %pK len: %d\n",
__func__, buf, len);
return -EIO;
}
Expand Down Expand Up @@ -2282,7 +2282,7 @@ static int diag_process_apps_data_non_hdlc(unsigned char *buf, int len,
const uint32_t max_pkt_size = sizeof(header) + len + 1;

if (!buf || len <= 0) {
pr_err("diag: In %s, invalid buf: %p len: %d\n",
pr_err("diag: In %s, invalid buf: %pK len: %d\n",
__func__, buf, len);
return -EIO;
}
Expand Down Expand Up @@ -2353,7 +2353,7 @@ static int diag_user_process_dci_data(const char __user *buf, int len)
unsigned char *user_space_data = NULL;

if (!buf || len <= 0 || len > diag_mempools[mempool].itemsize) {
pr_err_ratelimited("diag: In %s, invalid buf %p len: %d\n",
pr_err_ratelimited("diag: In %s, invalid buf %pK len: %d\n",
__func__, buf, len);
return -EBADMSG;
}
Expand Down Expand Up @@ -2385,7 +2385,7 @@ static int diag_user_process_dci_apps_data(const char __user *buf, int len,
unsigned char *user_space_data = NULL;

if (!buf || len <= 0 || len > diag_mempools[mempool].itemsize) {
pr_err_ratelimited("diag: In %s, invalid buf %p len: %d\n",
pr_err_ratelimited("diag: In %s, invalid buf %pK len: %d\n",
__func__, buf, len);
return -EBADMSG;
}
Expand Down Expand Up @@ -2426,7 +2426,7 @@ static int diag_user_process_raw_data(const char __user *buf, int len)
struct diag_md_session_t *info = NULL;

if (!buf || len <= 0 || len > CALLBACK_BUF_SIZE) {
pr_err_ratelimited("diag: In %s, invalid buf %p len: %d\n",
pr_err_ratelimited("diag: In %s, invalid buf %pK len: %d\n",
__func__, buf, len);
return -EBADMSG;
}
Expand Down Expand Up @@ -2496,7 +2496,7 @@ static int diag_user_process_userspace_data(const char __user *buf, int len)
uint8_t hdlc_disabled;

if (!buf || len <= 0 || len > USER_SPACE_DATA) {
pr_err_ratelimited("diag: In %s, invalid buf %p len: %d\n",
pr_err_ratelimited("diag: In %s, invalid buf %pK len: %d\n",
__func__, buf, len);
return -EBADMSG;
}
Expand Down Expand Up @@ -2585,7 +2585,7 @@ static int diag_user_process_apps_data(const char __user *buf, int len,
uint8_t hdlc_disabled;

if (!buf || len <= 0 || len > DIAG_MAX_RSP_SIZE) {
pr_err_ratelimited("diag: In %s, invalid buf %p len: %d\n",
pr_err_ratelimited("diag: In %s, invalid buf %pK len: %d\n",
__func__, buf, len);
return -EBADMSG;
}
Expand Down
Loading