Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1356510 > unrolled thread
| Started by | James Simmons <jsimmons@infradead.org> |
|---|---|
| First post | 2016-03-12 19:10 +0100 |
| Last post | 2016-03-12 19:10 +0100 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 0/6] Last batch of lnet selftest cleanup James Simmons <jsimmons@infradead.org> - 2016-03-12 19:10 +0100
[PATCH 3/6] staging: lustre: handle error returned from wait_event_timeout seltest timer James Simmons <jsimmons@infradead.org> - 2016-03-12 19:10 +0100
[PATCH 2/6] staging: lustre: add missing buffer overflow fix for console.c James Simmons <jsimmons@infradead.org> - 2016-03-12 19:10 +0100
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2016-03-12 19:10 +0100 |
| Subject | [PATCH 0/6] Last batch of lnet selftest cleanup |
| Message-ID | <rbW9d-1Em-25@gated-at.bofh.it> |
Some fixes from two earlier patches got dropped so we add them to this batch. Last of the style cleanups for LNet selftest. Redid the comment style patch to format the comments correctly. Dmitry Eremin (1): staging: lustre: add missing buffer overflow fix for console.c James Nunez (1): staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc James Simmons (4): staging: lustre: handle error returned from wait_event_timeout seltest timer staging: lustre: remove excess blank lines in lnet selftest code staging: lustre: realign some code in lnet selftest so its readable staging: lustre: cleanup comment style for lnet selftest drivers/staging/lustre/lnet/selftest/brw_test.c | 4 +- drivers/staging/lustre/lnet/selftest/conctl.c | 50 +++++++++++----------- drivers/staging/lustre/lnet/selftest/conrpc.c | 19 ++++---- drivers/staging/lustre/lnet/selftest/console.c | 11 ++--- drivers/staging/lustre/lnet/selftest/framework.c | 14 +++--- drivers/staging/lustre/lnet/selftest/ping_test.c | 6 +- drivers/staging/lustre/lnet/selftest/rpc.c | 8 ++-- drivers/staging/lustre/lnet/selftest/timer.c | 12 +++-- 8 files changed, 61 insertions(+), 63 deletions(-)
[toc] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2016-03-12 19:10 +0100 |
| Subject | [PATCH 3/6] staging: lustre: handle error returned from wait_event_timeout seltest timer |
| Message-ID | <rbW9d-1Em-45@gated-at.bofh.it> |
| In reply to | #1356510 |
The function wait_event_timeout can fail and return an error. Handle
this case in stt_timer_main().
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lnet/selftest/timer.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/lustre/lnet/selftest/timer.c b/drivers/staging/lustre/lnet/selftest/timer.c
index 8be5252..ef8a8a7 100644
--- a/drivers/staging/lustre/lnet/selftest/timer.c
+++ b/drivers/staging/lustre/lnet/selftest/timer.c
@@ -170,20 +170,22 @@ stt_check_timers(unsigned long *last)
static int
stt_timer_main(void *arg)
{
+ int rc = 0;
+
cfs_block_allsigs();
while (!stt_data.stt_shuttingdown) {
stt_check_timers(&stt_data.stt_prev_slot);
- wait_event_timeout(stt_data.stt_waitq,
- stt_data.stt_shuttingdown,
- cfs_time_seconds(STTIMER_SLOTTIME));
+ rc = wait_event_timeout(stt_data.stt_waitq,
+ stt_data.stt_shuttingdown,
+ cfs_time_seconds(STTIMER_SLOTTIME));
}
spin_lock(&stt_data.stt_lock);
stt_data.stt_nthreads--;
spin_unlock(&stt_data.stt_lock);
- return 0;
+ return rc;
}
static int
--
1.7.1
[toc] | [prev] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2016-03-12 19:10 +0100 |
| Subject | [PATCH 2/6] staging: lustre: add missing buffer overflow fix for console.c |
| Message-ID | <rbW9d-1Em-39@gated-at.bofh.it> |
| In reply to | #1356510 |
From: Dmitry Eremin <dmitry.eremin@intel.com> Patch 9389 change a strncpy call into a strlcpy call. This was missed in the merger into the upstream client. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-on: http://review.whamcloud.com/9389 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> --- drivers/staging/lustre/lnet/selftest/console.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index 1a923ea..c009ad3 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -1749,7 +1749,7 @@ lstcon_session_new(char *name, int key, unsigned feats, if (strlen(name) > sizeof(console_session.ses_name) - 1) return -E2BIG; - strncpy(console_session.ses_name, name, + strlcpy(console_session.ses_name, name, sizeof(console_session.ses_name)); rc = lstcon_batch_add(LST_DEFAULT_BATCH); -- 1.7.1
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web