id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
cbde689823776d187ba1b307a171625dbc02dd4f
Analyze and fix the following issue in the Linux kernel code: [media] tuner-core: Better implement standby mode
Problem Details: In the past, T_STANDBY were used on devices with a separate radio tuner to mark a tuner that were disabled. With the time, it got newer meanings. Also, due to a bug at the logic, the driver might incorrectly return T_STANDBY to userspace. So, instead of keeping the abuse, just use a boolean for stori...
```diff diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 7cdfe3af6e74..e6855a46f433 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -115,9 +115,11 @@ struct tuner { unsigned int radio_freq; unsigned int audmode; - unsigned...
b77bdb028807bb1f78b5b50127456e1f664bd501
Analyze and fix the following issue in the Linux kernel code: [media] tuner-core: move some messages to the proper place
Problem Details: Move the frequency set debug printk's to the code that actually are changing it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 912d8e87658f..f497f5299e88 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -246,6 +246,9 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq) freq = tv_range[1] * 16;...
5b2830298dc0534eb33277a31f353bb524e2cc2e
Analyze and fix the following issue in the Linux kernel code: [media] vivi: fix compiler warning
Problem Details: drivers/media/video/vivi.c:1059: warning: this decimal constant is unsigned only in ISO C90 Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 66ce69e2833b..bd104d0ad36c 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -1082,8 +1082,8 @@ static const struct v4l2_ctrl_config vivi_ctrl_int32 = { .id = VIVI_CID_CUSTOM_BASE + 2, .name = "Integer 32 Bi...
ceed52d67e1cf7866fa96514525c615554a0e44e
Analyze and fix the following issue in the Linux kernel code: [media] adv7343: use control framework
Problem Details: Also fixed a memory leak in the probe function if an error occurred. The gain control range was also fixed (a proper range from -64 to 64). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/adv7343.c b/drivers/media/video/adv7343.c index 41b2930d0ce4..021fab23070d 100644 --- a/drivers/media/video/adv7343.c +++ b/drivers/media/video/adv7343.c @@ -29,6 +29,7 @@ #include <media/adv7343.h> #include <media/v4l2-device.h> #include <media/v4l2-chip-ident.h> +#include <...
99fb079aad031712283d555aa87251706aa60212
Analyze and fix the following issue in the Linux kernel code: [media] saa7134: Properly report when a board doesn't have eeprom
Problem Details: When a device is not detected, the driver prints a warning message. That's ok, except for the fact that, even on newer devices that have eeprom but aren't yet supported, it prints a message saying that the device doesn't have eeprom. Fix it by having a separate message for devices with eeprom, but not...
```diff diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 6abeecff6da7..41f836fc93ec 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c @@ -752,19 +752,28 @@ static int saa7134_hwfini(struct saa7134_dev *dev) ...
db4d56835e07ec793f143431170ba2fc17bf0191
Analyze and fix the following issue in the Linux kernel code: [media] DocBook/v4l: fix validation errors
Problem Details: Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/Documentation/DocBook/v4l/planar-apis.xml b/Documentation/DocBook/v4l/planar-apis.xml index 8be7552b37de..7f3f5527057e 100644 --- a/Documentation/DocBook/v4l/planar-apis.xml +++ b/Documentation/DocBook/v4l/planar-apis.xml @@ -53,28 +53,28 @@ <variablelist> <varlistentry> <term>...
dbf05b279b8ed398a8e92b0c1187882f6df2bf7f
Analyze and fix the following issue in the Linux kernel code: [media] ngene: Fix compilation when cxd2099 is not enabled
Problem Details: drivers/media/dvb/ngene/ngene-i2c.o: In function `cxd2099_attach': ngene-i2c.c:(.text+0x195): multiple definition of `cxd2099_attach' drivers/media/dvb/ngene/ngene-core.o:ngene-core.c:(.text+0x100): first defined here drivers/media/dvb/ngene/ngene-cards.o: In function `cxd2099_attach': ngene-cards.c:(....
```diff diff --git a/drivers/staging/cxd2099/cxd2099.h b/drivers/staging/cxd2099/cxd2099.h index a313dc26b962..bed54ff3e30b 100644 --- a/drivers/staging/cxd2099/cxd2099.h +++ b/drivers/staging/cxd2099/cxd2099.h @@ -31,7 +31,7 @@ (defined(CONFIG_DVB_CXD2099_MODULE) && defined(MODULE)) struct dvb_ca_en50221 *cx...
179fd15a99175e8e22516edbb1894c3348842f3a
Analyze and fix the following issue in the Linux kernel code: [media] stv090x: Fix losing lock in dual DVB-S2 mode
Problem Details: Do not clear registers ACLC/BCLC in DVB-S2 mode for Cut <= 20. Otherwise, the demod could lose the lock periodically. Verified with cineS2 and Duoflex. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.c...
```diff diff --git a/drivers/media/dvb/frontends/stv090x.c b/drivers/media/dvb/frontends/stv090x.c index eccad06216ce..e3442a14e5b2 100644 --- a/drivers/media/dvb/frontends/stv090x.c +++ b/drivers/media/dvb/frontends/stv090x.c @@ -2894,10 +2894,12 @@ static int stv090x_optimize_track(struct stv090x_state *state) STV...
e549bedf8fd9887529adf1a511501d4c036a2cfe
Analyze and fix the following issue in the Linux kernel code: [media] ngene: Fix copy-paste error
Problem Details: Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c index 6a097e44a4a8..a14b69c44cc1 100644 --- a/drivers/media/dvb/ngene/ngene-core.c +++ b/drivers/media/dvb/ngene/ngene-core.c @@ -47,7 +47,7 @@ MODULE_PARM_DESC(one_adapter, "Use only one adapter."); static int shutdown_...
ac9725d224544954a8d3413a2a66bdf49f735d8b
Analyze and fix the following issue in the Linux kernel code: [media] ngene: Fixes for TS input over I2S
Problem Details: Fix TS input over I2S. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/ngene/ngene-core.c b/drivers/media/dvb/ngene/ngene-core.c index cd5b1f3e902d..8764647e55f3 100644 --- a/drivers/media/dvb/ngene/ngene-core.c +++ b/drivers/media/dvb/ngene/ngene-core.c @@ -143,7 +143,7 @@ static void demux_tasklet(unsigned long data) } } else { if (chan-...
2c2c441b10644a273ff82a43ec18034ec1dd4c4e
Analyze and fix the following issue in the Linux kernel code: [media] dib8000: Fix some wrong alignments
Problem Details: Something went wrong with the alignments for the if clause at line 2113. Instead of using one tab for alignments, it used 3 tabs, plus one space character. WARNING: suspect code indent for conditional statements (8, 33) + if ((state->fe[0]->dtv_property_cache.delivery_system != SYS_ISDBT) || [...] + ...
```diff diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c index 3961fed9da6e..3e20aa8db23b 100644 --- a/drivers/media/dvb/frontends/dib8000.c +++ b/drivers/media/dvb/frontends/dib8000.c @@ -2134,54 +2134,54 @@ static int dib8000_set_frontend(struct dvb_frontend *fe, struct dvb_f...
46f7296a52caf4e270ee43d9402eb0cecef13fdd
Analyze and fix the following issue in the Linux kernel code: [media] dib7000p: Fix 4-byte wrong alignments for some case statements
Problem Details: ERROR: switch and case should be at the same indent switch (ch->u.ofdm.transmission_mode) { [...] + case TRANSMISSION_MODE_4K: WARNING: please, no spaces at the start of a line + case TRANSMISSION_MODE_4K:$ ERROR: switch and case should be at the same indent switch (ch->u.ofdm.transmission_...
```diff diff --git a/drivers/media/dvb/frontends/dib7000p.c b/drivers/media/dvb/frontends/dib7000p.c index b3ca3e2f8d53..900af60b9d36 100644 --- a/drivers/media/dvb/frontends/dib7000p.c +++ b/drivers/media/dvb/frontends/dib7000p.c @@ -880,7 +880,7 @@ static void dib7000p_set_channel(struct dib7000p_state *state, struct...
ba10795ed1018488964e6054b5076ec31a471d96
Analyze and fix the following issue in the Linux kernel code: [media] s5p-fimc: fimc_stop_capture bug fix
Problem Details: When is called fimc_stop_capture, it seems that wait_event_timeout used improperly. It should be wake up by irq handler. Reviewed-by Jonghun Han <jonghun.han@samsung.com> Signed-off-by: Sungchun Kang <sungchun.kang@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index c326f6bbf290..5159cc8a0e1c 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -204,7 +204,7 @@ static int fimc_stop_capture(struct fimc_dev *fim...
5bbe425e57d3ca715cfe9c98bac5f8f07a96c81a
Analyze and fix the following issue in the Linux kernel code: [media] s5p-fimc: fix MSCTRL.FIFO_CTRL for performance enhancement
Problem Details: This patch fixes the value of FIFO_CTRL in MSCTRL. Main-scaler has the value to specify a basis FIFO control of input DMA. The description of FIFO_CTRL has been changed as below. 0 = FIFO Empty (Next burst transaction is possible when FIFO is empty) 1 = FIFO Full (Next burst transaction is possible ex...
```diff diff --git a/drivers/media/video/s5p-fimc/fimc-reg.c b/drivers/media/video/s5p-fimc/fimc-reg.c index 8e5a0bbae580..10684aef5b2d 100644 --- a/drivers/media/video/s5p-fimc/fimc-reg.c +++ b/drivers/media/video/s5p-fimc/fimc-reg.c @@ -437,7 +437,9 @@ void fimc_hw_set_in_dma(struct fimc_ctx *ctx) | S5P_MSCTRL_C_I...
10038bea7a729bcb8c51a2c856f5b58b33646d65
Analyze and fix the following issue in the Linux kernel code: [media] s5p-fimc: fix the value of YUV422 1-plane formats
Problem Details: Some color formats are mismatched in s5p-fimc driver. CIOCTRL[1:0], order422_out, should be set 2b'00 not 2b'11 to use V4L2_PIX_FMT_YUYV. Because in V4L2 standard V4L2_PIX_FMT_YUYV means "start + 0: Y'00 Cb00 Y'01 Cr00 Y'02 Cb01 Y'03 Cr01". According to datasheet 2b'00 is right value for V4L2_PIX_FMT_Y...
```diff diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c index db249e6c355d..70d6b4c9760f 100644 --- a/drivers/media/video/s5p-fimc/fimc-core.c +++ b/drivers/media/video/s5p-fimc/fimc-core.c @@ -450,34 +450,34 @@ static void fimc_set_yuv_order(struct fimc_ctx *ctx) /* S...
c4c0a78d459f2e4fcc7c4f3621a34e71ec7970d0
Analyze and fix the following issue in the Linux kernel code: [media] Fix mmap() example in the V4L2 API DocBook
Problem Details: Correct ioctl return value handling and fix coding style issues. [mchehab@redhat.com: return -1 is OK, according with ioctl manpages. Reverting ioctl changes] Signed-off-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/Documentation/DocBook/v4l/io.xml b/Documentation/DocBook/v4l/io.xml index d424886beda0..a9750437000c 100644 --- a/Documentation/DocBook/v4l/io.xml +++ b/Documentation/DocBook/v4l/io.xml @@ -141,63 +141,63 @@ struct { } *buffers; unsigned int i; -memset (&amp;reqbuf, 0, sizeof (reqbuf)); +memset...
08b99e26a347441c50c1113802801a122dd1eb7a
Analyze and fix the following issue in the Linux kernel code: [media] vb2 core: Fix a few printk warnings
Problem Details: drivers/media/video/videobuf2-core.c: In function ‘__vb2_perform_fileio’: drivers/media/video/videobuf2-core.c:1638: warning: format ‘%ld’ expects type ‘long int’, but argument 4 has type ‘size_t’ drivers/media/video/videobuf2-core.c:1697: warning: format ‘%ld’ expects type ‘long int’, but argument 2 h...
```diff diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 73f3b220b34a..cc7ab0a17b68 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -1635,7 +1635,7 @@ static size_t __vb2_perform_fileio(struct vb2_queue *q, char __user *data, ...
f8f3914cf922f5f9e1d60e9e10f6fb92742907ad
Analyze and fix the following issue in the Linux kernel code: [media] v4l: Add multi-planar API definitions to the V4L2 API
Problem Details: Multi-planar API is as a backwards-compatible extension of the V4L2 API, which allows video buffers to consist of one or more planes. Planes are separate memory buffers; each has its own mapping, backed by usually separate physical memory buffers. Many different uses for the multi-planar API are possi...
```diff diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index f51327ef6757..1a9d90ab666b 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c @@ -165,6 +165,8 @@ const char *v4l2_type_names[] = { [V4L2_BUF_TYPE_SLICED_VBI_CAPTURE] = "sliced-vbi-cap", ...
739ff04f63ba6498b287021649cb999e639c3c83
Analyze and fix the following issue in the Linux kernel code: [media] technisat-usb2: added driver for Technisat's USB2.0 DVB-S/S2 receiver
Problem Details: This patch is adding support for Technisat's new USB2.0 DVB-S/S2 receiver device. The development was sponsored by Technisat. The Green led is toggle depending on the frontend-state. The Red LED is turned on all the time. The MAC address reading from the EEPROM along with the LRC-method to check whet...
```diff diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 3d48ba019342..fe4f894183ff 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig @@ -358,3 +358,11 @@ config DVB_USB_LME2510 select DVB_IX2505V if !DVB_FE_CUSTOMISE help Say Y here t...
147851d2dc4d2be2f60d40276d12d7ef82f8a7ce
Analyze and fix the following issue in the Linux kernel code: ceph: rename dentry_release -> d_release, fix comment
Problem Details: Just for consistency's sake. Fix obsolete comment too. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index cbe875d3a522..1a867a3601ae 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1027,14 +1027,13 @@ out_touch: } /* - * When a dentry is released, clear the dir I_COMPLETE if it was part - * of the current dir gen or if this is in the snapshot namespace. + * Re...
78a255654fa7f01945dea0dcedcf5113b3ad9f93
Analyze and fix the following issue in the Linux kernel code: ceph: remove request from unsafe list if it is canceled/timed out
Problem Details: This fixes the list corruption warning like this: ------------[ cut here ]------------ WARNING: at lib/list_debug.c:30 __list_add+0x68/0x81() Hardware name: X8DTU list_add corruption. prev->next should be next (ffff880618931250), but was (null). (prev=ffff880c188b9130). Modules linked in: nfsd lockd n...
```diff diff --git a/fs/ceph/file.c b/fs/ceph/file.c index 7d0e4a82d898..db5d86309744 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -568,7 +568,14 @@ more: spin_unlock(&ci->i_unsafe_lock); ceph_get_cap_refs(ci, CEPH_CAP_FILE_WR); } + ret = ceph_osdc_wait_request(&fsc->client->osdc, req); + if (re...
21f3b5f1bbc3c27e82a8c9fc9861fa20bcb31f26
Analyze and fix the following issue in the Linux kernel code: ceph: remove debugfs debug cruft
Problem Details: Whoops! Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 08f65faac112..0dba6915712b 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -210,8 +210,6 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc) if (!fsc->debugfs_congestion_kb) goto out; - dout("a\n"); - snprintf(name, sizeof(name), "....
6f6c7006755b667f9f6c1f3b6f08cd65f75cc471
Analyze and fix the following issue in the Linux kernel code: libceph: fix osd request queuing on osdmap updates
Problem Details: If we send a request to osd A, and the request's pg remaps to osd B and then back to A in quick succession, we need to resend the request to A. The old code was only calling kick_requests after processing all incremental maps in a message, so it was very possible to not resend a request that needed to ...
```diff diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h index a1af29648fb5..e791b8e46353 100644 --- a/include/linux/ceph/osd_client.h +++ b/include/linux/ceph/osd_client.h @@ -74,7 +74,6 @@ struct ceph_osd_request { char r_oid[40]; /* object name */ int ...
61e1b0b00c793ad5a32fe2181c9f77115fed5dc4
Analyze and fix the following issue in the Linux kernel code: ath9k: Fix kernel panic in AR2427
Problem Details: Kernel panic occurs just after AR2427 establishes connection with AP. Unless aggregation is enabled we don't initialize the TID structure. Thus accesing the elements of the TID structure when aggregation is disabled, leads to NULL pointer dereferencing. [ 191.320358] Call Trace: [ 191.320364] [<fd2...
```diff diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index ef22096d40c9..26734e53b37f 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -1725,8 +1725,8 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, ...
858022aa6fad90ec86c567cbf54682a61dd39a01
Analyze and fix the following issue in the Linux kernel code: wireless: fix 80211 kernel-doc warnings
Problem Details: Fix many of each of these warnings: Warning(include/net/cfg80211.h:519): No description found for parameter 'rxrate' Warning(include/net/mac80211.h:1163): bad line: Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <lin...
```diff diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 60f7876b6da8..b2b9d28cb4ab 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -486,7 +486,8 @@ struct rate_info { * @plink_state: mesh peer link state * @signal: signal strength of last received packet in dBm * @signal_avg...
6e9d592f02f657361168c94e22d9602cad71a09c
Analyze and fix the following issue in the Linux kernel code: rtlwifi: Fix memset argument order
Problem Details: These were found using the following semantic match: // <smpl> @@expression E1; type T;@@ * memset(E1, ... * sizeof(T) * ..., ...); // </smpl> Also take this opportunity to remove the unnecessary void* casts. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Larry Finger <Larry.Finger@lwfi...
```diff diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c index 4f92cba6810a..f74a8701c67d 100644 --- a/drivers/net/wireless/rtlwifi/efuse.c +++ b/drivers/net/wireless/rtlwifi/efuse.c @@ -410,8 +410,8 @@ bool efuse_shadow_update(struct ieee80211_hw *hw) if (!efuse_shadow_updat...
96b4b9bfea28e38c38d26ca47e82ac0fbe2f28b6
Analyze and fix the following issue in the Linux kernel code: hp_accel: Fix driver name
Problem Details: I suspect that the "lis3lv02d" driver name is a legacy from before the split into several modules. Use a specific name for the hp_accel driver, for better error messages and easier investigation of issues. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson...
```diff diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c index 0a52711a6362..1b52d00e2f90 100644 --- a/drivers/platform/x86/hp_accel.c +++ b/drivers/platform/x86/hp_accel.c @@ -39,7 +39,7 @@ #include <acpi/acpi_drivers.h> #include "../../misc/lis3lv02d/lis3lv02d.h" -#define DRIVER_NAME...
ccd32e735de7a941906e093f8dca924bb05c5794
Analyze and fix the following issue in the Linux kernel code: hwmon: (sht15) Fix integer overflow in humidity calculation
Problem Details: An integer overflow occurs in the calculation of RHlinear when the relative humidity is greater than around 30%. The consequence is a subtle (but noticeable) error in the resulting humidity measurement. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Jean Delvare <kh...
```diff diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c index 3ba7dd82589a..1a9c32d6893a 100644 --- a/drivers/hwmon/sht15.c +++ b/drivers/hwmon/sht15.c @@ -333,11 +333,11 @@ static inline int sht15_calc_humid(struct sht15_data *data) const int c1 = -4; const int c2 = 40500; /* x 10 ^ -6 */ - const int ...
396bd766a604b823369962ee0203c603b9c0bdec
Analyze and fix the following issue in the Linux kernel code: hwmon: (sht15) Spelling fix
Problem Details: Remove one too many "n" in a word. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c index a610e7880fb3..3ba7dd82589a 100644 --- a/drivers/hwmon/sht15.c +++ b/drivers/hwmon/sht15.c @@ -610,7 +610,7 @@ static int __devexit sht15_remove(struct platform_device *pdev) struct sht15_data *data = platform_get_drvdata(pdev); /* Make sure ...
bbfa306a1e5d9618231aa0de3d52a8eb1219d0c3
Analyze and fix the following issue in the Linux kernel code: PCI: Changing ASPM policy, via /sys, to POWERSAVE could cause NMIs
Problem Details: v3 -> v2: Modified the text that describes the problem v2 -> v1: Returned -EPERM v1 : http://marc.info/?l=linux-pci&m=130013194803727&w=2 For servers whose hardware cannot handle ASPM the BIOS ought to set the FADT bit shown below: In Sec 5.2.9.3 (IA-PC Boot Arch. Flags) of ACPI4.0a Specification...
```diff diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index e61b82e611c2..eee09f756ec9 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -770,6 +770,8 @@ static int pcie_aspm_set_policy(const char *val, struct kernel_param *kp) int i; struct pcie_link_state *link; + if (aspm_d...
1a680b7c325882188865f05b9a88d32f75f26495
Analyze and fix the following issue in the Linux kernel code: PCI: PCIe links may not get configured for ASPM under POWERSAVE mode
Problem Details: v3 -> v2: Moved ASPM enabling logic to pci_set_power_state() v2 -> v1: Preserved the logic in pci_raw_set_power_state() : Added ASPM enabling logic after scanning Root Bridge : http://marc.info/?l=linux-pci&m=130046996216391&w=2 v1 : http://marc.info/?l=linux-pci&m=130013164703283&w=2 The assumption...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b714d787bddd..2472e7177b4b 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -740,6 +740,12 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state) if (!__pci_complete_power_transition(dev, state)) error = 0; + /* + * When aspm_...
8b8bae901ce23addbdcdb54fa1696fb2d049feb5
Analyze and fix the following issue in the Linux kernel code: PCI/ACPI: Report ASPM support to BIOS if not disabled from command line
Problem Details: We need to distinguish the situation in which ASPM support is disabled from the command line or through .config from the situation in which it is disabled, because the hardware or BIOS can't handle it. In the former case we should not report ASPM support to the BIOS through ACPI _OSC, but in the latte...
```diff diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 85249395623b..c7358dd68b31 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -564,7 +564,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device) /* Indicate support for various _OSC capabilities. */ if (...
d586dca06adddc6cee7177b013ee93eaffc9fe0e
Analyze and fix the following issue in the Linux kernel code: HID: add support for Skycable 0x3f07 wireless presenter
Problem Details: This device contains the very same bug in report descriptor as the Ortek ones do (i.e. LogicalMinimum == 1, which is wrong for the key array). As we have more reports for the Ortek devices, we are keeping the driver name for now. Apparently there is a chip producer which sells chip with this buggy des...
```diff diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index b7ec4057841d..111da3c6965b 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -340,10 +340,17 @@ config HID_NTRIG Support for N-Trig touch screen. config HID_ORTEK - tristate "Ortek PKB-1700/WKB-2000 wireless keyboard and mouse trackpa...
d0a365e84a886ce6b5b7f7a76be0bb24934ec8f0
Analyze and fix the following issue in the Linux kernel code: Btrfs: deal with min_bytes appropriately when looking for a cluster
Problem Details: We do all this fun stuff with min_bytes, but either don't use it in the case of just normal extents, or use it completely wrong in the case of bitmaps. So fix this for both cases 1) In the extent case, stop looking for space with window_free >= min_bytes instead of bytes + empty_size. 2) In the bitm...
```diff diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index f631df870f64..63776ae72f9e 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -1910,8 +1910,8 @@ static int btrfs_bitmap_cluster(struct btrfs_block_group_cache *block_group, i = offset_to_bit(entry->offse...
69b195be51620d72956acbf3029adad5765695dc
Analyze and fix the following issue in the Linux kernel code: bfs: fix bitmap size argument to find_first_zero_bit()
Problem Details: The usage of find_first_zero_bit() in bfs_create() is wrong for two reasons. The bitmap size argument to find_first_zero_bit() is info->si_lasti but the correct bitmap size is info->si_lasti + 1 as info->si_lasti is the last valid index in info->si_imap bitmap. Another problem is that it is impossibl...
```diff diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c index 685ecff3ab31..b14cebfd9047 100644 --- a/fs/bfs/dir.c +++ b/fs/bfs/dir.c @@ -97,7 +97,7 @@ static int bfs_create(struct inode *dir, struct dentry *dentry, int mode, if (!inode) return -ENOSPC; mutex_lock(&info->bfs_lock); - ino = find_first_zero_bit(info->si_...
375d135818f32bbe7b3f071bd54d977c4ff8d84a
Analyze and fix the following issue in the Linux kernel code: ALSA: tea575x-tuner: various improvements
Problem Details: Improve tea575x-tuner with various good things from radio-maestro: - extend frequency range to 50-150MHz - fix querycap(): card name, CAP_RADIO - improve g_tuner(): CAP_STEREO, stereo and tuned indication - improve g_frequency(): tuner index checking and reading frequency from HW - improve s_frequency(...
```diff diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index 5718a02d3afb..3d6cdd80df59 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h @@ -38,8 +38,10 @@ struct snd_tea575x { struct snd_card *card; struct video_device *vd; /* video device */ int dev_nr; ...
3ffc1222bd2c30b0ef2d3a797b0e0070c7c61a98
Analyze and fix the following issue in the Linux kernel code: ALSA: usb - Remove trailing spaces from USB card name strings
Problem Details: Some USB devices give trailing spaces in strings returned from usb_string(). This confuses the automatic card-id creation, resulting always in "default". This patch fixes the behavior by removing trailing spaces. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/usb/card.c b/sound/usb/card.c index 40722f8711ad..a90662af2d6b 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -41,6 +41,7 @@ #include <linux/list.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/ctype.h> #include <linux/usb.h> #include <linux/moduleparam.h> ...
33874cb8cdce865938094e1a317cbfe2d7fb1ad7
Analyze and fix the following issue in the Linux kernel code: CRISv10: Fix return before mutex_unlock in pcf8563
Problem Details: Signed-off-by: Simone Contini <s.contini@oltrelinux.com> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
```diff diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c index ea69faba9b62..1391b731ad1c 100644 --- a/arch/cris/arch-v10/drivers/pcf8563.c +++ b/arch/cris/arch-v10/drivers/pcf8563.c @@ -345,7 +345,7 @@ static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsig...
23e74a86ab43e5cccbf90edb76fc396e36acc998
Analyze and fix the following issue in the Linux kernel code: i2c-pxa2xx: Fix register offsets
Problem Details: Fix regression that was introduced by dynamic register layout. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 27b28e78666e..b914184748c9 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -65,19 +65,19 @@ enum pxa_i2c_types { */ static struct pxa_reg_layout pxa_reg_layout[] = { [REGS_PXA2XX] = { - .ibmr = 0...
baa8cab012ff07d6835580b19c2fd93a20627823
Analyze and fix the following issue in the Linux kernel code: i2c-pxa2xx: pass of_node from platform driver to adapter and publish
Problem Details: the of_node will auto-publish devices which are added to the device tree. Commit 925bb9c6 aka ("of/i2c: Fix module load order issue caused by of_i2c.c) moved the of_i2c_register_devices() function from the i2c core back to the drivers. This patch does the same thing for the pxa driver. Signed-off-by:...
```diff diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 86128363a57f..27b28e78666e 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -29,6 +29,7 @@ #include <linux/errno.h> #include <linux/interrupt.h> #include <linux/i2c-pxa.h> +#include <linux/of_i2c.h> ...
5e84ea3a9c662dc2d7a48703a4468fad954a3b7f
Analyze and fix the following issue in the Linux kernel code: block: attempt to merge with existing requests on plug flush
Problem Details: One of the disadvantages of on-stack plugging is that we potentially lose out on merging since all pending IO isn't always visible to everybody. When we flush the on-stack plugs, right now we don't do any checks to see if potential merge candidates could be utilized. Correct this by adding a new inser...
```diff diff --git a/block/blk-core.c b/block/blk-core.c index e1fcf7a24668..525693237a4a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2685,7 +2685,7 @@ static void flush_plug_list(struct blk_plug *plug) /* * rq is already accounted, so use raw insert */ - __elv_add_request(q, rq, ELEVATOR_INSER...
a872d5101008b091035d579897bccefdeff70def
Analyze and fix the following issue in the Linux kernel code: pstore: fix leaking ->i_private
Problem Details: Move kfree() of i_private out of ->unlink() and into ->evict_inode() Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 08342232cb1c..f777f2902c49 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c @@ -73,11 +73,16 @@ static int pstore_unlink(struct inode *dir, struct dentry *dentry) struct pstore_private *p = dentry->d_inode->i_private; p->erase(p->id); - kfree(...
1bef82917c74249ff21982127e57defd6ca2bb1b
Analyze and fix the following issue in the Linux kernel code: Small typo fix...
Problem Details: Hi, I was backporting the coredump over pipe feature and noticed this small typo, I wish I would have something bigger to contribute... >From 15d6080e0ed4267da103c706917a33b1015e8804 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther <holger@moiji-mobile.com> Date: Thu, 24 Feb 2011 17:42:50 +0...
```diff diff --git a/fs/exec.c b/fs/exec.c index ba99e1abb1aa..5e62d26a4fec 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1875,7 +1875,7 @@ static void wait_for_dump_helpers(struct file *file) /* - * uhm_pipe_setup + * umh_pipe_setup * helper function to customize the process used * to collect the core in userspa...
eaae668d01e15435cf977cced3975ccc436257fc
Analyze and fix the following issue in the Linux kernel code: fs/inode: Fix kernel-doc format for inode_init_owner
Problem Details: Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/inode.c b/fs/inode.c index 9910c039f026..16fefd373fc2 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1715,7 +1715,7 @@ void init_special_inode(struct inode *inode, umode_t mode, dev_t rdev) EXPORT_SYMBOL(init_special_inode); /** - * Init uid,gid,mode for new inode according to posix standards ...
db552b3331766e16c35550a4b83c3a42671ba73e
Analyze and fix the following issue in the Linux kernel code: r8169: fix a bug in rtl8169_init_phy()
Problem Details: commit 54405cde7624 (r8169: support control of advertising.) introduced a bug in rtl8169_init_phy() Reported-and-tested-by: Piotr Hosowicz <piotr@hosowicz.com> Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by:: Oliver ...
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 5e403511289d..493b0de3848b 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2685,9 +2685,9 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp) rtl8169_set_speed(dev, AUTONEG_ENABLE, SPEED_1000, DUPLEX_FU...
a71f5d5d279375205009a4be56a3cf6682921292
Analyze and fix the following issue in the Linux kernel code: powerpc/ptrace: Remove BUG_ON when full register set not available
Problem Details: In some cases during a threaded core dump not all the threads will have a full register set. This happens when the signal causing the core dump races with a thread exiting. The race happens when the exiting thread has entered the kernel for the last time before the signal arrives, but doesn't get far ...
```diff diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 0175a676b34b..48223f9b8728 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h @@ -125,8 +125,10 @@ extern int ptrace_put_reg(struct task_struct *task, int regno, #endif /* ! __powerpc64_...
90407c9976939e061f32b0e07602e5ce4887d9e8
Analyze and fix the following issue in the Linux kernel code: powerpc/pci: Fix crash in PCI code on ppc64 when matching device nodes
Problem Details: Commit b5d937de0367d26f65b9af1aef5f2c34c1939be0 has a bug which causes basically a NULL dereference in the PCI code during boot on ppc64 machines. fetch_dev_dn() is called when dev->dev.of_node is NULL, so using that as the starting point for the search makes no sense. It should instead start from the...
```diff diff --git a/arch/powerpc/kernel/pci_dn.c b/arch/powerpc/kernel/pci_dn.c index 29852688ceaa..d225d99fe39d 100644 --- a/arch/powerpc/kernel/pci_dn.c +++ b/arch/powerpc/kernel/pci_dn.c @@ -176,11 +176,14 @@ static void *is_devfn_node(struct device_node *dn, void *data) */ struct device_node *fetch_dev_dn(struc...
b74ad5ae14def5e81ad0be3dddb96e485b861b1b
Analyze and fix the following issue in the Linux kernel code: drm: Fix use-after-free in drm_gem_vm_close()
Problem Details: As we may release the last reference, we need to store the device in a local variable in order to unlock afterwards. [ 60.140768] BUG: unable to handle kernel paging request at 6b6b6b9f [ 60.140973] IP: [<c1536d11>] __mutex_unlock_slowpath+0x5a/0x111 [ 60.141014] *pdpt = 0000000024a54001 *pde = ...
```diff diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 57ce27c9a747..74e4ff578017 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -499,11 +499,12 @@ EXPORT_SYMBOL(drm_gem_vm_open); void drm_gem_vm_close(struct vm_area_struct *vma) { struct drm_gem_object *obj = vm...
25d391cbe610009d2ea10d820f36621b7610c963
Analyze and fix the following issue in the Linux kernel code: ARM: S3C2410: H1940: Fix lcd_power_set function
Problem Details: Current implementation of lcd_power_set is not reliable, sometimes it does not enable LCD at all. Mimic WinCE behavior to fix this issue. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index a0116ef2eca7..882b32af9dde 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c @@ -30,6 +30,7 @@ #include <linux/leds.h> #include <linux/pda_power.h> #include <linux/s3c_adc_battery...
a24c5a0ea902bcda348f086bd909cc2d6e305bf8
Analyze and fix the following issue in the Linux kernel code: slub: Dont define useless label in the !CONFIG_CMPXCHG_LOCAL case
Problem Details: The redo label needs #ifdeffery. Fixes the following problem introduced by commit 8a5ec0ba42c4 ("Lockless (and preemptless) fastpaths for slub"): mm/slub.c: In function 'slab_free': mm/slub.c:2124: warning: label 'redo' defined but not used Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Sig...
```diff diff --git a/mm/slub.c b/mm/slub.c index 65030c7fd7e2..f32aee37840b 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2073,9 +2073,11 @@ static __always_inline void slab_free(struct kmem_cache *s, #ifndef CONFIG_CMPXCHG_LOCAL local_irq_save(flags); -#endif +#else redo: +#endif + /* * Determine the current...
115881d395959b75c8c3bb94913f2ce869b8aa7a
Analyze and fix the following issue in the Linux kernel code: firewire: core: ignore link-active bit of new nodes, fix device recognition
Problem Details: Like the older ieee1394 core driver, firewire-core skipped scanning of any new node whose PHY sent a self ID without "link active" bit. If a device had this bit off mistakenly, it meant that it was inaccessible to kernel drivers with the old IEEE 1394 driver stack but could still be accessed by usersp...
```diff diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index 57461923bacf..9a262439e3a7 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c @@ -955,8 +955,9 @@ static void fw_device_init(struct work_struct *work) device->config_rom_retries++; schedule_d...
7a4e1e9c682cd87fe8a749b435b13afeef083c34
Analyze and fix the following issue in the Linux kernel code: firewire: sbp2: revert obsolete 'fix stall with "Unsolicited response"'
Problem Details: Now that firewire-core sets the local node's SPLIT_TIMEOUT to 2 seconds per default, commit a481e97d3cdc40b9d58271675bd4f0abb79d4872 is no longer required. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index afa576a75a8e..77ed589b360d 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c @@ -472,18 +472,12 @@ static void complete_transaction(struct fw_card *card, int rcode, * So this callback only sets the rcode if it hasn't alread...
961ed183a9fd080cf306c659b8736007e44065a5
Analyze and fix the following issue in the Linux kernel code: netfilter: ipt_CLUSTERIP: fix buffer overflow
Problem Details: 'buffer' string is copied from userspace. It is not checked whether it is zero terminated. This may lead to overflow inside of simple_strtoul(). Changli Gao suggested to copy not more than user supplied 'size' bytes. It was introduced before the git epoch. Files "ipt_CLUSTERIP/*" are root writable ...
```diff diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 403ca57f6011..d609ac3cb9a4 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c @@ -664,8 +664,11 @@ static ssize_t clusterip_proc_write(struct file *file, const char __user *input, c...
db856674ac69e31946e56085239757cca3f7655f
Analyze and fix the following issue in the Linux kernel code: netfilter: xtables: fix reentrancy
Problem Details: commit f3c5c1bfd4308 (make ip_tables reentrant) introduced a race in handling the stackptr restore, at the end of ipt_do_table() We should do it before the call to xt_info_rdunlock_bh(), or we allow cpu preemption and another cpu overwrites stackptr of original one. A second fix is to change the unde...
```diff diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index b09ed0d080f9..ffcea0d1678e 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -387,7 +387,7 @@ ipt_do_table(struct sk_buff *skb, verdict = (unsigned)(-v) - 1; break; } - if (*s...
5c1aba467828bf0574ec5754c84884d573f590af
Analyze and fix the following issue in the Linux kernel code: netfilter: ipset: fix checking the type revision at create command
Problem Details: The revision of the set type was not checked at the create command: if the userspace sent a valid set type but with not supported revision number, it'd create a loop. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
```diff diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index 618a615acc9d..d6b48230a540 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c @@ -94,16 +94,28 @@ static int find_set_type_get(const char *name, u8 family, u8 revision, struct ip_se...
5e0c1eb7e6b61998c7ecd39b7f69a15773d894d4
Analyze and fix the following issue in the Linux kernel code: netfilter: ipset: fix address ranges at hash:*port* types
Problem Details: The hash:*port* types with IPv4 silently ignored when address ranges with non TCP/UDP were added/deleted from the set and used the first address from the range only. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: Patrick McHardy <kaber@trash.net>
```diff diff --git a/include/linux/netfilter/ipset/ip_set_getport.h b/include/linux/netfilter/ipset/ip_set_getport.h index 3882a81a3b3c..5aebd170f899 100644 --- a/include/linux/netfilter/ipset/ip_set_getport.h +++ b/include/linux/netfilter/ipset/ip_set_getport.h @@ -18,4 +18,14 @@ static inline bool ip_set_get_ip6_port...
ed065e26b8721553736ce9e38023488c6747e93d
Analyze and fix the following issue in the Linux kernel code: i2c: Minor fixes to upgrading-clients document
Problem Details: * Typical legacy drivers implemented method .detach_client, not .detach_adapter. * Drop all references to __devexit, as i2c drivers shouldn't use it. Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/Documentation/i2c/upgrading-clients b/Documentation/i2c/upgrading-clients index 9a45f9bb6a25..d6991625c407 100644 --- a/Documentation/i2c/upgrading-clients +++ b/Documentation/i2c/upgrading-clients @@ -61,7 +61,7 @@ static int example_attach(struct i2c_adapter *adap, int addr, int kind) return 0;...
6ced9e6b3901af4ab6ac0a11231402c888286ea6
Analyze and fix the following issue in the Linux kernel code: i2c: Fix typo in instantiating-devices document
Problem Details: The struct i2c_board_info member holding the name is "type", not "name". Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org
```diff diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices index 87da405a8597..9edb75d8c9b9 100644 --- a/Documentation/i2c/instantiating-devices +++ b/Documentation/i2c/instantiating-devices @@ -100,7 +100,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device...
950a5097855e2d0ac2c91a33f67eeac3be802bf5
Analyze and fix the following issue in the Linux kernel code: i2c-boardinfo: Fix typo in comment
Problem Details: Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c index 7e6a63b57165..3ca2e012e789 100644 --- a/drivers/i2c/i2c-boardinfo.c +++ b/drivers/i2c/i2c-boardinfo.c @@ -1,5 +1,5 @@ /* - * i2c-boardinfo.h - collect pre-declarations of I2C devices + * i2c-boardinfo.c - collect pre-declarations of I...
a769f4968396093d5cc1b1a86204cef579784b24
Analyze and fix the following issue in the Linux kernel code: niu: Rename NIU parent platform device name to fix conflict.
Problem Details: When the OF device driver bits were converted over to the platform device infrastructure in commit 74888760d40b3ac9054f9c5fa07b566c0676ba2d ("dt/net: Eliminate users of of_platform_{,un}register_driver") we inadvertantly created probing problems in the OF case. The NIU driver creates a dummy platform ...
```diff diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 40fa59e2fd5c..32678b6c6b39 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -9501,7 +9501,7 @@ static struct niu_parent * __devinit niu_new_parent(struct niu *np, struct niu_parent *p; int i; - plat_dev = platform_device_register_simple("ni...
5b4787719f8870104fada924ef65ee9fd5eb2514
Analyze and fix the following issue in the Linux kernel code: arch/tile: fix futex sanitization definition/prototype mismatch
Problem Details: Commit 8d7718aa082aaf30a0b4989e1f04858952f941bc changed "int" to "u32" in the prototypes but not the definition. I missed this when I saw the patch go by on LKML. We cast "u32 *" to "int *" since we are tying into the underlying atomics framework, and atomic_t uses int as its value type. Signed-off-b...
```diff diff --git a/arch/tile/lib/atomic_32.c b/arch/tile/lib/atomic_32.c index f02040d3614e..46570211df52 100644 --- a/arch/tile/lib/atomic_32.c +++ b/arch/tile/lib/atomic_32.c @@ -202,32 +202,32 @@ static inline int *__futex_setup(int __user *v) return __atomic_hashed_lock((int __force *)v); } -struct __get_use...
b26fa4e0275426450238a14158bc1db24bb696e6
Analyze and fix the following issue in the Linux kernel code: r8169: fix a bug in rtl8169_init_phy()
Problem Details: commit 54405cde7624 (r8169: support control of advertising.) introduced a bug in rtl8169_init_phy() Reported-by: Piotr Hosowicz <piotr@hosowicz.com> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Oliver Neukum <oliver@neukum.org> Cc: Francois Romieu <romieu@fr.zoreil.com> Tested-by: Anca Ema...
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 5e403511289d..493b0de3848b 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2685,9 +2685,9 @@ static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp) rtl8169_set_speed(dev, AUTONEG_ENABLE, SPEED_1000, DUPLEX_FU...
dadaa10b077133e5c03333131b82ecb13679af2b
Analyze and fix the following issue in the Linux kernel code: bonding: fix a typo in a comment
Problem Details: Signed-off-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 1a6e9eb7af43..338bea147c64 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -2130,7 +2130,7 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev) } /* -* First r...
16addf954d3954a72fd56abc02ffcba3c18529a1
Analyze and fix the following issue in the Linux kernel code: sched: Fix yield_to kernel-doc
Problem Details: Add missing function parameters for yield_to(): Warning(kernel/sched.c:5470): No description found for parameter 'p' Warning(kernel/sched.c:5470): No description found for parameter 'preempt' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Refere...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 58d66ea7d200..052120d67706 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5467,6 +5467,8 @@ EXPORT_SYMBOL(yield); * yield_to - yield the current processor to another thread in * your thread group, or accelerate that thread toward the * processor it'...
fc66c5210ec2539e800e87d7b3a985323c7be96e
Analyze and fix the following issue in the Linux kernel code: perf, x86: Fix Intel fixed counters base initialization
Problem Details: The following patch solves the problems introduced by Robert's commit 41bf498 and reported by Arun Sharma. This commit gets rid of the base + index notation for reading and writing PMU msrs. The problem is that for fixed counters, the new calculation for the base did not take into account the fixed co...
```diff diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index e8dbe179587f..ec46eea0c4ed 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -912,7 +912,7 @@ static inline void x86_assign_hw_event(struct perf_event *event, hwc->event_base = 0; } ...
93d03203d5a165d7a757546245dd1543dfe0ff80
Analyze and fix the following issue in the Linux kernel code: ftmac100: use resource_size()
Problem Details: The calculation is off-by-one. It should be "end - start + 1". This patch fixes it to use resource_size() instead. Oddly, the code already uses resource size correctly a couple lines earlier when it calls request_mem_region() for this memory. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-...
```diff diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index 1d6f4b8d393a..a31661948c42 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -1102,7 +1102,7 @@ static int ftmac100_probe(struct platform_device *pdev) goto err_req_mem; } - priv->base = ioremap(res->start, res->end - re...
77aded2f523c6540f71b1f549373dd8046329a6b
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: Fix warnings for GPMC interrupt
Problem Details: Commit db97eb7dfe13f6c04f0a0e77c32e2691f563ab8b (omap: gpmc: enable irq mode in gpmc) enabled interrupts for GPMC (General Purpose Memory Controller). However, looks like this patch only works on omap3. Fix the issues to avoid warnings on omap4 during the boot. GPMC: number of chip select is 8, CS0 to...
```diff diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 674174365f78..493505c3b2f5 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -693,6 +693,7 @@ static int __init gpmc_init(void) { u32 l, irq; int cs, ret = -EINVAL; + int gpmc_irq; char *ck = NULL; if...
18a81019b851dae83f7df3e72064de706788ff25
Analyze and fix the following issue in the Linux kernel code: arm: mach-omap2: omap_l3_smx: fix irq handler setup
Problem Details: The handler function may be called from the point it is registered. Since the handler inspects IRQ numbers, we must set them up before registration. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide....
```diff diff --git a/arch/arm/mach-omap2/omap_l3_smx.c b/arch/arm/mach-omap2/omap_l3_smx.c index 265bff3acb9e..5f2da7565b68 100644 --- a/arch/arm/mach-omap2/omap_l3_smx.c +++ b/arch/arm/mach-omap2/omap_l3_smx.c @@ -226,7 +226,6 @@ static int __init omap3_l3_probe(struct platform_device *pdev) struct omap3_l3 ...
36133869c4b5b70e6acf6ff7ce25df526a6d5cae
Analyze and fix the following issue in the Linux kernel code: arm: mach-omap2: devices: fix omap3_l3_init() return value
Problem Details: Fix the return value for the successful case. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 0d2d6a9c303c..d478f53f9084 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -65,7 +65,7 @@ static int __init omap3_l3_init(void) WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name)...
6b1e960fdbd75dcd9bcc3ba5ff8898ff1ad30b6e
Analyze and fix the following issue in the Linux kernel code: bridge: Reset IPCB when entering IP stack on NF_FORWARD
Problem Details: Whenever we enter the IP stack proper from bridge netfilter we need to ensure that the skb is in a form the IP stack expects it to be in. The entry point on NF_FORWARD did not meet the requirements of the IP stack, therefore leading to potential crashes/panics. This patch fixes the problem. Signed-o...
```diff diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index f97af5590ba1..008ff6c4eecf 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -739,6 +739,9 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb, nf_bridge->mask |= BRNF_PKT_TYPE; } +...
d870bfb9d366c5d466c0f5419a4ec95a3f71ea8a
Analyze and fix the following issue in the Linux kernel code: vlan: should take into account needed_headroom
Problem Details: Commit c95b819ad7 (gre: Use needed_headroom) made gre use needed_headroom instead of hard_header_len This uncover a bug in vlan code. We should make sure vlan devices take into account their real_dev->needed_headroom or we risk a crash in ipgre_header(), because we dont have enough room to push IP he...
```diff diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index ae610f046de5..e34ea9e5e28b 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -720,6 +720,7 @@ static int vlan_dev_init(struct net_device *dev) dev->fcoe_ddp_xid = real_dev->fcoe_ddp_xid; #endif + dev->needed_headroom = real_dev->n...
5e5069b41d5b82bcadc1dbf73f48476b428c102f
Analyze and fix the following issue in the Linux kernel code: ethtool: __ethtool_set_sg: check for function pointer before using it
Problem Details: __ethtool_set_sg does not check if dev->ethtool_ops->set_sg is defined which can result in a NULL pointer dereference when ethtool is used to change SG settings for drivers without SG support. Signed-off-by: Roger Luethi <rl@hellgate.ch> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-of...
```diff diff --git a/net/core/ethtool.c b/net/core/ethtool.c index c1a71bb738da..a1086fb0c0c7 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -1457,6 +1457,9 @@ static int __ethtool_set_sg(struct net_device *dev, u32 data) { int err; + if (!dev->ethtool_ops->set_sg) + return -EOPNOTSUPP; + if (data ...
67c5c6cb8129c595f21e88254a3fc6b3b841ae8e
Analyze and fix the following issue in the Linux kernel code: econet: 4 byte infoleak to the network
Problem Details: struct aunhdr has 4 padding bytes between 'pad' and 'handle' fields on x86_64. These bytes are not initialized in the variable 'ah' before sending 'ah' to the network. This leads to 4 bytes kernel stack infoleak. This bug was introduced before the git epoch. Signed-off-by: Vasiliy Kulikov <segoon@o...
```diff diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c index 0c2826337919..116d3fd3d669 100644 --- a/net/econet/af_econet.c +++ b/net/econet/af_econet.c @@ -435,10 +435,10 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock, udpdest.sin_addr.s_addr = htonl(network | addr.station); } ...
02b2944cd70c3166984699dd623612e2f8a3eebf
Analyze and fix the following issue in the Linux kernel code: MN10300: Fix the ASB2364 gdbport UART register defs
Problem Details: Fix the ASB2364 gdbport UART register definitions. These registers are actually 2 bytes apart, not 4 (which the ASB2303 and ASB2305 are). Signed-off-by: David Howells <dhowells@redhat.com>
```diff diff --git a/arch/mn10300/unit-asb2364/include/unit/serial.h b/arch/mn10300/unit-asb2364/include/unit/serial.h index 7f048bbfdfd7..92f224a97efc 100644 --- a/arch/mn10300/unit-asb2364/include/unit/serial.h +++ b/arch/mn10300/unit-asb2364/include/unit/serial.h @@ -59,18 +59,18 @@ static inline void __debug_to_ser...
5f91a1affc4f94589e386f9a687d7c3ecb944df4
Analyze and fix the following issue in the Linux kernel code: MN10300: Fix ASB2364 FPGA register defs
Problem Details: Fix the definition of the ASB2364 FPGA IRQ detect registers. They accidentally got defined to be the same as the mask registers when the patches were being ported to the upstream kernel. Signed-off-by: David Howells <dhowells@redhat.com>
```diff diff --git a/arch/mn10300/unit-asb2364/include/unit/fpga-regs.h b/arch/mn10300/unit-asb2364/include/unit/fpga-regs.h index 7cf12054db65..33f100f9b468 100644 --- a/arch/mn10300/unit-asb2364/include/unit/fpga-regs.h +++ b/arch/mn10300/unit-asb2364/include/unit/fpga-regs.h @@ -14,7 +14,7 @@ #define ASB2364_FPGA_R...
46165a3d00db7526fb43a3dfe5c01a4aa7e236af
Analyze and fix the following issue in the Linux kernel code: spi/dw_spi: Fix missing header
Problem Details: Currently, build on PPC dies with: In file included from drivers/spi/dw_spi_mmio.c:16: include/linux/spi/dw_spi.h:147: error: field ‘tx_sgl’ has incomplete type include/linux/spi/dw_spi.h:149: error: field ‘rx_sgl’ has incomplete type Add linux/scatterlist.h include to dw_spi.h, because we need to kno...
```diff diff --git a/include/linux/spi/dw_spi.h b/include/linux/spi/dw_spi.h index 6cd10f6ad472..fb0bce564844 100644 --- a/include/linux/spi/dw_spi.h +++ b/include/linux/spi/dw_spi.h @@ -2,6 +2,7 @@ #define DW_SPI_HEADER_H #include <linux/io.h> +#include <linux/scatterlist.h> /* Bit fields in CTRLR0 */ #define ...
27cb1572e3e6bb1f8cf6bb3d74c914a87b131792
Analyze and fix the following issue in the Linux kernel code: fix deadlock in pivot_root()
Problem Details: Don't hold vfsmount_lock over the loop traversing ->mnt_parent; do check_mnt(new.mnt) under namespace_sem instead; combined with namespace_sem held over all that code it'll guarantee the stability of ->mnt_parent chain all the way to the root. Doing check_mnt() outside of namespace_sem in case of pivo...
```diff diff --git a/fs/namespace.c b/fs/namespace.c index 453529f72dff..46cc26b5aaf2 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -2569,9 +2569,6 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root, error = user_path_dir(new_root, &new); if (error) goto out0; - error = -EINVAL; - if (!check_mnt(...
e8e999cf3cc733482e390b02ff25a64cecdc0b64
Analyze and fix the following issue in the Linux kernel code: x86, dumpstack: Correct stack dump info when frame pointer is available
Problem Details: Current stack dump code scans entire stack and check each entry contains a pointer to kernel code. If CONFIG_FRAME_POINTER=y it could mark whether the pointer is valid or not based on value of the frame pointer. Invalid entries could be preceded by '?' sign. However this was not going to happen becaus...
```diff diff --git a/arch/x86/include/asm/kdebug.h b/arch/x86/include/asm/kdebug.h index 518bbbb9ee59..fe2cc6e105fa 100644 --- a/arch/x86/include/asm/kdebug.h +++ b/arch/x86/include/asm/kdebug.h @@ -26,7 +26,7 @@ extern void die(const char *, struct pt_regs *,long); extern int __must_check __die(const char *, struct p...
2c76397bddd3abcd36aca1941f47570dbc249542
Analyze and fix the following issue in the Linux kernel code: x86: Clean up csum-copy_64.S a bit
Problem Details: The many stray whitespaces and other uncleanlinesses made this code almost unreadable to me - so fix those. No changes to the code. Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/lib/csum-copy_64.S b/arch/x86/lib/csum-copy_64.S index ebf753e48ba9..fb903b758da8 100644 --- a/arch/x86/lib/csum-copy_64.S +++ b/arch/x86/lib/csum-copy_64.S @@ -1,6 +1,6 @@ /* - * Copyright 2002,2003 Andi Kleen, SuSE Labs. - * + * Copyright 2002, 2003 Andi Kleen, SuSE Labs. + * * This ...
a6c3270b04340c5e0d47af5bdb10f30d33333739
Analyze and fix the following issue in the Linux kernel code: x86: Fix misspelling and align params
Problem Details: Fix 'upto' misspelling and align parameters. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: trivial@kernel.org LKML-Reference: <1300389856-1099-2-git-send-email-lucas.demarchi@profusion.mobi> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/Documentation/x86/x86_64/boot-options.txt b/Documentation/x86/x86_64/boot-options.txt index 7fbbaf85f5b7..48c13b8ab90c 100644 --- a/Documentation/x86/x86_64/boot-options.txt +++ b/Documentation/x86/x86_64/boot-options.txt @@ -189,13 +189,13 @@ ACPI PCI - pci=off Don't use PCI - pci=conf1 Use...
0c082bd15828135d609a2f593b583de9eacece0f
Analyze and fix the following issue in the Linux kernel code: Blackfin: ip0x: fix unused variable warning
Problem Details: The previous commit that changed this code to the common GPIO layers forgot to delete the local and now unused "i" variable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-bf533/boards/ip0x.c b/arch/blackfin/mach-bf533/boards/ip0x.c index f869a3711480..a377d8afea03 100644 --- a/arch/blackfin/mach-bf533/boards/ip0x.c +++ b/arch/blackfin/mach-bf533/boards/ip0x.c @@ -289,8 +289,6 @@ static struct platform_device *ip0x_devices[] __initdata = { stati...
1353d050facf5efd8dc05ba6c4d7852fcb423b15
Analyze and fix the following issue in the Linux kernel code: Blackfin/ipipe: restore pipeline bits in irqflags
Problem Details: This patch fixes the Blackfin irqflags to make them I-pipe aware anew, after the introduction of the hard_local_irq_*() API. Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/include/asm/irqflags.h b/arch/blackfin/include/asm/irqflags.h index 3365cb97f539..b4bbb75a9e15 100644 --- a/arch/blackfin/include/asm/irqflags.h +++ b/arch/blackfin/include/asm/irqflags.h @@ -89,15 +89,33 @@ static inline void __hard_local_irq_restore(unsigned long flags) #ifdef CONF...
9169b51f8ce6cd11cd19913b54466ec11e6a12f9
Analyze and fix the following issue in the Linux kernel code: Blackfin/ipipe: fix deferred pipeline sync for the root stage
Problem Details: This patch makes sure to sync the pipeline for the root stage only from the outer interrupt level, when resuming kernel code after an interrupt. This fixes a bug causing EVT15 to be spuriously popped off upon nested interrupts, which in turn would cause the preempted kernel code to resume without supe...
```diff diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index bc08c98d008d..4845d51e88a6 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S @@ -952,8 +952,17 @@ ENDPROC(_evt_up_evt14) #ifdef CONFIG_IPIPE _resume_kernel_from_int: + r1 = LO(~0x800...
8944b5a258d73abd1f86bb360c27bb8c3bed5daa
Analyze and fix the following issue in the Linux kernel code: Blackfin: cpufreq: fix typos
Problem Details: No functional changes here. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/mach-common/cpufreq.c b/arch/blackfin/mach-common/cpufreq.c index c33fb61b5082..85dc6d69f9c0 100644 --- a/arch/blackfin/mach-common/cpufreq.c +++ b/arch/blackfin/mach-common/cpufreq.c @@ -1,7 +1,7 @@ /* * Blackfin core clock scaling * - * Copyright 2008-2009 Analog Devices Inc. +...
ef9d8c251ac84e2c471768bb57298b177f8d6ab5
Analyze and fix the following issue in the Linux kernel code: Blackfin: SMP: PERCPU section should be PAGE aligned
Problem Details: Common code checks the alignment of some of the variables and calls BUG() if they aren't page aligned. Signed-off-by: steven miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/kernel/vmlinux.lds.S b/arch/blackfin/kernel/vmlinux.lds.S index c40d07f708e8..f5fd234e5773 100644 --- a/arch/blackfin/kernel/vmlinux.lds.S +++ b/arch/blackfin/kernel/vmlinux.lds.S @@ -136,7 +136,7 @@ SECTIONS . = ALIGN(16); INIT_DATA_SECTION(16) - PERCPU(32, 4) + PERCPU(32, PAGE...
d6b435be4b3277b341ad1a77392d2e58b3d7b36d
Analyze and fix the following issue in the Linux kernel code: Blackfin: ADI boards: enable pseudo debug insns support
Problem Details: We use these insns when testing, so enable them by default for all of our development boards. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
```diff diff --git a/arch/blackfin/configs/BF518F-EZBRD_defconfig b/arch/blackfin/configs/BF518F-EZBRD_defconfig index db8d38a12a9a..5edcb58d6f73 100644 --- a/arch/blackfin/configs/BF518F-EZBRD_defconfig +++ b/arch/blackfin/configs/BF518F-EZBRD_defconfig @@ -115,6 +115,7 @@ CONFIG_DEBUG_DOUBLEFAULT=y CONFIG_DEBUG_BFIN...
4a122c10fbfe9020df469f0f669da129c5757671
Analyze and fix the following issue in the Linux kernel code: ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl
Problem Details: The user-supplied index into the adapters array needs to be checked, or an out-of-bounds kernel pointer could be accessed and used, leading to potentially exploitable memory corruption. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@s...
```diff diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c index 26186be638b1..cd624f13ff8e 100644 --- a/sound/pci/asihpi/hpioctl.c +++ b/sound/pci/asihpi/hpioctl.c @@ -156,6 +156,11 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg) goto out; } + if (hm->h.adapter...
98d21df431ad55281e1abf780f8d51e3391900b2
Analyze and fix the following issue in the Linux kernel code: ALSA: aloop - Fix possible IRQ lock inversion
Problem Details: loopback_pos_update() can be called in the timer callback, thus the lock held should be irq-safe. Otherwise you'll get AB/BA deadlock together with substream->self_group.lock. Reported-and-tested-by: Knut Petersen <Knut_Petersen@t-online.de> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@...
```diff diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 12b44b0b6777..a0da7755fcea 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c @@ -482,8 +482,9 @@ static unsigned int loopback_pos_update(struct loopback_cable *cable) cable->streams[SNDRV_PCM_STREAM_CAPTURE]; unsigned long delta...
fbe0aa1f3d16fac5b641c0c1697371dcbe45b569
Analyze and fix the following issue in the Linux kernel code: Some fixes for pstore
Problem Details: 1) Change from ->get_sb() to ->mount() 2) Use mount_single() instead of mount_nodev() 3) Pulled in ramfs_get_inode() & trimmed to what I need for pstore 4) Drop the ugly pstore_writefile() Just save data using kmalloc() and provide a pstore_file_read() that uses simple_read_from_buffer(). Signed-of...
```diff diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 549d245d0b42..08342232cb1c 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c @@ -40,9 +40,29 @@ struct pstore_private { u64 id; int (*erase)(u64); + ssize_t size; + char data[]; }; -#define pstore_get_inode ramfs_get_inode +static int pstore_...
1bdd6384c2b43cac9be8d6f2c298bcf39f50cd07
Analyze and fix the following issue in the Linux kernel code: RDMA/addr: Fix return of uninitialized ret value
Problem Details: Commit b23dd4fe42b4 ("ipv4: Make output route lookup return rtable directly") resulted in leaving ret uninitialized, where it may later be returned. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
```diff diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index e0ef5fdc361e..4ffc224faa7f 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -204,7 +204,7 @@ static int addr4_resolve(struct sockaddr_in *src_in, /* If the device does ARP internally, return...
723aae25d5cdb09962901d36d526b44d4be1051c
Analyze and fix the following issue in the Linux kernel code: smp_call_function_many: handle concurrent clearing of mask
Problem Details: Mike Galbraith reported finding a lockup ("perma-spin bug") where the cpumask passed to smp_call_function_many was cleared by other cpu(s) while a cpu was preparing its call_data block, resulting in no cpu to clear the last ref and unlock the block. Having cpus clear their bit asynchronously could be ...
```diff diff --git a/kernel/smp.c b/kernel/smp.c index 7c6ded5effd9..954548906afb 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -450,7 +450,7 @@ void smp_call_function_many(const struct cpumask *mask, { struct call_function_data *data; unsigned long flags; - int cpu, next_cpu, this_cpu = smp_processor_id(); + in...
e6cd1e07a185d5f9b0aa75e020df02d3c1c44940
Analyze and fix the following issue in the Linux kernel code: call_function_many: fix list delete vs add race
Problem Details: Peter pointed out there was nothing preventing the list_del_rcu in smp_call_function_interrupt from running before the list_add_rcu in smp_call_function_many. Fix this by not setting refs until we have gotten the lock for the list. Take advantage of the wmb in list_add_rcu to save an explicit addition...
```diff diff --git a/kernel/smp.c b/kernel/smp.c index 9910744f0856..aaeee20c5634 100644 --- a/kernel/smp.c +++ b/kernel/smp.c @@ -491,14 +491,15 @@ void smp_call_function_many(const struct cpumask *mask, cpumask_clear_cpu(this_cpu, data->cpumask); /* - * To ensure the interrupt handler gets an complete view - ...
20e2aa916f6b56e6b1d9e34f4c6e8183d27cb81f
Analyze and fix the following issue in the Linux kernel code: gpio/langwell: Fix broken irq_eoi change.
Problem Details: commit 0766d20fd (langwell_gpio: modify EOI handling following change of kernel irq subsystem) changes - desc->chip->eoi(irq); + + if (desc->chip->irq_eoi) + desc->chip->irq_eoi(irq_get_irq_data(irq)); + else + dev_warn(pg->chip.dev, "missing EOI handler for irq %d\n",...
```diff diff --git a/drivers/gpio/langwell_gpio.c b/drivers/gpio/langwell_gpio.c index 54d70a47afc1..bb10156422e3 100644 --- a/drivers/gpio/langwell_gpio.c +++ b/drivers/gpio/langwell_gpio.c @@ -187,10 +187,11 @@ MODULE_DEVICE_TABLE(pci, lnw_gpio_ids); static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)...
e61cf1184d72e574460492fd6c6b6d8a3ace2089
Analyze and fix the following issue in the Linux kernel code: mmc: dw_mmc: fix suspend/resume operation
Problem Details: This patch is related to re-init processing on suspend/resume. When card is resuming, some register is reset. If card is removable, maybe controller should be rescan for card. But if assume card is non-removable, need to restore the old value at registers. We store the value of FIFOTH at probe time...
```diff diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 94ec6502bdde..51ee2f5909d4 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1639,8 +1639,9 @@ static int dw_mci_probe(struct platform_device *pdev) */ fifo_size = mci_readl(host, FIFOTH); fifo_size = (fifo_...
860cfe796c793bfad1e666de9600852f2d653c57
Analyze and fix the following issue in the Linux kernel code: mmc: tmio: fix address in kunmap_atomic() calls
Problem Details: Currently kunmap_atomic() doesn't take into account the offset, used with kmap_atomic(). On platforms, where kunmap_atomic() is not a NOP, this will lead to problems, when offset != 0. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
```diff diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index 0e4998fa6fc5..ac52eb65395e 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c @@ -219,9 +219,9 @@ static char *tmio_mmc_kmap_atomic(struct scatterlist *sg, unsigned long *flags) return kmap_atomic(sg_page(sg),...
0aab3995485b8a994bf29a995a008c9ea4a28054
Analyze and fix the following issue in the Linux kernel code: mmc: sdio: remember new card RCA when redetecting card
Problem Details: During redetection of a SDIO card, a request for a new card RCA was submitted to the card, but was then overwritten by the old RCA. This caused the card to be deselected instead of selected when using the incorrect RCA. This bug's been present since the "oldcard" handling was introduced in 2.6.32. Si...
```diff diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index c9fbb777440d..db0f0b44d684 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -395,6 +395,14 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr, if (err) goto remove; + /* + * Update oldcard with the...
ba6a902d9d89b976bf64a435ec97a490cd160dec
Analyze and fix the following issue in the Linux kernel code: mmc: dw_mmc: Remove set-but-unused variable.
Problem Details: count is only ever used by assigning to old_len if count == 0, and then old_len isn't ever used at all. So, both are redundant. Fixes: drivers/mmc/host/dw_mmc.c: In function ‘dw_mci_read_data_pio’: drivers/mmc/host/dw_mmc.c:1034:32: warning: variable ‘old_len’ set but not used [-Wunused-but-set-vari...
```diff diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 58476c1bb056..299c1d61b6b3 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1031,13 +1031,10 @@ static void dw_mci_read_data_pio(struct dw_mci *host) struct mmc_data *data = host->data; int shift = host->data_...
36885ff0e6563687e6152da6d311abbf83c0198f
Analyze and fix the following issue in the Linux kernel code: gpio/cs5535-gpio: Fix section mismatch
Problem Details: Fix section mismatch by annotating using variable name suffix. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
```diff diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c index 0d05ea7d499b..6e16cba56ad2 100644 --- a/drivers/gpio/cs5535-gpio.c +++ b/drivers/gpio/cs5535-gpio.c @@ -373,7 +373,7 @@ static int __devexit cs5535_gpio_remove(struct platform_device *pdev) return 0; } -static struct platform_driver...
41415730a1050499fbd63b3f7dd59b3a4c3bb91a
Analyze and fix the following issue in the Linux kernel code: Btrfs: check return value of btrfs_search_slot properly
Problem Details: Doing an audit of where we use btrfs_search_slot only showed one place where we don't check the return value of btrfs_search_slot properly. Just fix mark_extent_written to see if btrfs_search_slot failed and act accordingly. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
```diff diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 3786eca2a905..a85b044cf39e 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -608,6 +608,8 @@ again: key.offset = split; ret = btrfs_search_slot(trans, root, &key, path, -1, 1); + if (ret < 0) + goto out; if (ret > 0 && path->slots[0] > 0) pat...
850265335f792f5d39ab24e5fb7160bac28d77e5
Analyze and fix the following issue in the Linux kernel code: Btrfs: return error if the range we want to map is bogus
Problem Details: Currently if we have corrupt metadata map_extent_buffer will complain about it, but not return an error so the caller has no idea a problem was hit. Fix this. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 714adc4ac4c2..1bbd26b4fc5c 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3690,6 +3690,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start, "wanted %lu %lu\n", (unsigned long long)eb->start, ...